summaryrefslogtreecommitdiff
path: root/ResponseCode.h (plain)
blob: 52faf9a4d05f757cf936bd074c7384e6c3ceef0d
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
20class ResponseCode {
21public:
22 // 100 series - Requestion action was initiated; expect another reply
23 // before proceeding with a new command.
24 static const int ActionInitiated = 100;
25
26 static const int VolumeListResult = 110;
27
28 // 200 series - Requested action has been successfully completed
29 static const int CommandOkay = 200;
30 static const int ShareStatusResult = 210;
31
32 // 400 series - The command was accepted but the requested action
33 // did not take place.
34 static const int OperationFailed = 400;
35 static const int OpFailedNoMedia = 401;
36 static const int OpFailedMediaBlank = 402;
37 static const int OpFailedMediaCorrupt = 403;
38 static const int OpFailedVolNotMounted = 404;
39 static const int OpFailedStorageBusy = 405;
40 static const int OpFailedStorageNotFound = 406;
41
42 // 500 series - The command was not accepted and the requested
43 // action did not take place.
44 static const int CommandSyntaxError = 500;
45 static const int CommandParameterError = 501;
46 static const int CommandNoPermission = 502;
47
48 // 600 series - Unsolicited broadcasts
49 static const int UnsolicitedInformational = 600;
50 static const int VolumeStateChange = 605;
51 static const int VolumeMountFailedBlank = 610;
52 static const int VolumeMountFailedDamaged = 611;
53 static const int VolumeMountFailedNoMedia = 612;
54 static const int VolumeUuidChange = 613;
55 static const int VolumeUserLabelChange = 614;
56
57 static const int ShareAvailabilityChange = 620;
58
59 static const int VolumeDiskInserted = 630;
60 static const int VolumeDiskRemoved = 631;
61 static const int VolumeBadRemoval = 632;
62
63 static const int DiskCreated = 640;
64 static const int DiskSizeChanged = 641;
65 static const int DiskLabelChanged = 642;
66 static const int DiskScanned = 643;
67 static const int DiskSysPathChanged = 644;
68 static const int DiskDestroyed = 649;
69
70 static const int VolumeCreated = 650;
71 static const int VolumeStateChanged = 651;
72 static const int VolumeFsTypeChanged = 652;
73 static const int VolumeFsUuidChanged = 653;
74 static const int VolumeFsLabelChanged = 654;
75 static const int VolumePathChanged = 655;
76 static const int VolumeInternalPathChanged = 656;
77 static const int VolumeDestroyed = 659;
78
79 static int convertFromErrno();
80};
81#endif
82