San Mehat | dc26607 | 2009-05-06 11:16:52 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
San Mehat | 3c5a6f0 | 2009-05-22 15:36:13 -0700 | [diff] [blame] | 16 | |
San Mehat | dc26607 | 2009-05-06 11:16:52 -0700 | [diff] [blame] | 17 | #ifndef _COMMANDLISTENER_H__ |
| 18 | #define _COMMANDLISTENER_H__ |
| 19 | |
| 20 | #include <sysutils/FrameworkListener.h> |
| 21 | #include "NexusCommand.h" |
| 22 | |
San Mehat | dc26607 | 2009-05-06 11:16:52 -0700 | [diff] [blame] | 23 | class CommandListener : public FrameworkListener { |
San Mehat | dc26607 | 2009-05-06 11:16:52 -0700 | [diff] [blame] | 24 | public: |
San Mehat | 1441e76 | 2009-05-07 11:37:10 -0700 | [diff] [blame] | 25 | CommandListener(); |
San Mehat | dc26607 | 2009-05-06 11:16:52 -0700 | [diff] [blame] | 26 | virtual ~CommandListener() {} |
| 27 | |
| 28 | private: |
San Mehat | dc26607 | 2009-05-06 11:16:52 -0700 | [diff] [blame] | 29 | |
| 30 | class WifiScanCmd : public NexusCommand { |
| 31 | public: |
San Mehat | 1441e76 | 2009-05-07 11:37:10 -0700 | [diff] [blame] | 32 | WifiScanCmd(); |
San Mehat | dc26607 | 2009-05-06 11:16:52 -0700 | [diff] [blame] | 33 | virtual ~WifiScanCmd() {} |
San Mehat | 3aff2d1 | 2009-06-15 14:10:44 -0700 | [diff] [blame] | 34 | int runCommand(SocketClient *c, int argc, char ** argv); |
San Mehat | 1441e76 | 2009-05-07 11:37:10 -0700 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | class WifiScanResultsCmd : public NexusCommand { |
| 38 | public: |
| 39 | WifiScanResultsCmd(); |
| 40 | virtual ~WifiScanResultsCmd() {} |
San Mehat | 3aff2d1 | 2009-06-15 14:10:44 -0700 | [diff] [blame] | 41 | int runCommand(SocketClient *c, int argc, char ** argv); |
San Mehat | dc26607 | 2009-05-06 11:16:52 -0700 | [diff] [blame] | 42 | }; |
| 43 | |
San Mehat | 3c5a6f0 | 2009-05-22 15:36:13 -0700 | [diff] [blame] | 44 | class WifiCreateNetworkCmd : public NexusCommand { |
San Mehat | 82a2116 | 2009-05-12 17:26:28 -0700 | [diff] [blame] | 45 | public: |
San Mehat | 3c5a6f0 | 2009-05-22 15:36:13 -0700 | [diff] [blame] | 46 | WifiCreateNetworkCmd(); |
| 47 | virtual ~WifiCreateNetworkCmd() {} |
San Mehat | 3aff2d1 | 2009-06-15 14:10:44 -0700 | [diff] [blame] | 48 | int runCommand(SocketClient *c, int argc, char ** argv); |
San Mehat | 82a2116 | 2009-05-12 17:26:28 -0700 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | class WifiRemoveNetworkCmd : public NexusCommand { |
| 52 | public: |
| 53 | WifiRemoveNetworkCmd(); |
| 54 | virtual ~WifiRemoveNetworkCmd() {} |
San Mehat | 3aff2d1 | 2009-06-15 14:10:44 -0700 | [diff] [blame] | 55 | int runCommand(SocketClient *c, int argc, char ** argv); |
San Mehat | 82a2116 | 2009-05-12 17:26:28 -0700 | [diff] [blame] | 56 | }; |
| 57 | |
| 58 | class WifiListNetworksCmd : public NexusCommand { |
| 59 | public: |
| 60 | WifiListNetworksCmd(); |
| 61 | virtual ~WifiListNetworksCmd() {} |
San Mehat | 3aff2d1 | 2009-06-15 14:10:44 -0700 | [diff] [blame] | 62 | int runCommand(SocketClient *c, int argc, char ** argv); |
San Mehat | 82a2116 | 2009-05-12 17:26:28 -0700 | [diff] [blame] | 63 | }; |
| 64 | |
San Mehat | 4876567 | 2009-05-20 15:28:43 -0700 | [diff] [blame] | 65 | class SetCmd : public NexusCommand { |
San Mehat | 82a2116 | 2009-05-12 17:26:28 -0700 | [diff] [blame] | 66 | public: |
San Mehat | 4876567 | 2009-05-20 15:28:43 -0700 | [diff] [blame] | 67 | SetCmd(); |
| 68 | virtual ~SetCmd() {} |
San Mehat | 3aff2d1 | 2009-06-15 14:10:44 -0700 | [diff] [blame] | 69 | int runCommand(SocketClient *c, int argc, char ** argv); |
San Mehat | 82a2116 | 2009-05-12 17:26:28 -0700 | [diff] [blame] | 70 | }; |
| 71 | |
San Mehat | 4876567 | 2009-05-20 15:28:43 -0700 | [diff] [blame] | 72 | class GetCmd : public NexusCommand { |
San Mehat | 82a2116 | 2009-05-12 17:26:28 -0700 | [diff] [blame] | 73 | public: |
San Mehat | 4876567 | 2009-05-20 15:28:43 -0700 | [diff] [blame] | 74 | GetCmd(); |
| 75 | virtual ~GetCmd() {} |
San Mehat | 3aff2d1 | 2009-06-15 14:10:44 -0700 | [diff] [blame] | 76 | int runCommand(SocketClient *c, int argc, char ** argv); |
San Mehat | 82a2116 | 2009-05-12 17:26:28 -0700 | [diff] [blame] | 77 | }; |
San Mehat | 192331d | 2009-05-22 13:58:06 -0700 | [diff] [blame] | 78 | |
| 79 | class ListCmd : public NexusCommand { |
| 80 | public: |
| 81 | ListCmd(); |
| 82 | virtual ~ListCmd() {} |
San Mehat | 3aff2d1 | 2009-06-15 14:10:44 -0700 | [diff] [blame] | 83 | int runCommand(SocketClient *c, int argc, char ** argv); |
San Mehat | 192331d | 2009-05-22 13:58:06 -0700 | [diff] [blame] | 84 | }; |
San Mehat | dc26607 | 2009-05-06 11:16:52 -0700 | [diff] [blame] | 85 | }; |
| 86 | |
| 87 | #endif |