source: sample/pingpong/main.cpp@ 4763

Last change on this file since 4763 was 4763, checked in by Christoph Mayer, 15 years ago

avahi optional

File size: 975 bytes
Line 
1#include <string>
2#include "ariba/utility/system/StartupWrapper.h"
3#include "PingPong.h"
4
5using std::string;
6using ariba::utility::StartupWrapper;
7using ariba::application::pingpong::PingPong;
8
9#include "ariba/utility/bootstrap/BootstrapManager.h"
10using ariba::utility::BootstrapManager;
11
12int main( int argc, char** argv ) {
13
14/*
15 StartupWrapper::startSystem();
16 BootstrapManager::instance().registerModule(
17 BootstrapManager::BootstrapTypeMulticastDns);
18 BootstrapManager::instance().publish("testname", "testinfo");
19 getchar();
20 StartupWrapper::stopSystem();
21 return 0;
22*/
23
24
25 // get config file
26 string config = "../etc/settings.cnf";
27 if (argc >= 2) config = argv[1];
28
29 StartupWrapper::initConfig( config );
30 StartupWrapper::startSystem();
31
32 // this will do the main functionality and block
33 PingPong ping;
34 StartupWrapper::startup(&ping);
35
36 // --> we will run blocking until <enter> is hit
37
38 StartupWrapper::shutdown(&ping);
39 StartupWrapper::stopSystem();
40
41 return 0;
42}
Note: See TracBrowser for help on using the repository browser.