summaryrefslogtreecommitdiff
path: root/TAO/CIAO/ciao/HomeRegistrar_i.h
blob: 910c74b3dde899e3c1cb6a4b2f071d6053e4f6d8 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// $Id$

/**
 * @file HomeRegistrar_i.h
 *
 * A CIAO HomeFinder implementation that also support CIAO's home
 * registration operation.
 *
 * @sa HomeRegistrar.idl
 *
 * @author Nanbor Wang <nanbor@cs.wustl.edu>
 */

#ifndef CIAO_HOMEREGISTRAR_I_H
#define CIAO_HOMEREGISTRAR_I_H
#include /**/ "ace/pre.h"

#include "HomeRegistrarS.h"
#include <CosNamingC.h>

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

namespace CIAO
{
  class CIAO_SERVER_Export HomeRegistrar_Impl
    : public virtual POA_CIAO::HomeRegistrar,
      public virtual PortableServer::RefCountServantBase
  {
  public:
    /**
     * @brief We require a NamingContext to hold the names.
     */
    HomeRegistrar_Impl (CosNaming::NamingContext_ptr ns);

    /**
     * @brief Default destructor.
     */
    ~HomeRegistrar_Impl ();

    virtual ::Components::CCMHome_ptr find_home_by_component_type (const char * comp_repid
                                                                   ACE_ENV_ARG_DECL_WITH_DEFAULTS)
      ACE_THROW_SPEC ((CORBA::SystemException,
                       Components::HomeNotFound));

    virtual ::Components::CCMHome_ptr find_home_by_home_type (const char * home_repid
                                                              ACE_ENV_ARG_DECL_WITH_DEFAULTS)
      ACE_THROW_SPEC ((CORBA::SystemException,
                       Components::HomeNotFound));

    virtual ::Components::CCMHome_ptr find_home_by_name (const char * home_name
                                                         ACE_ENV_ARG_DECL_WITH_DEFAULTS)
      ACE_THROW_SPEC ((CORBA::SystemException,
                       Components::HomeNotFound));

    virtual void register_home (const char * home_repo_id,
                                const char * comp_repo_id,
                                const char * home_name,
                                CORBA::Object_ptr objref
                                ACE_ENV_ARG_DECL_WITH_DEFAULTS)
      ACE_THROW_SPEC ((CORBA::SystemException,
                       CIAO::AlreadyBound,
                       CIAO::InvalidName,
                       CIAO::HomeRegisterFailure));

    Components::CCMHome_ptr find_home_impl (const char *name
                                            ACE_ENV_ARG_DECL_WITH_DEFAULTS)
      ACE_THROW_SPEC ((CORBA::SystemException,
                       Components::HomeNotFound));

  protected:
    CosNaming::NamingContext_var ns_;
  };
}

#if defined (__ACE_INLINE__)
#include "HomeRegistrar_i.inl"
#endif /* !defined INLINE */

#include /**/ "ace/post.h"
#endif /* CIAO_HOMEREGISTRAR_I_H */