summaryrefslogtreecommitdiff
path: root/modules/CIAO/connectors/ami4ccm/examples/AMI/AMI_MyInterface_i.h
blob: 3eb2b2d04f8bd54297566a14bd182c94f5b7a026 (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
// $Id$

#ifndef AMI_MyInterface_i_H
#define AMI_MyInterface_i_H

#include "AMIS.h"
#include "ace/Task.h"

namespace CCM_CORBA_AMI_MyInterface_Impl
{
  //============================================================
  // Implementation of the AMI CORBA INTERFACE reply handler
  //============================================================
  class AMI_MyInterface_reply_handler : public POA_CCM_AMI::AMI_MyInterfaceHandler
  {
    public:
      AMI_MyInterface_reply_handler (
        ::CCM_AMI::AMI_MyInterface_callback_ptr interface_callback);
      ~AMI_MyInterface_reply_handler (void);

      void
      do_something_with_something (
        CORBA::Float result);

      void
      do_something_with_something_excep (
        ::Messaging::ExceptionHolder * excep_holder);

    private:
      ::CCM_AMI::AMI_MyInterface_callback_var interface_callback_;
  };

  class AMI_MyInterface_i : public POA_CCM_AMI::MyInterface
  {
  public:
    /// ctor
    AMI_MyInterface_i (
      CORBA::ORB_ptr orb,
      ::CCM_AMI::MyInterface_ptr interface_receiver);

  CORBA::Float
  do_something_with_something (
    CORBA::Short something);

  private:
    CORBA::ORB_var orb_;
    ::CCM_AMI::MyInterface_var interface_receiver_;
  };

  // CORBA server which delivers the MyInterface interface
  class CORBA_MyInterface_server : public ACE_Task_Base
  {
    public:
      CORBA_MyInterface_server (
    ::CCM_AMI::MyInterface_ptr interface_receiver);
      virtual int svc (void);

    private:
    ::CCM_AMI::MyInterface_var interface_receiver_;
  };
};
#endif /* AMI_MyInterface_i_H */