The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1 | #ifndef DEVICE_TOOLS_AIDL_H |
| 2 | #define DEVICE_TOOLS_AIDL_H |
| 3 | |
Alexey Zaytsev | 0aa7fe6 | 2008-10-21 23:52:01 +0400 | [diff] [blame] | 4 | #include <string.h> |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 5 | #include <string> |
| 6 | #include <vector> |
| 7 | |
| 8 | using namespace std; |
| 9 | |
| 10 | enum { |
| 11 | COMPILE_AIDL, |
| 12 | PREPROCESS_AIDL |
| 13 | }; |
| 14 | |
| 15 | // This struct is the parsed version of the command line options |
| 16 | struct Options |
| 17 | { |
| 18 | int task; |
| 19 | bool failOnParcelable; |
| 20 | vector<string> importPaths; |
| 21 | vector<string> preprocessedFiles; |
| 22 | string inputFileName; |
| 23 | string outputFileName; |
The Android Open Source Project | ba87e3e | 2009-03-13 13:04:22 -0700 | [diff] [blame] | 24 | string outputBaseFolder; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 25 | string depFileName; |
Xavier Ducrohet | 18fff11 | 2011-08-25 11:58:17 -0700 | [diff] [blame] | 26 | bool autoDepFile; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 27 | |
| 28 | vector<string> filesToPreprocess; |
| 29 | }; |
| 30 | |
| 31 | // takes the inputs from the command line and fills in the Options struct |
| 32 | // Returns 0 on success, and nonzero on failure. |
| 33 | // It also prints the usage statement on failure. |
| 34 | int parse_options(int argc, const char* const* argv, Options *options); |
| 35 | |
| 36 | #endif // DEVICE_TOOLS_AIDL_H |