File: CosNaming.idl

package info (click to toggle)
omniorb-dfsg 4.3.3%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,172 kB
  • sloc: cpp: 115,843; python: 24,962; ansic: 13,414; sh: 2,665; makefile: 40
file content (117 lines) | stat: -rw-r--r-- 2,897 bytes parent folder | download | duplicates (11)
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
//
//                            Package   : omniORB3
// Naming.idl		     
//                            
//
//
// Description:
//	IDL interfaces for COSS Extended Naming Service
//	

#ifndef _COS_NAMING_IDL_
#define _COS_NAMING_IDL_

// omniORB specific pragmas to insert extra includes into the stub header.
#pragma hh #include "COS_sysdep.h"


#pragma prefix "omg.org"

module CosNaming {

  typedef string Istring;

  struct NameComponent {
    Istring id;
    Istring kind;
  };

  typedef sequence<NameComponent> Name;

  enum BindingType {nobject, ncontext};

  struct Binding {
    Name        binding_name;
    BindingType binding_type;
  };
  // Note: In struct Binding, binding_name is incorrectly defined
  // as a Name instead of a NameComponent. This definition is
  // unchanged for compatibility reasons.

  typedef sequence <Binding> BindingList;

  interface BindingIterator;

  interface NamingContext {

    enum NotFoundReason {missing_node, not_context, not_object};

    exception NotFound {
      NotFoundReason why;
      Name           rest_of_name;
    };

    exception CannotProceed {
      NamingContext cxt;
      Name          rest_of_name;
    };

    exception InvalidName {};
    exception AlreadyBound {};
    exception NotEmpty {};

    void bind (in Name n, in Object obj)
      raises (NotFound, CannotProceed, InvalidName, AlreadyBound);

    void rebind (in Name n, in Object obj)
      raises (NotFound, CannotProceed, InvalidName);

    void bind_context (in Name n, in NamingContext nc)
      raises (NotFound, CannotProceed,  InvalidName, AlreadyBound);

    void rebind_context (in Name n, in NamingContext nc)
      raises (NotFound, CannotProceed, InvalidName);

    Object resolve (in Name n)
      raises (NotFound, CannotProceed, InvalidName);

    void unbind (in Name n)
      raises (NotFound, CannotProceed, InvalidName);

    NamingContext new_context ();

    NamingContext bind_new_context (in Name n)
      raises (NotFound, CannotProceed, InvalidName, AlreadyBound);

    void destroy () raises (NotEmpty);

    void list (in unsigned long how_many,
	       out BindingList bl, out BindingIterator bi);
  };

	
  interface BindingIterator {
    boolean next_one (out Binding b);
    boolean next_n   (in unsigned long how_many, out BindingList bl);
    void    destroy  ();
  };

  interface NamingContextExt : NamingContext {
    typedef string StringName;
    typedef string Address;
    typedef string URLString;

    StringName  to_string(in Name n)      raises(InvalidName);
    Name        to_name(in StringName sn) raises(InvalidName);

    exception InvalidAddress {};

    URLString   to_url(in Address addr, in StringName sn)
      raises(InvalidAddress, InvalidName);

    Object      resolve_str(in StringName n)
      raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
  };
};

#endif /* ifndef _COS_NAMING_IDL_ */