version 1.5, 2001/04/25 22:20:59
|
version 1.8, 2001/05/20 20:34:07
|
|
|
#include <Pegasus/Common/Selector.h> | #include <Pegasus/Common/Selector.h> |
#include <Pegasus/Common/OptionManager.h> | #include <Pegasus/Common/OptionManager.h> |
#include <Pegasus/Server/CIMServer.h> | #include <Pegasus/Server/CIMServer.h> |
|
#include <Pegasus/Common/PegasusVersion.h> |
| |
using namespace Pegasus; |
PEGASUS_USING_PEGASUS; |
using namespace std; |
PEGASUS_USING_STD; |
| |
const char PEGASUS_VERSION[] = "Pegasus CIM Server - Version 0.7"; |
// const char PEGASUS_VERSION[] = "Pegasus CIM Server - Version 0.7"; |
| |
void GetEnvironmentVariables( | void GetEnvironmentVariables( |
const char* arg0, | const char* arg0, |
|
|
void PrintHelp(const char* arg0) | void PrintHelp(const char* arg0) |
{ | { |
cout << '\n'; | cout << '\n'; |
cout << PEGASUS_VERSION << endl; |
cout << PEGASUS_NAME << PEGASUS_VERSION << endl; |
cout << '\n'; | cout << '\n'; |
cout << "Usage: " << arg0 << " [-port <port_num> -t -h -v]\n"; | cout << "Usage: " << arg0 << " [-port <port_num> -t -h -v]\n"; |
cout << '\n'; | cout << '\n'; |
|
|
CIMServer server(&selector, pegasusHome); | CIMServer server(&selector, pegasusHome); |
| |
char* address = portOption.allocateCString(); | char* address = portOption.allocateCString(); |
|
|
|
// Put out startup up message. |
|
// Put to cout if not daemon |
|
// ATTN: modify when we add daemon |
|
cout << PEGASUS_NAME << PEGASUS_VERSION << |
|
" on port " << address << endl; |
|
cout << "Built " << __DATE__ << " " << __TIME__ << endl; |
|
cout <<"Started..." <<endl; |
|
|
server.bind(address); | server.bind(address); |
delete [] address; | delete [] address; |
server.runForever(); | server.runForever(); |
} | } |
catch(Exception& e) | catch(Exception& e) |
{ | { |
std::cerr << "Error: " << e.getMessage() << std::endl; |
PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); |
} | } |
| |
return 0; | return 0; |