This file is indexed.

/usr/include/omniORB4/CORBA_ORB.h is in libomniorb4-dev 4.1.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
// -*- Mode: C++; -*-
//                            Package   : omniORB
// CORBA_ORB.h                Created on: 2001/08/17
//                            Author    : Duncan Grisby (dpg1)
//
//    Copyright (C) 2003-2005 Apasphere Ltd
//    Copyright (C) 2001      AT&T Laboratories Cambridge
//
//    This file is part of the omniORB library
//
//    The omniORB library is free software; you can redistribute it and/or
//    modify it under the terms of the GNU Library General Public
//    License as published by the Free Software Foundation; either
//    version 2 of the License, or (at your option) any later version.
//
//    This library is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//    Library General Public License for more details.
//
//    You should have received a copy of the GNU Library General Public
//    License along with this library; if not, write to the Free
//    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
//    02111-1307, USA
//
//
// Description:
//    CORBA::ORB
//

/*
  $Log$
  Revision 1.1.4.4  2005/01/06 23:08:06  dgrisby
  Big merge from omni4_0_develop.

  Revision 1.1.4.3  2004/04/02 13:26:25  dgrisby
  Start refactoring TypeCode to support value TypeCodes, start of
  abstract interfaces support.

  Revision 1.1.4.2  2003/09/26 16:12:53  dgrisby
  Start of valuetype support.

  Revision 1.1.4.1  2003/03/23 21:04:24  dgrisby
  Start of omniORB 4.1.x development branch.

  Revision 1.1.2.6  2001/11/13 14:11:43  dpg1
  Tweaks for CORBA 2.5 compliance.

  Revision 1.1.2.5  2001/11/06 15:41:34  dpg1
  Reimplement Context. Remove CORBA::Status. Tidying up.

  Revision 1.1.2.4  2001/10/29 17:42:35  dpg1
  Support forward-declared structs/unions, ORB::create_recursive_tc().

  Revision 1.1.2.3  2001/10/17 16:44:00  dpg1
  Update DynAny to CORBA 2.5 spec, const Any exception extraction.

  Revision 1.1.2.2  2001/08/17 17:00:50  sll
  ORB_init now takes an extra options argument.

  Revision 1.1.2.1  2001/08/17 13:39:47  dpg1
  Split CORBA.h into separate bits.

*/

#ifndef INSIDE_OMNIORB_CORBA_MODULE
#  error "Must only be #included by CORBA.h"
#endif

//////////////////////////////////////////////////////////////////////
///////////////////////////////// ORB ////////////////////////////////
//////////////////////////////////////////////////////////////////////

class ORB;
class ORB_var;
typedef ORB* ORB_ptr;
typedef ORB_ptr ORBRef;

class ORB : public Object {
public:
  typedef ORB_ptr _ptr_type;
  typedef ORB_var _var_type;

  typedef char* OAid;

  typedef char* ObjectId;
  typedef String_var ObjectId_var;

  typedef _CORBA_Pseudo_Unbounded_Sequence<Request,Request_member> RequestSeq;

  OMNIORB_DECLARE_USER_EXCEPTION_IN_CORBA(InvalidName, _core_attr)
  OMNIORB_DECLARE_USER_EXCEPTION_IN_CORBA(InconsistentTypeCode, _dyn_attr)

  ///////////////////////
  // ORB::ObjectIdList //
  ///////////////////////

  class ObjectIdList_var;

  class ObjectIdList : public _CORBA_Unbounded_Sequence_String {
  public:
    typedef ObjectIdList_var _var_type;
    inline ObjectIdList() {}
    inline ObjectIdList(const ObjectIdList& seq)
      : _CORBA_Unbounded_Sequence_String(seq) {}
    inline ObjectIdList(ULong max)
      : _CORBA_Unbounded_Sequence_String(max) {}
    inline ObjectIdList(ULong max, ULong len, char** val,
			Boolean rel=0)
      : _CORBA_Unbounded_Sequence_String(max, len, val, rel) {}
    inline ObjectIdList& operator = (const ObjectIdList& seq) {
      _CORBA_Unbounded_Sequence_String::operator=(seq);
      return *this;
    }
  };

  class ObjectIdList_out;

  class ObjectIdList_var {
  public:
    typedef ObjectIdList T;
    typedef ObjectIdList_var T_var;

    inline ObjectIdList_var() : pd_seq(0) {}
    inline ObjectIdList_var(T* s) : pd_seq(s) {}
    inline ObjectIdList_var(const T_var& sv) {
      if( sv.pd_seq ) {
	pd_seq = new T;
	*pd_seq = *sv.pd_seq;
      } else
	pd_seq = 0;
    }
    inline ~ObjectIdList_var() { if( pd_seq ) delete pd_seq; }

    inline T_var& operator = (T* s) {
      if( pd_seq )  delete pd_seq;
      pd_seq = s;
      return *this;
    }
    inline T_var& operator = (const T_var& sv) {
      if( sv.pd_seq ) {
	if( !pd_seq )  pd_seq = new T;
	*pd_seq = *sv.pd_seq;
      } else if( pd_seq ) {
	delete pd_seq;
	pd_seq = 0;
      }
      return *this;
    }

    inline _CORBA_String_element operator [] (_CORBA_ULong i) {   return (*pd_seq)[i]; }
    inline T* operator -> () { return pd_seq; }
#if defined(__GNUG__) && __GNUG__ == 2 && __GNUC_MINOR__ == 7
    inline operator T& () const { return *pd_seq; }
#else
    inline operator const T& () const { return *pd_seq; }
    inline operator T& () { return *pd_seq; }
#endif

