summaryrefslogtreecommitdiff
path: root/tools/introspect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/introspect.cpp')
-rw-r--r--tools/introspect.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/tools/introspect.cpp b/tools/introspect.cpp
index 8ce9f3a..a994ae1 100644
--- a/tools/introspect.cpp
+++ b/tools/introspect.cpp
@@ -34,46 +34,46 @@ static char *service;
void niam(int sig)
{
- DBus::Connection conn = systembus ? DBus::Connection::SystemBus() : DBus::Connection::SessionBus();
+ DBus::Connection conn = systembus ? DBus::Connection::SystemBus() : DBus::Connection::SessionBus();
- IntrospectedObject io(conn, path, service);
+ IntrospectedObject io(conn, path, service);
- std::cout << io.Introspect();
+ std::cout << io.Introspect();
- dispatcher.leave();
+ dispatcher.leave();
}
-int main(int argc, char ** argv)
+int main(int argc, char **argv)
{
- signal(SIGTERM, niam);
- signal(SIGINT, niam);
- signal(SIGALRM, niam);
+ signal(SIGTERM, niam);
+ signal(SIGINT, niam);
+ signal(SIGALRM, niam);
- if (argc == 1)
- {
- std::cerr << std::endl << "Usage: " << argv[0] << " [--system] <object_path> [<destination>]" << std::endl << std::endl;
- }
- else
- {
- if (strcmp(argv[1], "--system"))
- {
- systembus = false;
- path = argv[1];
- service = argc > 2 ? argv[2] : 0;
- }
- else
- {
- systembus = true;
- path = argv[2];
- service = argc > 3 ? argv[3] : 0;
- }
+ if (argc == 1)
+ {
+ std::cerr << std::endl << "Usage: " << argv[0] << " [--system] <object_path> [<destination>]" << std::endl << std::endl;
+ }
+ else
+ {
+ if (strcmp(argv[1], "--system"))
+ {
+ systembus = false;
+ path = argv[1];
+ service = argc > 2 ? argv[2] : 0;
+ }
+ else
+ {
+ systembus = true;
+ path = argv[2];
+ service = argc > 3 ? argv[3] : 0;
+ }
- DBus::default_dispatcher = &dispatcher;
+ DBus::default_dispatcher = &dispatcher;
- alarm(1);
+ alarm(1);
- dispatcher.enter();
- }
+ dispatcher.enter();
+ }
- return 0;
+ return 0;
}