| 42 | using namespace sdbuscpp; |
| 43 | |
| 44 | void usage(std::ostream& output, const char* programName) |
| 45 | { |
| 46 | output << "Usage: " << programName << " [OPTION]... [FILE]" << endl << |
| 47 | "Creates C++ stubs for DBus API for adaptor and/or client" << endl << |
| 48 | endl << |
| 49 | "Available options:" << endl << |
| 50 | " --proxy=FILE Generate header file FILE with proxy class (client)" << endl << |
| 51 | " --adaptor=FILE Generate header file FILE with stub class (server)" << endl << |
| 52 | " -h, --help " << endl << |
| 53 | " --verbose Explain what is being done" << endl << |
| 54 | " -v, --version Prints out sdbus-c++ version used by the tool" << endl << |
| 55 | endl << |
| 56 | "The stub generator takes an XML file describing DBus interface and creates" << endl << |
| 57 | "C++ header files to be used by C++ code wanting to cumminicate through that" << endl << |
| 58 | "interface. Clients of the interface (those making the calls) need header" << endl << |
| 59 | "created with the --proxy option as this header forwards the calls via DBus" << endl << |
| 60 | "to provider of the service and the returns the result to the caller. Server" << endl << |
| 61 | "implementing the service should derive from interface classes in header" << endl << |
| 62 | "generated for --adaptor option and implement their methods." << endl << |
| 63 | endl << |
| 64 | "When FILE is not specified, standard input is read. Exit status is 0 when" << endl << |
| 65 | "no error was encountered and all requested headers were sucessfully generated." << endl << |
| 66 | "Otherwise 1 is returned." << endl; |
| 67 | } |
| 68 | |
| 69 | |
| 70 | int main(int argc, char **argv) |