San Mehat | d183042 | 2010-01-15 08:02:39 -0800 | [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 | */ |
| 16 | |
| 17 | #ifndef _RESPONSECODE_H |
| 18 | #define _RESPONSECODE_H |
| 19 | |
| 20 | class ResponseCode { |
JP Abgrall | 8a93272 | 2011-07-13 19:17:35 -0700 | [diff] [blame] | 21 | // Keep in sync with |
| 22 | // frameworks/base/services/java/com/android/server/NetworkManagementService.java |
San Mehat | d183042 | 2010-01-15 08:02:39 -0800 | [diff] [blame] | 23 | public: |
| 24 | // 100 series - Requestion action was initiated; expect another reply |
| 25 | // before proceeding with a new command. |
San Mehat | 9d10b34 | 2010-01-18 09:51:02 -0800 | [diff] [blame] | 26 | static const int ActionInitiated = 100; |
| 27 | static const int InterfaceListResult = 110; |
| 28 | static const int TetherInterfaceListResult = 111; |
| 29 | static const int TetherDnsFwdTgtListResult = 112; |
San Mehat | d5573d3 | 2010-01-19 17:19:41 -0800 | [diff] [blame] | 30 | static const int TtyListResult = 113; |
San Mehat | d183042 | 2010-01-15 08:02:39 -0800 | [diff] [blame] | 31 | |
San Mehat | d183042 | 2010-01-15 08:02:39 -0800 | [diff] [blame] | 32 | |
| 33 | // 200 series - Requested action has been successfully completed |
San Mehat | 8e46896 | 2010-04-01 08:31:37 -0700 | [diff] [blame] | 34 | static const int CommandOkay = 200; |
| 35 | static const int TetherStatusResult = 210; |
| 36 | static const int IpFwdStatusResult = 211; |
| 37 | static const int PanStatusResult = 212; |
| 38 | static const int InterfaceGetCfgResult = 213; |
| 39 | static const int SoftapStatusResult = 214; |
| 40 | static const int UsbRNDISStatusResult = 215; |
| 41 | static const int InterfaceRxCounterResult = 216; |
| 42 | static const int InterfaceTxCounterResult = 217; |
| 43 | static const int InterfaceRxThrottleResult = 218; |
| 44 | static const int InterfaceTxThrottleResult = 219; |
JP Abgrall | 8a93272 | 2011-07-13 19:17:35 -0700 | [diff] [blame] | 45 | static const int QuotaCounterResult = 220; |
JP Abgrall | db7da58 | 2011-09-18 12:57:32 -0700 | [diff] [blame] | 46 | static const int TetheringStatsResult = 221; |
Selim Gurun | ddb3475 | 2012-02-27 16:01:42 -0800 | [diff] [blame] | 47 | static const int DnsProxyQueryResult = 222; |
San Mehat | d183042 | 2010-01-15 08:02:39 -0800 | [diff] [blame] | 48 | |
| 49 | // 400 series - The command was accepted but the requested action |
| 50 | // did not take place. |
Selim Gurun | ddb3475 | 2012-02-27 16:01:42 -0800 | [diff] [blame] | 51 | static const int OperationFailed = 400; |
| 52 | static const int DnsProxyOperationFailed = 401; |
Robert Greenwalt | 745e09f | 2012-03-29 14:45:54 -0700 | [diff] [blame] | 53 | static const int ServiceStartFailed = 402; |
| 54 | static const int ServiceStopFailed = 403; |
San Mehat | d183042 | 2010-01-15 08:02:39 -0800 | [diff] [blame] | 55 | |
| 56 | // 500 series - The command was not accepted and the requested |
| 57 | // action did not take place. |
| 58 | static const int CommandSyntaxError = 500; |
| 59 | static const int CommandParameterError = 501; |
| 60 | |
| 61 | // 600 series - Unsolicited broadcasts |
Robert Greenwalt | 745e09f | 2012-03-29 14:45:54 -0700 | [diff] [blame] | 62 | static const int InterfaceChange = 600; |
| 63 | static const int BandwidthControl = 601; |
| 64 | static const int ServiceDiscoveryFailed = 602; |
| 65 | static const int ServiceDiscoveryServiceAdded = 603; |
| 66 | static const int ServiceDiscoveryServiceRemoved = 604; |
| 67 | static const int ServiceRegistrationFailed = 605; |
| 68 | static const int ServiceRegistrationSucceeded = 606; |
| 69 | static const int ServiceResolveFailed = 607; |
| 70 | static const int ServiceResolveSuccess = 608; |
| 71 | static const int ServiceSetHostnameFailed = 609; |
| 72 | static const int ServiceSetHostnameSuccess = 610; |
| 73 | static const int ServiceGetAddrInfoFailed = 611; |
| 74 | static const int ServiceGetAddrInfoSuccess = 612; |
Haoyu Bai | db28cbe | 2012-07-17 10:32:58 -0700 | [diff] [blame^] | 75 | static const int InterfaceClassActivity = 613; |
San Mehat | d183042 | 2010-01-15 08:02:39 -0800 | [diff] [blame] | 76 | }; |
| 77 | #endif |