summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp
blob: 294f9a08c55ed965181bc50b87717a5d856bbfc3 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
/* -*- C++ -*- $Id$ */

#include "ace/Auto_Ptr.h"
#include "orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h"
#include "orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.h"
#include "Notify_EventChannel_i.h"

// Implementation skeleton constructor
TAO_Notify_SupplierAdmin_i::TAO_Notify_SupplierAdmin_i (TAO_Notify_EventChannel_i& myChannel)
  :myChannel_ (myChannel)
{
}

// Implementation skeleton destructor
TAO_Notify_SupplierAdmin_i::~TAO_Notify_SupplierAdmin_i (void)
{
}

TAO_Notify_Dispatcher&
TAO_Notify_SupplierAdmin_i::get_dispatcher (void)
{
  return *dispatcher_;
}

void
TAO_Notify_SupplierAdmin_i::init (CORBA::Environment &ACE_TRY_ENV)
{

  dispatcher_ = auto_ptr<TAO_Notify_Dispatcher>(TAO_Notify_Dispatcher::create (ACE_TRY_ENV));
  ACE_CHECK;

  dispatcher_->add_dispatcher (myChannel_.get_dispatcher ());
}

CosNotifyChannelAdmin::SupplierAdmin_ptr
TAO_Notify_SupplierAdmin_i::get_ref (CORBA::Environment &ACE_TRY_ENV)
{
  return _this (ACE_TRY_ENV);
}

CosNotifyChannelAdmin::AdminID TAO_Notify_SupplierAdmin_i::MyID (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
  {
    //Add your implementation here
    return 0;
  }

CosNotifyChannelAdmin::EventChannel_ptr TAO_Notify_SupplierAdmin_i::MyChannel (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
  {
    //Add your implementation here
    return 0;
  }

CosNotifyChannelAdmin::InterFilterGroupOperator TAO_Notify_SupplierAdmin_i::MyOperator (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
  {
    //Add your implementation here
    return myOperator_;
  }

CosNotifyChannelAdmin::ProxyIDSeq * TAO_Notify_SupplierAdmin_i::pull_consumers (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
  {
    //Add your implementation here
    return 0;
  }

CosNotifyChannelAdmin::ProxyIDSeq * TAO_Notify_SupplierAdmin_i::push_consumers (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
  {
    //Add your implementation here
    return 0;
  }

CosNotifyChannelAdmin::ProxyConsumer_ptr TAO_Notify_SupplierAdmin_i::get_proxy_consumer (
    CosNotifyChannelAdmin::ProxyID proxy_id,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosNotifyChannelAdmin::ProxyNotFound
  ))
  {
    //Add your implementation here
    return 0;
  }

CosNotifyChannelAdmin::ProxyConsumer_ptr TAO_Notify_SupplierAdmin_i::obtain_notification_pull_consumer (
    CosNotifyChannelAdmin::ClientType ctype,
    CosNotifyChannelAdmin::ProxyID_out proxy_id,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosNotifyChannelAdmin::AdminLimitExceeded
  ))

  {
    //Add your implementation here
    return 0;
  }

CosNotifyChannelAdmin::ProxyConsumer_ptr
TAO_Notify_SupplierAdmin_i::obtain_notification_push_consumer (
    CosNotifyChannelAdmin::ClientType ctype,
    CosNotifyChannelAdmin::ProxyID_out proxy_id,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosNotifyChannelAdmin::AdminLimitExceeded
  ))
  {
    //Add your implementation here
    CosNotifyChannelAdmin::ProxyConsumer_var proxyconsumer_ret;
    CORBA::Object_var obj;

    switch (ctype)
      {
      case CosNotifyChannelAdmin::ANY_EVENT:
        {
          TAO_Notify_ProxyPushConsumer_i* proxypushconsumer;
          ACE_NEW_THROW_EX (proxypushconsumer,
                            TAO_Notify_ProxyPushConsumer_i (*this),
                            CORBA::NO_MEMORY ());
          auto_ptr <TAO_Notify_ProxyPushConsumer_i> auto_proxypushcons;

          obj = proxypushconsumer->get_ref (ACE_TRY_ENV);
          ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxyConsumer::_nil ());

          proxyconsumer_ret =
            CosNotifyChannelAdmin::ProxyConsumer::_narrow (obj.in (),
                                                           ACE_TRY_ENV);
          ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxyConsumer::_nil ());
          obj._retn (); // giveup ownership.

          proxy_id = proxy_consumer_ids.get ();

          if (proxypushconsumer_map_.bind (proxy_id,
                                           proxypushconsumer) == -1)
            ACE_THROW_RETURN (CORBA::INTERNAL (),
                              CosNotifyChannelAdmin::ProxyConsumer::_nil ());
          auto_proxypushcons.release ();
        }
        break;
      case CosNotifyChannelAdmin::STRUCTURED_EVENT:
        break;
      case CosNotifyChannelAdmin::SEQUENCE_EVENT:
        break;
      default:
        break;
      }

    return proxyconsumer_ret._retn ();
  }

void TAO_Notify_SupplierAdmin_i::destroy (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
  {
    //Add your implementation here
  }

CosEventChannelAdmin::ProxyPushConsumer_ptr
TAO_Notify_SupplierAdmin_i::obtain_push_consumer (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  // Add your implementation here
  return 0;
}

CosEventChannelAdmin::ProxyPullConsumer_ptr
TAO_Notify_SupplierAdmin_i::obtain_pull_consumer (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  //Add your implementation here
  return 0;
}