~ubuntu-branches/ubuntu/natty/orbit2/natty

« back to all changes in this revision

Viewing changes to src/services/name/CosNaming.idl

  • Committer: Bazaar Package Importer
  • Author(s): Chris Waters
  • Date: 2002-03-25 17:24:03 UTC
  • Revision ID: james.westby@ubuntu.com-20020325172403-8lexv63608acfqgt
Tags: upstream-2.3.107
ImportĀ upstreamĀ versionĀ 2.3.107

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef _CosNaming_IDL_
 
3
#define _CosNaming_IDL_
 
4
 
 
5
#pragma prefix "omg.org"
 
6
 
 
7
module CosNaming {
 
8
  typedef string Istring;
 
9
  struct NameComponent {
 
10
    Istring id;
 
11
    Istring kind;
 
12
  };
 
13
  
 
14
  typedef sequence<NameComponent> Name;
 
15
  
 
16
  enum BindingType {
 
17
    nobject,
 
18
    ncontext
 
19
  };
 
20
  
 
21
  struct Binding {
 
22
    Name binding_name;
 
23
    BindingType binding_type;
 
24
  };
 
25
  
 
26
  typedef sequence<Binding> BindingList;
 
27
  
 
28
  interface BindingIterator;
 
29
  
 
30
  interface NamingContext {
 
31
    enum NotFoundReason {
 
32
      missing_node,
 
33
      not_context,
 
34
      not_object
 
35
    };
 
36
    
 
37
    exception NotFound {
 
38
      NotFoundReason why;
 
39
      Name rest_of_name;
 
40
    };
 
41
    
 
42
    exception CannotProceed {
 
43
      NamingContext ctx;
 
44
      Name rest_of_name;
 
45
    };
 
46
    
 
47
    exception InvalidName{};
 
48
    exception AlreadyBound{};
 
49
    exception NotEmpty{};
 
50
    
 
51
    void bind(in Name n, in Object obj)
 
52
      raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
 
53
    void rebind(in Name n, in Object obj)
 
54
      raises(NotFound, CannotProceed, InvalidName);
 
55
    void bind_context(in Name n, in NamingContext nc)
 
56
      raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
 
57
    void rebind_context(in Name n, in NamingContext nc)
 
58
      raises(NotFound, CannotProceed, InvalidName);
 
59
    Object resolve(in Name n)
 
60
      raises(NotFound, CannotProceed, InvalidName);
 
61
    void unbind(in Name n)
 
62
      raises(NotFound, CannotProceed, InvalidName);
 
63
    NamingContext new_context();
 
64
    NamingContext bind_new_context(in Name n)
 
65
      raises(NotFound, AlreadyBound, CannotProceed, InvalidName);
 
66
    void destroy()
 
67
      raises(NotEmpty);
 
68
    void list(in unsigned long how_many, out BindingList bl, 
 
69
              out BindingIterator bi);
 
70
  };
 
71
  
 
72
  interface BindingIterator {
 
73
    boolean next_one(out Binding b);
 
74
    boolean next_n(in unsigned long how_many, out BindingList bl);
 
75
    void destroy();
 
76
  };
 
77
 
 
78
  interface NamingContextExt: NamingContext { 
 
79
    typedef string StringName; 
 
80
    typedef string Address; 
 
81
    typedef string URLString;
 
82
    
 
83
    StringName to_string(in Name n) 
 
84
      raises(InvalidName); 
 
85
    Name to_name(in StringName sn) 
 
86
      raises(InvalidName); 
 
87
 
 
88
    exception InvalidAddress {}; 
 
89
 
 
90
    URLString to_url(in Address addr, in StringName sn) 
 
91
      raises(InvalidAddress, InvalidName); 
 
92
    Object resolve_str(in StringName n) 
 
93
      raises( NotFound, CannotProceed, InvalidName ); 
 
94
  }; 
 
95
 
 
96
};
 
97
#endif /* !_CosNaming_IDL_ */