    inline const T& in() const { return *pd_seq; }
    inline T&       inout()    { return *pd_seq; }
    inline T*& out() { if (pd_seq) { delete pd_seq; pd_seq = 0; } return pd_seq; }
    inline T* _retn() { T* tmp = pd_seq; pd_seq = 0; return tmp; }

    friend class ObjectIdList_out;

  private:
    T* pd_seq;
  };

  class ObjectIdList_out {
  public:
    typedef ObjectIdList T;
    typedef ObjectIdList_var T_var;

    inline ObjectIdList_out(T*& s) : _data(s) { _data = 0; }
    inline ObjectIdList_out(T_var& sv)
      : _data(sv.pd_seq) { sv = (T*) 0; }
    inline ObjectIdList_out(const ObjectIdList_out& s) : _data(s._data) {}
    inline ObjectIdList_out& operator=(const ObjectIdList_out& s) {
      _data = s._data; return *this;
    }
    inline ObjectIdList_out& operator=(T* s) { _data = s; return *this; }
    inline operator T*&() { return _data; }
    inline T*& ptr() { return _data; }
    inline T* operator->() { return _data; }
    inline _CORBA_String_element operator [] (_CORBA_ULong i) {
      return (*_data)[i];
    }
    T*& _data;

  private:
    ObjectIdList_out();
    ObjectIdList_out operator=(const T_var&);
  };

  /////////////////
  // ORB Methods //
  /////////////////

  static _ptr_type _duplicate(_ptr_type);
  static _ptr_type _narrow(Object_ptr);
  static _ptr_type _nil();

  virtual char* id() = 0;

  virtual char* object_to_string(Object_ptr) = 0;
  virtual Object_ptr string_to_object(const char*) = 0;

  virtual ObjectIdList* list_initial_services() = 0;
  virtual Object_ptr resolve_initial_references(const char* identifier) = 0;

  virtual Boolean work_pending() = 0;
  virtual void perform_work() = 0;
  virtual void run() = 0;
  virtual void shutdown(Boolean wait_for_completion) = 0;
  virtual void destroy() = 0;

  inline void NP_destroy() { destroy(); }
  // Deprecated omniORB specific method.  Use 'destroy()'.

  BOA_ptr BOA_init(int& argc, char** argv, const char* boa_identifier=0);

  void create_list(Long, NVList_out);
  void create_operation_list(_objref_OperationDef*, // OperationDef_ptr
			     NVList_out);
  void create_named_value(NamedValue_out);
  void create_exception_list(ExceptionList_out);
  void create_context_list(ContextList_out);

  void get_default_context(Context_out context_out);
  // Returns a reference to the default context, which should be
  // released when finished with.

  void create_environment(Environment_out);

  void send_multiple_requests_oneway(const RequestSeq&);
  void send_multiple_requests_deferred(const RequestSeq&);
  Boolean poll_next_response();
  void get_next_response(Request_out);

  TypeCode_ptr create_struct_tc(const char* id, const char* name,
				const StructMemberSeq& members);
  TypeCode_ptr create_union_tc(const char* id, const char* name,
			       TypeCode_ptr discriminator_type,
			       const UnionMemberSeq& members);
  TypeCode_ptr create_enum_tc(const char* id, const char* name,
			      const EnumMemberSeq& members);
  TypeCode_ptr create_alias_tc(const char* id, const char* name,
			       TypeCode_ptr original_type);
  TypeCode_ptr create_exception_tc(const char* id, const char* name,
				   const StructMemberSeq& members);
  TypeCode_ptr create_interface_tc(const char* id, const char* name);
  TypeCode_ptr create_string_tc(ULong bound);
  TypeCode_ptr create_wstring_tc(ULong bound);
  TypeCode_ptr create_fixed_tc(UShort digits, Short scale);
  TypeCode_ptr create_sequence_tc(ULong bound,
				  TypeCode_ptr element_type);
  TypeCode_ptr create_recursive_sequence_tc(ULong bound, ULong offset);
  // deprecated

  TypeCode_ptr create_array_tc(ULong length, TypeCode_ptr etype);

  TypeCode_ptr create_value_tc(const char* id, const char* name,
			       ValueModifier type_modifier,
			       TypeCode_ptr concrete_base,
			       const ValueMemberSeq& members);

  TypeCode_ptr create_value_box_tc(const char* id, const char* name,
				   TypeCode_ptr boxed_type);

#if 0
  TypeCode_ptr create_native_tc(const char* id, const char* name);
#endif

  TypeCode_ptr create_recursive_tc(const char* id);

  TypeCode_ptr create_abstract_interface_tc(const char* id, const char* name);

  TypeCode_ptr create_local_interface_tc(const char* id, const char* name);
  

  Policy_ptr create_policy(PolicyType,const Any&);

  ValueFactory register_value_factory(const char* id,
				      ValueFactory factory);

  void unregister_value_factory(const char* id);

  ValueFactory lookup_value_factory(const char* id);

  virtual void register_initial_reference(const char* id, Object_ptr obj) = 0;
    
  // omniORB internal.
  static _core_attr const char* _PD_repoId;
  virtual ~ORB();

protected:
  inline ORB(int is_nil) {
    if (is_nil)
      _PR_setobj((omniObjRef*)0);
    else
      _PR_setobj((omniObjRef*)1);
  }

private:
  ORB(const ORB&);
  ORB& operator = (const ORB&);
};

typedef char* ORBid;
typedef String_var ORBid_var;

_CORBA_MODULE_FN ORB_ptr ORB_init(int& argc, char** argv,
				  const char* orb_identifier="",
				  const char* options[][2]=0);