Line | |
---|
1 | // XmlIOServer |
---|
2 | #include "xmlioserver.hpp" |
---|
3 | |
---|
4 | #include "attribute_template_impl.hpp" |
---|
5 | #include "group_template_impl.hpp" |
---|
6 | |
---|
7 | #include "client.hpp" |
---|
8 | #include "server.hpp" |
---|
9 | |
---|
10 | #include "fake.hpp" |
---|
11 | |
---|
12 | // Point d'entrée du programme principal |
---|
13 | int main(int argc, char ** argv, char ** UNUSED(env)) |
---|
14 | { |
---|
15 | try |
---|
16 | { |
---|
17 | comm::CMPIManager::Initialise(&argc, &argv); // < seulement en mode connecté |
---|
18 | |
---|
19 | if (comm::CMPIManager::IsMaster(comm::CMPIManager::GetCommWorld())) |
---|
20 | { |
---|
21 | comm::CServer server(comm::CMPIManager::GetCommWorld()); |
---|
22 | server.run(); |
---|
23 | std::cout << "fin serveur" << std::endl; |
---|
24 | |
---|
25 | } |
---|
26 | else |
---|
27 | { |
---|
28 | comm::CClient client(comm::CMPIManager::GetCommWorld()); |
---|
29 | client.initialize(); |
---|
30 | client.finalize(); |
---|
31 | } |
---|
32 | |
---|
33 | comm::CMPIManager::Finalize(); // < seulement en mode connecté |
---|
34 | |
---|
35 | |
---|
36 | /*CXIOSManager::Initialise(CXIOSManager::CLIENT_SERVER, &argc, &argv); |
---|
37 | |
---|
38 | CXIOSManager::AddClient("nemo" , 4, 2, &nemo_fake_entry); |
---|
39 | //CXIOSManager::AddClient("orchidee", 1, 1, &orchidee_fake_entry); |
---|
40 | //CXIOSManager::AddClient("lmdz" , 4, 2, &lmdz_fake_entry); |
---|
41 | CXIOSManager::RunClientServer(comm::CMPIManager::GetCommWorld()); |
---|
42 | CXIOSManager::Finalize();*/ |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | } |
---|
47 | catch (CException & exc) |
---|
48 | { |
---|
49 | std::cerr << exc.getMessage() << std::endl; |
---|
50 | CMPIManager::Finalize(); |
---|
51 | return (EXIT_FAILURE); |
---|
52 | } |
---|
53 | return (EXIT_SUCCESS); |
---|
54 | } |
---|
55 | |
---|
Note: See
TracBrowser
for help on using the repository browser.