blob: b01c141d4b3a631f1d18d07197222702ebb74740 [file] [log] [blame]
San Mehatd1830422010-01-15 08:02:39 -08001/*
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
20class ResponseCode {
JP Abgrall8a932722011-07-13 19:17:35 -070021 // Keep in sync with
22 // frameworks/base/services/java/com/android/server/NetworkManagementService.java
San Mehatd1830422010-01-15 08:02:39 -080023public:
24 // 100 series - Requestion action was initiated; expect another reply
25 // before proceeding with a new command.
San Mehat9d10b342010-01-18 09:51:02 -080026 static const int ActionInitiated = 100;
27 static const int InterfaceListResult = 110;
28 static const int TetherInterfaceListResult = 111;
29 static const int TetherDnsFwdTgtListResult = 112;
San Mehatd5573d32010-01-19 17:19:41 -080030 static const int TtyListResult = 113;
San Mehatd1830422010-01-15 08:02:39 -080031
San Mehatd1830422010-01-15 08:02:39 -080032
33 // 200 series - Requested action has been successfully completed
San Mehat8e468962010-04-01 08:31:37 -070034 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 Abgrall8a932722011-07-13 19:17:35 -070045 static const int QuotaCounterResult = 220;
JP Abgralldb7da582011-09-18 12:57:32 -070046 static const int TetheringStatsResult = 221;
San Mehatd1830422010-01-15 08:02:39 -080047
48 // 400 series - The command was accepted but the requested action
49 // did not take place.
50 static const int OperationFailed = 400;
51
52 // 500 series - The command was not accepted and the requested
53 // action did not take place.
54 static const int CommandSyntaxError = 500;
55 static const int CommandParameterError = 501;
56
57 // 600 series - Unsolicited broadcasts
Robert Greenwalt67c57532010-02-17 17:42:37 -080058 static const int InterfaceChange = 600;
JP Abgralle0ebc462011-07-21 17:21:49 -070059 static const int BandwidthControl = 601;
San Mehatd1830422010-01-15 08:02:39 -080060};
61#endif