summaryrefslogtreecommitdiff
path: root/CIAO/tests/CIF/Common/CIF_Common.h
blob: e5692f4234dbe21c71582166dc9e31826b9f3a6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef CIF_COMMON_H_
#define CIF_COMMON_H_

#include "CIF_Common_export.h"
#include "orbsvcs/CosNamingC.h"
#include "ccm/ComponentsC.h"
#include "Component/CIF_ComponentC.h"

class CIF_COMMON_Export CIF_Common
{
public:
    CIF_Common (void);
    ~CIF_Common (void);

    int init (int argc,
              ACE_TCHAR *argv[]);

    void shutdown ();

    ::Components::Navigation_ptr get_navigation_interface (void);
    ::Components::Receptacles_ptr get_receptacle_interface (void);
    ::Components::Events_ptr get_events_interface (bool source);
    ::CORBA::Object_ptr get_provider_cmp (void);
    ::CORBA::Object_ptr get_user_cmp (void);

    int test_provider_component (void);
    int test_user_component (void);

private:
    ::CORBA::ORB_var orb_;

    ::CIF::CIF_User_var     user_object_;
    ::CIF::CIF_Provider_var provider_object_;

    ACE_TCHAR * naming_;

    int init_provider_component (::CosNaming::NamingContext_ptr naming_context);
    int init_user_component (::CosNaming::NamingContext_ptr naming_context);

    int parse_args (int argc, ACE_TCHAR *argv[]);
};

#endif