blob: f2c533ed6b837f7f17818764e1a172c8a2ece65f [file] [log] [blame]
San Mehatf1b736b2009-10-10 17:22:08 -07001/*
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
San Mehata2677e42009-12-13 10:40:18 -080017#ifndef _RESPONSECODE_H
18#define _RESPONSECODE_H
San Mehatf1b736b2009-10-10 17:22:08 -070019
San Mehata2677e42009-12-13 10:40:18 -080020class ResponseCode {
San Mehatf1b736b2009-10-10 17:22:08 -070021public:
22 // 100 series - Requestion action was initiated; expect another reply
23 // before proceeding with a new command.
San Mehata19b2502010-01-06 10:33:53 -080024 static const int ActionInitiated = 100;
San Mehatf1b736b2009-10-10 17:22:08 -070025
San Mehat586536c2010-02-16 17:12:00 -080026 static const int VolumeListResult = 110;
27 static const int AsecListResult = 111;
28 static const int StorageUsersListResult = 112;
Ken Sumrall160b4d62013-04-22 12:15:39 -070029 static const int CryptfsGetfieldResult = 113;
San Mehatf1b736b2009-10-10 17:22:08 -070030
31 // 200 series - Requested action has been successfully completed
San Mehata19b2502010-01-06 10:33:53 -080032 static const int CommandOkay = 200;
San Mehateba65e92010-01-29 05:15:16 -080033 static const int ShareStatusResult = 210;
San Mehata19b2502010-01-06 10:33:53 -080034 static const int AsecPathResult = 211;
San Mehateba65e92010-01-29 05:15:16 -080035 static const int ShareEnabledResult = 212;
Paul Lawrencef4faa572014-01-29 13:31:03 -080036 static const int PasswordTypeResult = 213;
San Mehatf1b736b2009-10-10 17:22:08 -070037
38 // 400 series - The command was accepted but the requested action
39 // did not take place.
San Mehateba65e92010-01-29 05:15:16 -080040 static const int OperationFailed = 400;
41 static const int OpFailedNoMedia = 401;
42 static const int OpFailedMediaBlank = 402;
43 static const int OpFailedMediaCorrupt = 403;
44 static const int OpFailedVolNotMounted = 404;
San Mehat8f2875b2010-02-18 11:40:49 -080045 static const int OpFailedStorageBusy = 405;
San Mehat88ac2c02010-03-23 11:15:58 -070046 static const int OpFailedStorageNotFound = 406;
San Mehatf1b736b2009-10-10 17:22:08 -070047
48 // 500 series - The command was not accepted and the requested
49 // action did not take place.
50 static const int CommandSyntaxError = 500;
51 static const int CommandParameterError = 501;
Ken Sumrall3ad90722011-10-04 20:38:29 -070052 static const int CommandNoPermission = 502;
San Mehatf1b736b2009-10-10 17:22:08 -070053
54 // 600 series - Unsolicited broadcasts
San Mehata2677e42009-12-13 10:40:18 -080055 static const int UnsolicitedInformational = 600;
56 static const int VolumeStateChange = 605;
57 static const int VolumeMountFailedBlank = 610;
58 static const int VolumeMountFailedDamaged = 611;
59 static const int VolumeMountFailedNoMedia = 612;
Jeff Sharkey0de365f2013-10-16 16:24:19 -070060 static const int VolumeUuidChange = 613;
61 static const int VolumeUserLabelChange = 614;
San Mehata2677e42009-12-13 10:40:18 -080062
63 static const int ShareAvailabilityChange = 620;
64
65 static const int VolumeDiskInserted = 630;
66 static const int VolumeDiskRemoved = 631;
67 static const int VolumeBadRemoval = 632;
San Mehat8f2875b2010-02-18 11:40:49 -080068
Jeff Sharkey36801cc2015-03-13 16:09:20 -070069 static const int DiskCreated = 640;
70 static const int DiskSizeChanged = 641;
71 static const int DiskLabelChanged = 642;
Jeff Sharkey613b26f2015-04-19 14:57:55 -070072 static const int DiskScanned = 643;
Jeff Sharkeyc86ab6f2015-06-26 14:02:09 -070073 static const int DiskSysPathChanged = 644;
Jeff Sharkey36801cc2015-03-13 16:09:20 -070074 static const int DiskDestroyed = 649;
75
76 static const int VolumeCreated = 650;
77 static const int VolumeStateChanged = 651;
78 static const int VolumeFsTypeChanged = 652;
79 static const int VolumeFsUuidChanged = 653;
80 static const int VolumeFsLabelChanged = 654;
81 static const int VolumePathChanged = 655;
Jeff Sharkey1d6fbcc2015-04-24 16:00:03 -070082 static const int VolumeInternalPathChanged = 656;
Jeff Sharkey36801cc2015-03-13 16:09:20 -070083 static const int VolumeDestroyed = 659;
84
Jeff Sharkey1d6fbcc2015-04-24 16:00:03 -070085 static const int MoveStatus = 660;
Jeff Sharkey5a6bfca2015-05-14 20:33:55 -070086 static const int BenchmarkResult = 661;
Jeff Sharkeyc86ab6f2015-06-26 14:02:09 -070087 static const int TrimResult = 662;
Jeff Sharkey1d6fbcc2015-04-24 16:00:03 -070088
San Mehat8f2875b2010-02-18 11:40:49 -080089 static int convertFromErrno();
San Mehatf1b736b2009-10-10 17:22:08 -070090};
91#endif