~ubuntu-branches/ubuntu/raring/babel/raring-proposed

« back to all changes in this revision

Viewing changes to runtime/sidlx/sidlx_rmi_IPv4Socket_Stub.c

  • Committer: Bazaar Package Importer
  • Author(s): Adam C. Powell, IV
  • Date: 2008-08-01 07:56:58 UTC
  • mfrom: (3.1.2 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080801075658-9ezcrbh8dcs8lg70
Tags: 1.2.0.dfsg-6
Added libparsifal-dev as dependency to libsidl-dev (closes: #483324).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * File:          sidlx_rmi_IPv4Socket_Stub.c
 
3
 * Symbol:        sidlx.rmi.IPv4Socket-v0.1
 
4
 * Symbol Type:   class
 
5
 * Babel Version: 1.2.0
 
6
 * Description:   Client-side glue code for sidlx.rmi.IPv4Socket
 
7
 * 
 
8
 * WARNING: Automatically generated; changes will be lost
 
9
 * 
 
10
 */
 
11
 
 
12
#include "sidlx_rmi_IPv4Socket.h"
 
13
#include "sidlx_rmi_IPv4Socket_IOR.h"
 
14
#ifndef included_sidl_interface_IOR_h
 
15
#include "sidl_interface_IOR.h"
 
16
#endif
 
17
#ifndef included_sidl_rmi_InstanceHandle_h
 
18
#include "sidl_rmi_InstanceHandle.h"
 
19
#endif
 
20
#ifndef included_sidl_rmi_ConnectRegistry_h
 
21
#include "sidl_rmi_ConnectRegistry.h"
 
22
#endif
 
23
#include "sidl_Exception.h"
 
24
#ifndef included_sidl_interface_IOR_h
 
25
#include "sidl_interface_IOR.h"
 
26
#endif
 
27
#include <stddef.h>
 
28
#include <string.h>
 
29
#include "sidl_BaseInterface_IOR.h"
 
30
#include "babel_config.h"
 
31
#ifdef SIDL_DYNAMIC_LIBRARY
 
32
#include <stdio.h>
 
33
#include <stdlib.h>
 
34
#include "sidl_Loader.h"
 
35
#endif
 
36
 
 
37
#define LANG_SPECIFIC_INIT()
 
38
 
 
39
/*
 
40
 * Hold pointer to IOR functions.
 
41
 */
 
42
 
 
43
static const struct sidlx_rmi_IPv4Socket__external *_externals = NULL;
 
44
/*
 
45
 * Lookup the symbol to get the IOR functions.
 
46
 */
 
47
 
 
48
static const struct sidlx_rmi_IPv4Socket__external* _loadIOR(void)
 
49
/*
 
50
 * Return pointer to internal IOR functions.
 
51
 */
 
52
 
 
53
{
 
54
#ifdef SIDL_STATIC_LIBRARY
 
55
  _externals = sidlx_rmi_IPv4Socket__externals();
 
56
#else
 
57
  _externals = (struct sidlx_rmi_IPv4Socket__external*)sidl_dynamicLoadIOR(
 
58
    "sidlx.rmi.IPv4Socket","sidlx_rmi_IPv4Socket__externals") ;
 
59
  sidl_checkIORVersion("sidlx.rmi.IPv4Socket", _externals->d_ior_major_version, 
 
60
    _externals->d_ior_minor_version, 2, 0);
 
61
#endif
 
62
  return _externals;
 
63
}
 
64
 
 
65
#define _getExternals() (_externals ? _externals : _loadIOR())
 
66
 
 
67
/*
 
68
 * Constructor function for the class.
 
69
 */
 
70
 
 
71
sidlx_rmi_IPv4Socket
 
72
sidlx_rmi_IPv4Socket__create(sidl_BaseInterface* _ex)
 
73
{
 
74
  return (*(_getExternals()->createObject))(NULL,_ex);
 
75
}
 
76
 
 
77
/**
 
78
 * Wraps up the private data struct pointer (struct sidlx_rmi_IPv4Socket__data) passed in rather than running the constructor.
 
79
 */
 
80
sidlx_rmi_IPv4Socket
 
81
sidlx_rmi_IPv4Socket__wrapObj(void* data, sidl_BaseInterface* _ex)
 
82
{
 
83
  return (*(_getExternals()->createObject))(data,_ex);
 
84
}
 
85
 
 
86
#ifdef WITH_RMI
 
87
 
 
88
static sidlx_rmi_IPv4Socket sidlx_rmi_IPv4Socket__remoteCreate(const char* url, 
 
89
  sidl_BaseInterface *_ex);
 
90
/*
 
91
 * RMI constructor function for the class.
 
92
 */
 
93
 
 
94
sidlx_rmi_IPv4Socket
 
95
sidlx_rmi_IPv4Socket__createRemote(const char* url, sidl_BaseInterface *_ex)
 
96
{
 
97
  return sidlx_rmi_IPv4Socket__remoteCreate(url, _ex);
 
98
}
 
99
 
 
100
static struct sidlx_rmi_IPv4Socket__object* sidlx_rmi_IPv4Socket__remoteConnect(
 
101
  const char* url, sidl_bool ar, sidl_BaseInterface *_ex);
 
102
static struct sidlx_rmi_IPv4Socket__object* sidlx_rmi_IPv4Socket__IHConnect(
 
103
  struct sidl_rmi_InstanceHandle__object* instance, sidl_BaseInterface *_ex);
 
104
/*
 
105
 * RMI connector function for the class.
 
106
 */
 
107
 
 
108
sidlx_rmi_IPv4Socket
 
109
sidlx_rmi_IPv4Socket__connect(const char* url, sidl_BaseInterface *_ex)
 
110
{
 
111
  return sidlx_rmi_IPv4Socket__remoteConnect(url, TRUE, _ex);
 
112
}
 
113
 
 
114
#endif /*WITH_RMI*/
 
115
 
 
116
/*
 
117
 * Method:  getsockname[]
 
118
 */
 
119
 
 
120
SIDL_C_INLINE_DEFN
 
121
int32_t
 
122
sidlx_rmi_IPv4Socket_getsockname(
 
123
  /* in */ sidlx_rmi_IPv4Socket self,
 
124
  /* inout */ int32_t* address,
 
125
  /* inout */ int32_t* port,
 
126
  /* out */ sidl_BaseInterface *_ex)
 
127
#if SIDL_C_INLINE_REPEAT_DEFN
 
128
{
 
129
  int32_t _result;
 
130
  _result = (*self->d_epv->f_getsockname)(
 
131
    self,
 
132
    address,
 
133
    port,
 
134
    _ex);
 
135
  return _result;
 
136
}
 
137
#else /* ISO C 1999 inline semantics */
 
138
;
 
139
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
140
 
 
141
/*
 
142
 * Method:  getpeername[]
 
143
 */
 
144
 
 
145
SIDL_C_INLINE_DEFN
 
146
int32_t
 
147
sidlx_rmi_IPv4Socket_getpeername(
 
148
  /* in */ sidlx_rmi_IPv4Socket self,
 
149
  /* inout */ int32_t* address,
 
150
  /* inout */ int32_t* port,
 
151
  /* out */ sidl_BaseInterface *_ex)
 
152
#if SIDL_C_INLINE_REPEAT_DEFN
 
153
{
 
154
  int32_t _result;
 
155
  _result = (*self->d_epv->f_getpeername)(
 
156
    self,
 
157
    address,
 
158
    port,
 
159
    _ex);
 
160
  return _result;
 
161
}
 
162
#else /* ISO C 1999 inline semantics */
 
163
;
 
164
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
165
 
 
166
/*
 
167
 * <p>
 
168
 * Add one to the intrinsic reference count in the underlying object.
 
169
 * Object in <code>sidl</code> have an intrinsic reference count.
 
170
 * Objects continue to exist as long as the reference count is
 
171
 * positive. Clients should call this method whenever they
 
172
 * create another ongoing reference to an object or interface.
 
173
 * </p>
 
174
 * <p>
 
175
 * This does not have a return value because there is no language
 
176
 * independent type that can refer to an interface or a
 
177
 * class.
 
178
 * </p>
 
179
 */
 
180
 
 
181
SIDL_C_INLINE_DEFN
 
182
void
 
183
sidlx_rmi_IPv4Socket_addRef(
 
184
  /* in */ sidlx_rmi_IPv4Socket self,
 
185
  /* out */ sidl_BaseInterface *_ex)
 
186
#if SIDL_C_INLINE_REPEAT_DEFN
 
187
{
 
188
  (*self->d_epv->f_addRef)(
 
189
    self,
 
190
    _ex);
 
191
}
 
192
#else /* ISO C 1999 inline semantics */
 
193
;
 
194
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
195
 
 
196
/*
 
197
 * Decrease by one the intrinsic reference count in the underlying
 
198
 * object, and delete the object if the reference is non-positive.
 
199
 * Objects in <code>sidl</code> have an intrinsic reference count.
 
200
 * Clients should call this method whenever they remove a
 
201
 * reference to an object or interface.
 
202
 */
 
203
 
 
204
SIDL_C_INLINE_DEFN
 
205
void
 
206
sidlx_rmi_IPv4Socket_deleteRef(
 
207
  /* in */ sidlx_rmi_IPv4Socket self,
 
208
  /* out */ sidl_BaseInterface *_ex)
 
209
#if SIDL_C_INLINE_REPEAT_DEFN
 
210
{
 
211
  (*self->d_epv->f_deleteRef)(
 
212
    self,
 
213
    _ex);
 
214
}
 
215
#else /* ISO C 1999 inline semantics */
 
216
;
 
217
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
218
 
 
219
/*
 
220
 * Return true if and only if <code>obj</code> refers to the same
 
221
 * object as this object.
 
222
 */
 
223
 
 
224
SIDL_C_INLINE_DEFN
 
225
sidl_bool
 
226
sidlx_rmi_IPv4Socket_isSame(
 
227
  /* in */ sidlx_rmi_IPv4Socket self,
 
228
  /* in */ sidl_BaseInterface iobj,
 
229
  /* out */ sidl_BaseInterface *_ex)
 
230
#if SIDL_C_INLINE_REPEAT_DEFN
 
231
{
 
232
  sidl_bool _result;
 
233
  _result = (*self->d_epv->f_isSame)(
 
234
    self,
 
235
    iobj,
 
236
    _ex);
 
237
  return _result;
 
238
}
 
239
#else /* ISO C 1999 inline semantics */
 
240
;
 
241
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
242
 
 
243
/*
 
244
 * Return whether this object is an instance of the specified type.
 
245
 * The string name must be the <code>sidl</code> type name.  This
 
246
 * routine will return <code>true</code> if and only if a cast to
 
247
 * the string type name would succeed.
 
248
 */
 
249
 
 
250
SIDL_C_INLINE_DEFN
 
251
sidl_bool
 
252
sidlx_rmi_IPv4Socket_isType(
 
253
  /* in */ sidlx_rmi_IPv4Socket self,
 
254
  /* in */ const char* name,
 
255
  /* out */ sidl_BaseInterface *_ex)
 
256
#if SIDL_C_INLINE_REPEAT_DEFN
 
257
{
 
258
  sidl_bool _result;
 
259
  _result = (*self->d_epv->f_isType)(
 
260
    self,
 
261
    name,
 
262
    _ex);
 
263
  return _result;
 
264
}
 
265
#else /* ISO C 1999 inline semantics */
 
266
;
 
267
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
268
 
 
269
/*
 
270
 * Return the meta-data about the class implementing this interface.
 
271
 */
 
272
 
 
273
SIDL_C_INLINE_DEFN
 
274
sidl_ClassInfo
 
275
sidlx_rmi_IPv4Socket_getClassInfo(
 
276
  /* in */ sidlx_rmi_IPv4Socket self,
 
277
  /* out */ sidl_BaseInterface *_ex)
 
278
#if SIDL_C_INLINE_REPEAT_DEFN
 
279
{
 
280
  sidl_ClassInfo _result;
 
281
  _result = (*self->d_epv->f_getClassInfo)(
 
282
    self,
 
283
    _ex);
 
284
  return _result;
 
285
}
 
286
#else /* ISO C 1999 inline semantics */
 
287
;
 
288
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
289
 
 
290
/*
 
291
 * Method:  close[]
 
292
 */
 
293
 
 
294
SIDL_C_INLINE_DEFN
 
295
int32_t
 
296
sidlx_rmi_IPv4Socket_close(
 
297
  /* in */ sidlx_rmi_IPv4Socket self,
 
298
  /* out */ sidl_BaseInterface *_ex)
 
299
#if SIDL_C_INLINE_REPEAT_DEFN
 
300
{
 
301
  int32_t _result;
 
302
  _result = (*self->d_epv->f_close)(
 
303
    self,
 
304
    _ex);
 
305
  return _result;
 
306
}
 
307
#else /* ISO C 1999 inline semantics */
 
308
;
 
309
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
310
 
 
311
/*
 
312
 * Method:  readn[]
 
313
 */
 
314
 
 
315
SIDL_C_INLINE_DEFN
 
316
int32_t
 
317
sidlx_rmi_IPv4Socket_readn(
 
318
  /* in */ sidlx_rmi_IPv4Socket self,
 
319
  /* in */ int32_t nbytes,
 
320
  /* inout array<char> */ struct sidl_char__array** data,
 
321
  /* out */ sidl_BaseInterface *_ex)
 
322
#if SIDL_C_INLINE_REPEAT_DEFN
 
323
{
 
324
  int32_t _result;
 
325
  _result = (*self->d_epv->f_readn)(
 
326
    self,
 
327
    nbytes,
 
328
    data,
 
329
    _ex);
 
330
  return _result;
 
331
}
 
332
#else /* ISO C 1999 inline semantics */
 
333
;
 
334
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
335
 
 
336
/*
 
337
 * Method:  readline[]
 
338
 */
 
339
 
 
340
SIDL_C_INLINE_DEFN
 
341
int32_t
 
342
sidlx_rmi_IPv4Socket_readline(
 
343
  /* in */ sidlx_rmi_IPv4Socket self,
 
344
  /* in */ int32_t nbytes,
 
345
  /* inout array<char> */ struct sidl_char__array** data,
 
346
  /* out */ sidl_BaseInterface *_ex)
 
347
#if SIDL_C_INLINE_REPEAT_DEFN
 
348
{
 
349
  int32_t _result;
 
350
  _result = (*self->d_epv->f_readline)(
 
351
    self,
 
352
    nbytes,
 
353
    data,
 
354
    _ex);
 
355
  return _result;
 
356
}
 
357
#else /* ISO C 1999 inline semantics */
 
358
;
 
359
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
360
 
 
361
/*
 
362
 * Method:  readstring[]
 
363
 */
 
364
 
 
365
SIDL_C_INLINE_DEFN
 
366
int32_t
 
367
sidlx_rmi_IPv4Socket_readstring(
 
368
  /* in */ sidlx_rmi_IPv4Socket self,
 
369
  /* in */ int32_t nbytes,
 
370
  /* inout array<char> */ struct sidl_char__array** data,
 
371
  /* out */ sidl_BaseInterface *_ex)
 
372
#if SIDL_C_INLINE_REPEAT_DEFN
 
373
{
 
374
  int32_t _result;
 
375
  _result = (*self->d_epv->f_readstring)(
 
376
    self,
 
377
    nbytes,
 
378
    data,
 
379
    _ex);
 
380
  return _result;
 
381
}
 
382
#else /* ISO C 1999 inline semantics */
 
383
;
 
384
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
385
 
 
386
/*
 
387
 * Method:  readstring_alloc[]
 
388
 */
 
389
 
 
390
SIDL_C_INLINE_DEFN
 
391
int32_t
 
392
sidlx_rmi_IPv4Socket_readstring_alloc(
 
393
  /* in */ sidlx_rmi_IPv4Socket self,
 
394
  /* inout array<char> */ struct sidl_char__array** data,
 
395
  /* out */ sidl_BaseInterface *_ex)
 
396
#if SIDL_C_INLINE_REPEAT_DEFN
 
397
{
 
398
  int32_t _result;
 
399
  _result = (*self->d_epv->f_readstring_alloc)(
 
400
    self,
 
401
    data,
 
402
    _ex);
 
403
  return _result;
 
404
}
 
405
#else /* ISO C 1999 inline semantics */
 
406
;
 
407
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
408
 
 
409
/*
 
410
 * Method:  readint[]
 
411
 */
 
412
 
 
413
SIDL_C_INLINE_DEFN
 
414
int32_t
 
415
sidlx_rmi_IPv4Socket_readint(
 
416
  /* in */ sidlx_rmi_IPv4Socket self,
 
417
  /* inout */ int32_t* data,
 
418
  /* out */ sidl_BaseInterface *_ex)
 
419
#if SIDL_C_INLINE_REPEAT_DEFN
 
420
{
 
421
  int32_t _result;
 
422
  _result = (*self->d_epv->f_readint)(
 
423
    self,
 
424
    data,
 
425
    _ex);
 
426
  return _result;
 
427
}
 
428
#else /* ISO C 1999 inline semantics */
 
429
;
 
430
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
431
 
 
432
/*
 
433
 * Method:  writen[]
 
434
 */
 
435
 
 
436
SIDL_C_INLINE_DEFN
 
437
int32_t
 
438
sidlx_rmi_IPv4Socket_writen(
 
439
  /* in */ sidlx_rmi_IPv4Socket self,
 
440
  /* in */ int32_t nbytes,
 
441
  /* in array<char> */ struct sidl_char__array* data,
 
442
  /* out */ sidl_BaseInterface *_ex)
 
443
#if SIDL_C_INLINE_REPEAT_DEFN
 
444
{
 
445
  int32_t _result;
 
446
  _result = (*self->d_epv->f_writen)(
 
447
    self,
 
448
    nbytes,
 
449
    data,
 
450
    _ex);
 
451
  return _result;
 
452
}
 
453
#else /* ISO C 1999 inline semantics */
 
454
;
 
455
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
456
 
 
457
/*
 
458
 * Method:  writestring[]
 
459
 */
 
460
 
 
461
SIDL_C_INLINE_DEFN
 
462
int32_t
 
463
sidlx_rmi_IPv4Socket_writestring(
 
464
  /* in */ sidlx_rmi_IPv4Socket self,
 
465
  /* in */ int32_t nbytes,
 
466
  /* in array<char> */ struct sidl_char__array* data,
 
467
  /* out */ sidl_BaseInterface *_ex)
 
468
#if SIDL_C_INLINE_REPEAT_DEFN
 
469
{
 
470
  int32_t _result;
 
471
  _result = (*self->d_epv->f_writestring)(
 
472
    self,
 
473
    nbytes,
 
474
    data,
 
475
    _ex);
 
476
  return _result;
 
477
}
 
478
#else /* ISO C 1999 inline semantics */
 
479
;
 
480
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
481
 
 
482
/*
 
483
 * Method:  writeint[]
 
484
 */
 
485
 
 
486
SIDL_C_INLINE_DEFN
 
487
int32_t
 
488
sidlx_rmi_IPv4Socket_writeint(
 
489
  /* in */ sidlx_rmi_IPv4Socket self,
 
490
  /* in */ int32_t data,
 
491
  /* out */ sidl_BaseInterface *_ex)
 
492
#if SIDL_C_INLINE_REPEAT_DEFN
 
493
{
 
494
  int32_t _result;
 
495
  _result = (*self->d_epv->f_writeint)(
 
496
    self,
 
497
    data,
 
498
    _ex);
 
499
  return _result;
 
500
}
 
501
#else /* ISO C 1999 inline semantics */
 
502
;
 
503
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
504
 
 
505
/*
 
506
 * Method:  setFileDescriptor[]
 
507
 */
 
508
 
 
509
SIDL_C_INLINE_DEFN
 
510
void
 
511
sidlx_rmi_IPv4Socket_setFileDescriptor(
 
512
  /* in */ sidlx_rmi_IPv4Socket self,
 
513
  /* in */ int32_t fd,
 
514
  /* out */ sidl_BaseInterface *_ex)
 
515
#if SIDL_C_INLINE_REPEAT_DEFN
 
516
{
 
517
  (*self->d_epv->f_setFileDescriptor)(
 
518
    self,
 
519
    fd,
 
520
    _ex);
 
521
}
 
522
#else /* ISO C 1999 inline semantics */
 
523
;
 
524
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
525
 
 
526
/*
 
527
 * Method:  getFileDescriptor[]
 
528
 */
 
529
 
 
530
SIDL_C_INLINE_DEFN
 
531
int32_t
 
532
sidlx_rmi_IPv4Socket_getFileDescriptor(
 
533
  /* in */ sidlx_rmi_IPv4Socket self,
 
534
  /* out */ sidl_BaseInterface *_ex)
 
535
#if SIDL_C_INLINE_REPEAT_DEFN
 
536
{
 
537
  int32_t _result;
 
538
  _result = (*self->d_epv->f_getFileDescriptor)(
 
539
    self,
 
540
    _ex);
 
541
  return _result;
 
542
}
 
543
#else /* ISO C 1999 inline semantics */
 
544
;
 
545
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
546
 
 
547
/*
 
548
 * Method:  test[]
 
549
 */
 
550
 
 
551
SIDL_C_INLINE_DEFN
 
552
sidl_bool
 
553
sidlx_rmi_IPv4Socket_test(
 
554
  /* in */ sidlx_rmi_IPv4Socket self,
 
555
  /* in */ int32_t secs,
 
556
  /* in */ int32_t usecs,
 
557
  /* out */ sidl_BaseInterface *_ex)
 
558
#if SIDL_C_INLINE_REPEAT_DEFN
 
559
{
 
560
  sidl_bool _result;
 
561
  _result = (*self->d_epv->f_test)(
 
562
    self,
 
563
    secs,
 
564
    usecs,
 
565
    _ex);
 
566
  return _result;
 
567
}
 
568
#else /* ISO C 1999 inline semantics */
 
569
;
 
570
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
571
 
 
572
/*
 
573
 * Cast method for interface and class type conversions.
 
574
 */
 
575
 
 
576
sidlx_rmi_IPv4Socket
 
577
sidlx_rmi_IPv4Socket__cast(
 
578
  void* obj,
 
579
  sidl_BaseInterface* _ex)
 
580
{
 
581
  sidlx_rmi_IPv4Socket cast = NULL;
 
582
 
 
583
#ifdef WITH_RMI
 
584
  static int connect_loaded = 0;
 
585
  if(!connect_loaded) {
 
586
    connect_loaded = 1;
 
587
    sidl_rmi_ConnectRegistry_registerConnect("sidlx.rmi.IPv4Socket", (
 
588
      void*)sidlx_rmi_IPv4Socket__IHConnect,_ex);SIDL_CHECK(*_ex);
 
589
  }
 
590
#endif /*WITH_RMI*/
 
591
  if (obj != NULL) {
 
592
    sidl_BaseInterface base = (sidl_BaseInterface) obj;
 
593
    cast = (sidlx_rmi_IPv4Socket) (*base->d_epv->f__cast)(
 
594
      base->d_object,
 
595
      "sidlx.rmi.IPv4Socket", _ex); SIDL_CHECK(*_ex);
 
596
  }
 
597
 
 
598
  EXIT:
 
599
  return cast;
 
600
}
 
601
 
 
602
/*
 
603
 * String cast method for interface and class type conversions.
 
604
 */
 
605
 
 
606
void*
 
607
sidlx_rmi_IPv4Socket__cast2(
 
608
  void* obj,
 
609
  const char* type,
 
610
  sidl_BaseInterface* _ex)
 
611
{
 
612
  void* cast = NULL;
 
613
 
 
614
  if (obj != NULL) {
 
615
    sidl_BaseInterface base = (sidl_BaseInterface) obj;
 
616
    cast = (*base->d_epv->f__cast)(base->d_object, type, _ex); SIDL_CHECK(*_ex);
 
617
  }
 
618
 
 
619
  EXIT:
 
620
  return cast;
 
621
}
 
622
/*
 
623
 * Select and execute a method by name
 
624
 */
 
625
 
 
626
SIDL_C_INLINE_DEFN
 
627
void
 
628
sidlx_rmi_IPv4Socket__exec(
 
629
  /* in */ sidlx_rmi_IPv4Socket self,
 
630
  /* in */ const char* methodName,
 
631
  /* in */ sidl_rmi_Call inArgs,
 
632
  /* in */ sidl_rmi_Return outArgs,
 
633
  /* out */ sidl_BaseInterface *_ex)
 
634
#if SIDL_C_INLINE_REPEAT_DEFN
 
635
{
 
636
  (*self->d_epv->f__exec)(
 
637
    self,
 
638
    methodName,
 
639
    inArgs,
 
640
    outArgs,
 
641
    _ex);
 
642
}
 
643
#else /* ISO C 1999 inline semantics */
 
644
;
 
645
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
646
 
 
647
 
 
648
/*
 
649
 * Get the URL of the Implementation of this object (for RMI)
 
650
 */
 
651
 
 
652
SIDL_C_INLINE_DEFN
 
653
char*
 
654
sidlx_rmi_IPv4Socket__getURL(
 
655
  /* in */ sidlx_rmi_IPv4Socket self,
 
656
  /* out */ sidl_BaseInterface *_ex)
 
657
#if SIDL_C_INLINE_REPEAT_DEFN
 
658
{
 
659
  char* _result;
 
660
  _result = (*self->d_epv->f__getURL)(
 
661
    self,
 
662
    _ex);
 
663
  return _result;
 
664
}
 
665
#else /* ISO C 1999 inline semantics */
 
666
;
 
667
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
668
 
 
669
 
 
670
/*
 
671
 * On a remote object, addrefs the remote instance.
 
672
 */
 
673
 
 
674
SIDL_C_INLINE_DEFN
 
675
void
 
676
sidlx_rmi_IPv4Socket__raddRef(
 
677
  /* in */ sidlx_rmi_IPv4Socket self,
 
678
  /* out */ sidl_BaseInterface *_ex)
 
679
#if SIDL_C_INLINE_REPEAT_DEFN
 
680
{
 
681
  (*self->d_epv->f__raddRef)(
 
682
    self,
 
683
    _ex);
 
684
}
 
685
#else /* ISO C 1999 inline semantics */
 
686
;
 
687
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
688
 
 
689
 
 
690
/*
 
691
 * Method to set whether or not method hooks should be invoked.
 
692
 */
 
693
 
 
694
SIDL_C_INLINE_DEFN
 
695
void
 
696
sidlx_rmi_IPv4Socket__set_hooks(
 
697
  /* in */ sidlx_rmi_IPv4Socket self,
 
698
  /* in */ sidl_bool on,
 
699
  /* out */ sidl_BaseInterface *_ex)
 
700
#if SIDL_C_INLINE_REPEAT_DEFN
 
701
{
 
702
  (*self->d_epv->f__set_hooks)(
 
703
    self,
 
704
    on,
 
705
    _ex);
 
706
}
 
707
#else /* ISO C 1999 inline semantics */
 
708
;
 
709
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
710
 
 
711
/*
 
712
 * TRUE if this object is remote, false if local
 
713
 */
 
714
 
 
715
SIDL_C_INLINE_DEFN
 
716
sidl_bool
 
717
sidlx_rmi_IPv4Socket__isRemote(
 
718
  /* in */ sidlx_rmi_IPv4Socket self,
 
719
  /* out */ sidl_BaseInterface *_ex)
 
720
#if SIDL_C_INLINE_REPEAT_DEFN
 
721
{
 
722
  sidl_bool _result;
 
723
  _result = (*self->d_epv->f__isRemote)(
 
724
    self,
 
725
    _ex);
 
726
  return _result;
 
727
}
 
728
#else /* ISO C 1999 inline semantics */
 
729
;
 
730
#endif /* SIDL_C_INLINE_REPEAT_DEFN */
 
731
 
 
732
 
 
733
/*
 
734
 * TRUE if this object is remote, false if local
 
735
 */
 
736
 
 
737
sidl_bool
 
738
sidlx_rmi_IPv4Socket__isLocal(
 
739
  /* in */ sidlx_rmi_IPv4Socket self,
 
740
  /* out */ sidl_BaseInterface *_ex)
 
741
{
 
742
  return !sidlx_rmi_IPv4Socket__isRemote(self,_ex);
 
743
}
 
744
 
 
745
/**
 
746
 * Create a contiguous array of the given dimension with specified
 
747
 * index bounds in column-major order. This array
 
748
 * owns and manages its data.
 
749
 * This function initializes the contents of the array to
 
750
 * NULL.
 
751
 */
 
752
struct sidlx_rmi_IPv4Socket__array*
 
753
sidlx_rmi_IPv4Socket__array_createCol(
 
754
  int32_t       dimen,
 
755
  const int32_t lower[],
 
756
  const int32_t upper[])
 
757
{
 
758
  return (struct sidlx_rmi_IPv4Socket__array*)sidl_interface__array_createCol(
 
759
    dimen, lower, upper);
 
760
}
 
761
 
 
762
/**
 
763
 * Create a contiguous array of the given dimension with specified
 
764
 * index bounds in row-major order. This array
 
765
 * owns and manages its data.
 
766
 * This function initializes the contents of the array to
 
767
 * NULL.
 
768
 */
 
769
struct sidlx_rmi_IPv4Socket__array*
 
770
sidlx_rmi_IPv4Socket__array_createRow(
 
771
  int32_t       dimen,
 
772
  const int32_t lower[],
 
773
  const int32_t upper[])
 
774
{
 
775
  return (struct sidlx_rmi_IPv4Socket__array*)sidl_interface__array_createRow(
 
776
    dimen, lower, upper);
 
777
}
 
778
 
 
779
/**
 
780
 * Create a contiguous one-dimensional array with a lower index
 
781
 * of 0 and an upper index of len-1. This array
 
782
 * owns and manages its data.
 
783
 * This function initializes the contents of the array to
 
784
 * NULL.
 
785
 */
 
786
struct sidlx_rmi_IPv4Socket__array*
 
787
sidlx_rmi_IPv4Socket__array_create1d(int32_t len)
 
788
{
 
789
  return (struct sidlx_rmi_IPv4Socket__array*)sidl_interface__array_create1d(
 
790
    len);
 
791
}
 
792
 
 
793
/**
 
794
 * Create a dense one-dimensional vector with a lower
 
795
 * index of 0 and an upper index of len-1. The initial data for this
 
796
 * new array is copied from data. This will increment the reference
 
797
 * count of each non-NULL object/interface reference in data.
 
798
 * 
 
799
 * This array owns and manages its data.
 
800
 */
 
801
struct sidlx_rmi_IPv4Socket__array*
 
802
sidlx_rmi_IPv4Socket__array_create1dInit(
 
803
  int32_t len, 
 
804
  sidlx_rmi_IPv4Socket* data)
 
805
{
 
806
  return (struct 
 
807
    sidlx_rmi_IPv4Socket__array*)sidl_interface__array_create1dInit(len, (
 
808
    struct sidl_BaseInterface__object **)data);
 
809
}
 
810
 
 
811
/**
 
812
 * Create a contiguous two-dimensional array in column-major
 
813
 * order with a lower index of (0,0) and an upper index of
 
814
 * (m-1,n-1). This array owns and manages its data.
 
815
 * This function initializes the contents of the array to
 
816
 * NULL.
 
817
 */
 
818
struct sidlx_rmi_IPv4Socket__array*
 
819
sidlx_rmi_IPv4Socket__array_create2dCol(int32_t m, int32_t n)
 
820
{
 
821
  return (struct sidlx_rmi_IPv4Socket__array*)sidl_interface__array_create2dCol(
 
822
    m, n);
 
823
}
 
824
 
 
825
/**
 
826
 * Create a contiguous two-dimensional array in row-major
 
827
 * order with a lower index of (0,0) and an upper index of
 
828
 * (m-1,n-1). This array owns and manages its data.
 
829
 * This function initializes the contents of the array to
 
830
 * NULL.
 
831
 */
 
832
struct sidlx_rmi_IPv4Socket__array*
 
833
sidlx_rmi_IPv4Socket__array_create2dRow(int32_t m, int32_t n)
 
834
{
 
835
  return (struct sidlx_rmi_IPv4Socket__array*)sidl_interface__array_create2dRow(
 
836
    m, n);
 
837
}
 
838
 
 
839
/**
 
840
 * Create an array that uses data (memory) from another
 
841
 * source. The initial contents are determined by the
 
842
 * data being borrowed.
 
843
 * Any time an element in the borrowed array is replaced
 
844
 * via a set call, deleteRef will be called on the
 
845
 * value being replaced if it is not NULL.
 
846
 */
 
847
struct sidlx_rmi_IPv4Socket__array*
 
848
sidlx_rmi_IPv4Socket__array_borrow(
 
849
  sidlx_rmi_IPv4Socket* firstElement,
 
850
  int32_t       dimen,
 
851
  const int32_t lower[],
 
852
  const int32_t upper[],
 
853
  const int32_t stride[])
 
854
{
 
855
  return (struct sidlx_rmi_IPv4Socket__array*)sidl_interface__array_borrow(
 
856
    (struct sidl_BaseInterface__object **)
 
857
    firstElement, dimen, lower, upper, stride);
 
858
}
 
859
 
 
860
/**
 
861
 * If array is borrowed, allocate a new self-sufficient
 
862
 * array and copy the borrowed array into the new array;
 
863
 * otherwise, increment the reference count and return
 
864
 * the array passed in. Use this whenever you want to
 
865
 * make a copy of a method argument because arrays
 
866
 * passed into methods aren't guaranteed to exist after
 
867
 * the method call.
 
868
 */
 
869
struct sidlx_rmi_IPv4Socket__array*
 
870
sidlx_rmi_IPv4Socket__array_smartCopy(
 
871
  struct sidlx_rmi_IPv4Socket__array *array)
 
872
{
 
873
  return (struct sidlx_rmi_IPv4Socket__array*)
 
874
    sidl_interface__array_smartCopy((struct sidl_interface__array *)array);
 
875
}
 
876
 
 
877
/**
 
878
 * Increment the array's internal reference count by one.
 
879
 */
 
880
void
 
881
sidlx_rmi_IPv4Socket__array_addRef(
 
882
  struct sidlx_rmi_IPv4Socket__array* array)
 
883
{
 
884
  sidl_interface__array_addRef((struct sidl_interface__array *)array);
 
885
}
 
886
 
 
887
/**
 
888
 * Decrement the array's internal reference count by one.
 
889
 * If the reference count goes to zero, destroy the array.
 
890
 * If the array isn't borrowed, this releases all the
 
891
 * object references held by the array.
 
892
 */
 
893
void
 
894
sidlx_rmi_IPv4Socket__array_deleteRef(
 
895
  struct sidlx_rmi_IPv4Socket__array* array)
 
896
{
 
897
  sidl_interface__array_deleteRef((struct sidl_interface__array *)array);
 
898
}
 
899
 
 
900
/**
 
901
 * Retrieve element i1 of a(n) 1-dimensional array.
 
902
 */
 
903
sidlx_rmi_IPv4Socket
 
904
sidlx_rmi_IPv4Socket__array_get1(
 
905
  const struct sidlx_rmi_IPv4Socket__array* array,
 
906
  const int32_t i1)
 
907
{
 
908
  return (sidlx_rmi_IPv4Socket)
 
909
    sidl_interface__array_get1((const struct sidl_interface__array *)array
 
910
    , i1);
 
911
}
 
912
 
 
913
/**
 
914
 * Retrieve element (i1,i2) of a(n) 2-dimensional array.
 
915
 */
 
916
sidlx_rmi_IPv4Socket
 
917
sidlx_rmi_IPv4Socket__array_get2(
 
918
  const struct sidlx_rmi_IPv4Socket__array* array,
 
919
  const int32_t i1,
 
920
  const int32_t i2)
 
921
{
 
922
  return (sidlx_rmi_IPv4Socket)
 
923
    sidl_interface__array_get2((const struct sidl_interface__array *)array
 
924
    , i1, i2);
 
925
}
 
926
 
 
927
/**
 
928
 * Retrieve element (i1,i2,i3) of a(n) 3-dimensional array.
 
929
 */
 
930
sidlx_rmi_IPv4Socket
 
931
sidlx_rmi_IPv4Socket__array_get3(
 
932
  const struct sidlx_rmi_IPv4Socket__array* array,
 
933
  const int32_t i1,
 
934
  const int32_t i2,
 
935
  const int32_t i3)
 
936
{
 
937
  return (sidlx_rmi_IPv4Socket)
 
938
    sidl_interface__array_get3((const struct sidl_interface__array *)array
 
939
    , i1, i2, i3);
 
940
}
 
941
 
 
942
/**
 
943
 * Retrieve element (i1,i2,i3,i4) of a(n) 4-dimensional array.
 
944
 */
 
945
sidlx_rmi_IPv4Socket
 
946
sidlx_rmi_IPv4Socket__array_get4(
 
947
  const struct sidlx_rmi_IPv4Socket__array* array,
 
948
  const int32_t i1,
 
949
  const int32_t i2,
 
950
  const int32_t i3,
 
951
  const int32_t i4)
 
952
{
 
953
  return (sidlx_rmi_IPv4Socket)
 
954
    sidl_interface__array_get4((const struct sidl_interface__array *)array
 
955
    , i1, i2, i3, i4);
 
956
}
 
957
 
 
958
/**
 
959
 * Retrieve element (i1,i2,i3,i4,i5) of a(n) 5-dimensional array.
 
960
 */
 
961
sidlx_rmi_IPv4Socket
 
962
sidlx_rmi_IPv4Socket__array_get5(
 
963
  const struct sidlx_rmi_IPv4Socket__array* array,
 
964
  const int32_t i1,
 
965
  const int32_t i2,
 
966
  const int32_t i3,
 
967
  const int32_t i4,
 
968
  const int32_t i5)
 
969
{
 
970
  return (sidlx_rmi_IPv4Socket)
 
971
    sidl_interface__array_get5((const struct sidl_interface__array *)array
 
972
    , i1, i2, i3, i4, i5);
 
973
}
 
974
 
 
975
/**
 
976
 * Retrieve element (i1,i2,i3,i4,i5,i6) of a(n) 6-dimensional array.
 
977
 */
 
978
sidlx_rmi_IPv4Socket
 
979
sidlx_rmi_IPv4Socket__array_get6(
 
980
  const struct sidlx_rmi_IPv4Socket__array* array,
 
981
  const int32_t i1,
 
982
  const int32_t i2,
 
983
  const int32_t i3,
 
984
  const int32_t i4,
 
985
  const int32_t i5,
 
986
  const int32_t i6)
 
987
{
 
988
  return (sidlx_rmi_IPv4Socket)
 
989
    sidl_interface__array_get6((const struct sidl_interface__array *)array
 
990
    , i1, i2, i3, i4, i5, i6);
 
991
}
 
992
 
 
993
/**
 
994
 * Retrieve element (i1,i2,i3,i4,i5,i6,i7) of a(n) 7-dimensional array.
 
995
 */
 
996
sidlx_rmi_IPv4Socket
 
997
sidlx_rmi_IPv4Socket__array_get7(
 
998
  const struct sidlx_rmi_IPv4Socket__array* array,
 
999
  const int32_t i1,
 
1000
  const int32_t i2,
 
1001
  const int32_t i3,
 
1002
  const int32_t i4,
 
1003
  const int32_t i5,
 
1004
  const int32_t i6,
 
1005
  const int32_t i7)
 
1006
{
 
1007
  return (sidlx_rmi_IPv4Socket)
 
1008
    sidl_interface__array_get7((const struct sidl_interface__array *)array
 
1009
    , i1, i2, i3, i4, i5, i6, i7);
 
1010
}
 
1011
 
 
1012
/**
 
1013
 * Retrieve element indices of an n-dimensional array.
 
1014
 * indices is assumed to have the right number of elements
 
1015
 * for the dimension of array.
 
1016
 */
 
1017
sidlx_rmi_IPv4Socket
 
1018
sidlx_rmi_IPv4Socket__array_get(
 
1019
  const struct sidlx_rmi_IPv4Socket__array* array,
 
1020
  const int32_t indices[])
 
1021
{
 
1022
  return (sidlx_rmi_IPv4Socket)
 
1023
    sidl_interface__array_get((const struct sidl_interface__array *)array, 
 
1024
      indices);
 
1025
}
 
1026
 
 
1027
/**
 
1028
 * Set element i1 of a(n) 1-dimensional array to value.
 
1029
 */
 
1030
void
 
1031
sidlx_rmi_IPv4Socket__array_set1(
 
1032
  struct sidlx_rmi_IPv4Socket__array* array,
 
1033
  const int32_t i1,
 
1034
  sidlx_rmi_IPv4Socket const value)
 
1035
{
 
1036
  sidl_interface__array_set1((struct sidl_interface__array *)array
 
1037
  , i1, (struct sidl_BaseInterface__object *)value);
 
1038
}
 
1039
 
 
1040
/**
 
1041
 * Set element (i1,i2) of a(n) 2-dimensional array to value.
 
1042
 */
 
1043
void
 
1044
sidlx_rmi_IPv4Socket__array_set2(
 
1045
  struct sidlx_rmi_IPv4Socket__array* array,
 
1046
  const int32_t i1,
 
1047
  const int32_t i2,
 
1048
  sidlx_rmi_IPv4Socket const value)
 
1049
{
 
1050
  sidl_interface__array_set2((struct sidl_interface__array *)array
 
1051
  , i1, i2, (struct sidl_BaseInterface__object *)value);
 
1052
}
 
1053
 
 
1054
/**
 
1055
 * Set element (i1,i2,i3) of a(n) 3-dimensional array to value.
 
1056
 */
 
1057
void
 
1058
sidlx_rmi_IPv4Socket__array_set3(
 
1059
  struct sidlx_rmi_IPv4Socket__array* array,
 
1060
  const int32_t i1,
 
1061
  const int32_t i2,
 
1062
  const int32_t i3,
 
1063
  sidlx_rmi_IPv4Socket const value)
 
1064
{
 
1065
  sidl_interface__array_set3((struct sidl_interface__array *)array
 
1066
  , i1, i2, i3, (struct sidl_BaseInterface__object *)value);
 
1067
}
 
1068
 
 
1069
/**
 
1070
 * Set element (i1,i2,i3,i4) of a(n) 4-dimensional array to value.
 
1071
 */
 
1072
void
 
1073
sidlx_rmi_IPv4Socket__array_set4(
 
1074
  struct sidlx_rmi_IPv4Socket__array* array,
 
1075
  const int32_t i1,
 
1076
  const int32_t i2,
 
1077
  const int32_t i3,
 
1078
  const int32_t i4,
 
1079
  sidlx_rmi_IPv4Socket const value)
 
1080
{
 
1081
  sidl_interface__array_set4((struct sidl_interface__array *)array
 
1082
  , i1, i2, i3, i4, (struct sidl_BaseInterface__object *)value);
 
1083
}
 
1084
 
 
1085
/**
 
1086
 * Set element (i1,i2,i3,i4,i5) of a(n) 5-dimensional array to value.
 
1087
 */
 
1088
void
 
1089
sidlx_rmi_IPv4Socket__array_set5(
 
1090
  struct sidlx_rmi_IPv4Socket__array* array,
 
1091
  const int32_t i1,
 
1092
  const int32_t i2,
 
1093
  const int32_t i3,
 
1094
  const int32_t i4,
 
1095
  const int32_t i5,
 
1096
  sidlx_rmi_IPv4Socket const value)
 
1097
{
 
1098
  sidl_interface__array_set5((struct sidl_interface__array *)array
 
1099
  , i1, i2, i3, i4, i5, (struct sidl_BaseInterface__object *)value);
 
1100
}
 
1101
 
 
1102
/**
 
1103
 * Set element (i1,i2,i3,i4,i5,i6) of a(n) 6-dimensional array to value.
 
1104
 */
 
1105
void
 
1106
sidlx_rmi_IPv4Socket__array_set6(
 
1107
  struct sidlx_rmi_IPv4Socket__array* array,
 
1108
  const int32_t i1,
 
1109
  const int32_t i2,
 
1110
  const int32_t i3,
 
1111
  const int32_t i4,
 
1112
  const int32_t i5,
 
1113
  const int32_t i6,
 
1114
  sidlx_rmi_IPv4Socket const value)
 
1115
{
 
1116
  sidl_interface__array_set6((struct sidl_interface__array *)array
 
1117
  , i1, i2, i3, i4, i5, i6, (struct sidl_BaseInterface__object *)value);
 
1118
}
 
1119
 
 
1120
/**
 
1121
 * Set element (i1,i2,i3,i4,i5,i6,i7) of a(n) 7-dimensional array to value.
 
1122
 */
 
1123
void
 
1124
sidlx_rmi_IPv4Socket__array_set7(
 
1125
  struct sidlx_rmi_IPv4Socket__array* array,
 
1126
  const int32_t i1,
 
1127
  const int32_t i2,
 
1128
  const int32_t i3,
 
1129
  const int32_t i4,
 
1130
  const int32_t i5,
 
1131
  const int32_t i6,
 
1132
  const int32_t i7,
 
1133
  sidlx_rmi_IPv4Socket const value)
 
1134
{
 
1135
  sidl_interface__array_set7((struct sidl_interface__array *)array
 
1136
  , i1, i2, i3, i4, i5, i6, i7, (struct sidl_BaseInterface__object *)value);
 
1137
}
 
1138
 
 
1139
/**
 
1140
 * Set element indices of an n-dimensional array to value.indices is assumed to have the right number of elements
 
1141
 * for the dimension of array.
 
1142
 */
 
1143
void
 
1144
sidlx_rmi_IPv4Socket__array_set(
 
1145
  struct sidlx_rmi_IPv4Socket__array* array,
 
1146
  const int32_t indices[],
 
1147
  sidlx_rmi_IPv4Socket const value)
 
1148
{
 
1149
  sidl_interface__array_set((struct sidl_interface__array *)array, indices, (
 
1150
    struct sidl_BaseInterface__object *)value);
 
1151
}
 
1152
 
 
1153
/**
 
1154
 * Return the dimension of array. If the array pointer is
 
1155
 * NULL, zero is returned.
 
1156
 */
 
1157
int32_t
 
1158
sidlx_rmi_IPv4Socket__array_dimen(
 
1159
  const struct sidlx_rmi_IPv4Socket__array* array)
 
1160
{
 
1161
  return sidl_interface__array_dimen((struct sidl_interface__array *)array);
 
1162
}
 
1163
 
 
1164
/**
 
1165
 * Return the lower bound of dimension ind.
 
1166
 * If ind is not a valid dimension, 0 is returned.
 
1167
 * The valid range for ind is from 0 to dimen-1.
 
1168
 */
 
1169
int32_t
 
1170
sidlx_rmi_IPv4Socket__array_lower(
 
1171
  const struct sidlx_rmi_IPv4Socket__array* array,
 
1172
  const int32_t ind)
 
1173
{
 
1174
  return sidl_interface__array_lower((struct sidl_interface__array *)array, 
 
1175
    ind);
 
1176
}
 
1177
 
 
1178
/**
 
1179
 * Return the upper bound of dimension ind.
 
1180
 * If ind is not a valid dimension, -1 is returned.
 
1181
 * The valid range for ind is from 0 to dimen-1.
 
1182
 */
 
1183
int32_t
 
1184
sidlx_rmi_IPv4Socket__array_upper(
 
1185
  const struct sidlx_rmi_IPv4Socket__array* array,
 
1186
  const int32_t ind)
 
1187
{
 
1188
  return sidl_interface__array_upper((struct sidl_interface__array *)array, 
 
1189
    ind);
 
1190
}
 
1191
 
 
1192
/**
 
1193
 * Return the length of dimension ind.
 
1194
 * If ind is not a valid dimension, -1 is returned.
 
1195
 * The valid range for ind is from 0 to dimen-1.
 
1196
 */
 
1197
int32_t
 
1198
sidlx_rmi_IPv4Socket__array_length(
 
1199
  const struct sidlx_rmi_IPv4Socket__array* array,
 
1200
  const int32_t ind)
 
1201
{
 
1202
  return sidl_interface__array_length((struct sidl_interface__array *)array, 
 
1203
    ind);
 
1204
}
 
1205
 
 
1206
/**
 
1207
 * Return the stride of dimension ind.
 
1208
 * If ind is not a valid dimension, 0 is returned.
 
1209
 * The valid range for ind is from 0 to dimen-1.
 
1210
 */
 
1211
int32_t
 
1212
sidlx_rmi_IPv4Socket__array_stride(
 
1213
  const struct sidlx_rmi_IPv4Socket__array* array,
 
1214
  const int32_t ind)
 
1215
{
 
1216
  return sidl_interface__array_stride((struct sidl_interface__array *)array, 
 
1217
    ind);
 
1218
}
 
1219
 
 
1220
/**
 
1221
 * Return a true value iff the array is a contiguous
 
1222
 * column-major ordered array. A NULL array argument
 
1223
 * causes 0 to be returned.
 
1224
 */
 
1225
int
 
1226
sidlx_rmi_IPv4Socket__array_isColumnOrder(
 
1227
  const struct sidlx_rmi_IPv4Socket__array* array)
 
1228
{
 
1229
  return sidl_interface__array_isColumnOrder((struct sidl_interface__array 
 
1230
    *)array);
 
1231
}
 
1232
 
 
1233
/**
 
1234
 * Return a true value iff the array is a contiguous
 
1235
 * row-major ordered array. A NULL array argument
 
1236
 * causes 0 to be returned.
 
1237
 */
 
1238
int
 
1239
sidlx_rmi_IPv4Socket__array_isRowOrder(
 
1240
  const struct sidlx_rmi_IPv4Socket__array* array)
 
1241
{
 
1242
  return sidl_interface__array_isRowOrder((struct sidl_interface__array 
 
1243
    *)array);
 
1244
}
 
1245
 
 
1246
/**
 
1247
 * Copy the contents of one array (src) to a second array
 
1248
 * (dest). For the copy to take place, both arrays must
 
1249
 * exist and be of the same dimension. This method will
 
1250
 * not modify dest's size, index bounds, or stride; only
 
1251
 * the array element values of dest may be changed by
 
1252
 * this function. No part of src is ever changed by copy.
 
1253
 * 
 
1254
 * On exit, dest[i][j][k]... = src[i][j][k]... for all
 
1255
 * indices i,j,k...  that are in both arrays. If dest and
 
1256
 * src have no indices in common, nothing is copied. For
 
1257
 * example, if src is a 1-d array with elements 0-5 and
 
1258
 * dest is a 1-d array with elements 2-3, this function
 
1259
 * will make the following assignments:
 
1260
 *   dest[2] = src[2],
 
1261
 *   dest[3] = src[3].
 
1262
 * The function copied the elements that both arrays have
 
1263
 * in common.  If dest had elements 4-10, this function
 
1264
 * will make the following assignments:
 
1265
 *   dest[4] = src[4],
 
1266
 *   dest[5] = src[5].
 
1267
 */
 
1268
void
 
1269
sidlx_rmi_IPv4Socket__array_copy(
 
1270
  const struct sidlx_rmi_IPv4Socket__array* src,
 
1271
  struct sidlx_rmi_IPv4Socket__array* dest)
 
1272
{
 
1273
  sidl_interface__array_copy((const struct sidl_interface__array *)src,
 
1274
                             (struct sidl_interface__array *)dest);
 
1275
}
 
1276
 
 
1277
/**
 
1278
 * Create a sub-array of another array. This resulting
 
1279
 * array shares data with the original array. The new
 
1280
 * array can be of the same dimension or potentially
 
1281
 * less assuming the original array has dimension
 
1282
 * greater than 1.  If you are removing dimension,
 
1283
 * indicate the dimensions to remove by setting
 
1284
 * numElem[i] to zero for any dimension i wthat should
 
1285
 * go away in the new array.  The meaning of each
 
1286
 * argument is covered below.
 
1287
 * 
 
1288
 * src       the array to be created will be a subset
 
1289
 *           of this array. If this argument is NULL,
 
1290
 *           NULL will be returned. The array returned
 
1291
 *           borrows data from src, so modifying src or
 
1292
 *           the returned array will modify both
 
1293
 *           arrays.
 
1294
 * 
 
1295
 * dimen     this argument must be greater than zero
 
1296
 *           and less than or equal to the dimension of
 
1297
 *           src. An illegal value will cause a NULL
 
1298
 *           return value.
 
1299
 * 
 
1300
 * numElem   this specifies how many elements from src
 
1301
 *           should be taken in each dimension. A zero
 
1302
 *           entry indicates that the dimension should
 
1303
 *           not appear in the new array.  This
 
1304
 *           argument should be an array with an entry
 
1305
 *           for each dimension of src.  Passing NULL
 
1306
 *           here will cause NULL to be returned.  If
 
1307
 *           srcStart[i] + numElem[i]*srcStride[i] is
 
1308
 *           greater than upper[i] for src or if
 
1309
 *           srcStart[i] + numElem[i]*srcStride[i] is
 
1310
 *           less than lower[i] for src, NULL will be
 
1311
 *           returned.
 
1312
 * 
 
1313
 * srcStart  this array holds the coordinates of the
 
1314
 *           first element of the new array. If this
 
1315
 *           argument is NULL, the first element of src
 
1316
 *           will be the first element of the new
 
1317
 *           array. If non-NULL, this argument should
 
1318
 *           be an array with an entry for each
 
1319
 *           dimension of src.  If srcStart[i] is less
 
1320
 *           than lower[i] for the array src, NULL will
 
1321
 *           be returned.
 
1322
 * 
 
1323
 * srcStride this array lets you specify the stride
 
1324
 *           between elements in each dimension of
 
1325
 *           src. This stride is relative to the
 
1326
 *           coordinate system of the src array. If
 
1327
 *           this argument is NULL, the stride is taken
 
1328
 *           to be one in each dimension.  If non-NULL,
 
1329
 *           this argument should be an array with an
 
1330
 *           entry for each dimension of src.
 
1331
 * 
 
1332
 * newLower  this argument is like lower in a create
 
1333
 *           method. It sets the coordinates for the
 
1334
 *           first element in the new array.  If this
 
1335
 *           argument is NULL, the values indicated by
 
1336
 *           srcStart will be used. If non-NULL, this
 
1337
 *           should be an array with dimen elements.
 
1338
 */
 
1339
struct sidlx_rmi_IPv4Socket__array*
 
1340
sidlx_rmi_IPv4Socket__array_slice(
 
1341
  struct sidlx_rmi_IPv4Socket__array* src,
 
1342
  int32_t        dimen,
 
1343
  const int32_t  numElem[],
 
1344
  const int32_t  *srcStart,
 
1345
  const int32_t  *srcStride,
 
1346
  const int32_t  *newStart)
 
1347
{
 
1348
  return (struct sidlx_rmi_IPv4Socket__array*)
 
1349
    sidl_interface__array_slice((struct sidl_interface__array *)src,
 
1350
                                dimen, numElem, srcStart, srcStride, newStart);
 
1351
}
 
1352
 
 
1353
/**
 
1354
 * If necessary, convert a general matrix into a matrix
 
1355
 * with the required properties. This checks the
 
1356
 * dimension and ordering of the matrix.  If both these
 
1357
 * match, it simply returns a new reference to the
 
1358
 * existing matrix. If the dimension of the incoming
 
1359
 * array doesn't match, it returns NULL. If the ordering
 
1360
 * of the incoming array doesn't match the specification,
 
1361
 * a new array is created with the desired ordering and
 
1362
 * the content of the incoming array is copied to the new
 
1363
 * array.
 
1364
 * 
 
1365
 * The ordering parameter should be one of the constants
 
1366
 * defined in enum sidl_array_ordering
 
1367
 * (e.g. sidl_general_order, sidl_column_major_order, or
 
1368
 * sidl_row_major_order). If you specify
 
1369
 * sidl_general_order, this routine will only check the
 
1370
 * dimension because any matrix is sidl_general_order.
 
1371
 * 
 
1372
 * The caller assumes ownership of the returned reference
 
1373
 * unless it's NULL.
 
1374
 */
 
1375
struct sidlx_rmi_IPv4Socket__array*
 
1376
sidlx_rmi_IPv4Socket__array_ensure(
 
1377
  struct sidlx_rmi_IPv4Socket__array* src,
 
1378
  int32_t dimen,
 
1379
  int     ordering)
 
1380
{
 
1381
  return (struct sidlx_rmi_IPv4Socket__array*)
 
1382
    sidl_interface__array_ensure((struct sidl_interface__array *)src, dimen, 
 
1383
      ordering);
 
1384
}
 
1385
 
 
1386
#ifdef WITH_RMI
 
1387
 
 
1388
#include <stdlib.h>
 
1389
#include <string.h>
 
1390
#include <stdio.h>
 
1391
#ifndef included_sidl_BaseClass_h
 
1392
#include "sidl_BaseClass.h"
 
1393
#endif
 
1394
#ifndef included_sidl_ClassInfo_h
 
1395
#include "sidl_ClassInfo.h"
 
1396
#endif
 
1397
#ifndef included_sidl_rmi_ProtocolFactory_h
 
1398
#include "sidl_rmi_ProtocolFactory.h"
 
1399
#endif
 
1400
#ifndef included_sidl_rmi_InstanceRegistry_h
 
1401
#include "sidl_rmi_InstanceRegistry.h"
 
1402
#endif
 
1403
#ifndef included_sidl_rmi_InstanceHandle_h
 
1404
#include "sidl_rmi_InstanceHandle.h"
 
1405
#endif
 
1406
#ifndef included_sidl_rmi_Invocation_h
 
1407
#include "sidl_rmi_Invocation.h"
 
1408
#endif
 
1409
#ifndef included_sidl_rmi_Response_h
 
1410
#include "sidl_rmi_Response.h"
 
1411
#endif
 
1412
#ifndef included_sidl_rmi_ServerRegistry_h
 
1413
#include "sidl_rmi_ServerRegistry.h"
 
1414
#endif
 
1415
#ifndef included_sidl_rmi_ConnectRegistry_h
 
1416
#include "sidl_rmi_ConnectRegistry.h"
 
1417
#endif
 
1418
#ifndef included_sidl_io_Serializable_h
 
1419
#include "sidl_io_Serializable.h"
 
1420
#endif
 
1421
#ifndef included_sidl_MemAllocException_h
 
1422
#include "sidl_MemAllocException.h"
 
1423
#endif
 
1424
#ifndef included_sidl_NotImplementedException_h
 
1425
#include "sidl_NotImplementedException.h"
 
1426
#endif
 
1427
#include "sidl_Exception.h"
 
1428
 
 
1429
#ifndef NULL
 
1430
#define NULL 0
 
1431
#endif
 
1432
 
 
1433
#include "sidl_thread.h"
 
1434
#ifdef HAVE_PTHREAD
 
1435
static struct sidl_recursive_mutex_t sidlx_rmi_IPv4Socket__mutex= SIDL_RECURSIVE_MUTEX_INITIALIZER;
 
1436
#define LOCK_STATIC_GLOBALS sidl_recursive_mutex_lock( &sidlx_rmi_IPv4Socket__mutex )
 
1437
#define UNLOCK_STATIC_GLOBALS sidl_recursive_mutex_unlock( &sidlx_rmi_IPv4Socket__mutex )
 
1438
/* #define HAVE_LOCKED_STATIC_GLOBALS (sidl_recursive_mutex_trylock( &sidlx_rmi_IPv4Socket__mutex )==EDEADLOCK) */
 
1439
#else
 
1440
#define LOCK_STATIC_GLOBALS
 
1441
#define UNLOCK_STATIC_GLOBALS
 
1442
/* #define HAVE_LOCKED_STATIC_GLOBALS (1) */
 
1443
#endif
 
1444
 
 
1445
/* Static variables to hold version of IOR */
 
1446
static const int32_t s_IOR_MAJOR_VERSION = 2;
 
1447
static const int32_t s_IOR_MINOR_VERSION = 0;
 
1448
 
 
1449
/* Static variables for managing EPV initialization. */
 
1450
static int s_remote_initialized = 0;
 
1451
 
 
1452
static struct sidlx_rmi_IPv4Socket__epv s_rem_epv__sidlx_rmi_ipv4socket;
 
1453
 
 
1454
static struct sidl_BaseClass__epv  s_rem_epv__sidl_baseclass;
 
1455
 
 
1456
static struct sidl_BaseInterface__epv  s_rem_epv__sidl_baseinterface;
 
1457
 
 
1458
static struct sidlx_rmi_Socket__epv s_rem_epv__sidlx_rmi_socket;
 
1459
 
 
1460
 
 
1461
/* REMOTE CAST: dynamic type casting for remote objects. */
 
1462
static void* remote_sidlx_rmi_IPv4Socket__cast(
 
1463
  struct sidlx_rmi_IPv4Socket__object* self,
 
1464
  const char* name, sidl_BaseInterface* _ex)
 
1465
{
 
1466
  int cmp;
 
1467
  void* cast = NULL;
 
1468
  *_ex = NULL; /* default to no exception */
 
1469
  cmp = strcmp(name, "sidlx.rmi.IPv4Socket");
 
1470
  if (!cmp) {
 
1471
    (*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
 
1472
    cast = ((struct sidlx_rmi_IPv4Socket__object*)self);
 
1473
    return cast;
 
1474
  }
 
1475
  else if (cmp < 0) {
 
1476
    cmp = strcmp(name, "sidl.BaseInterface");
 
1477
    if (!cmp) {
 
1478
      (*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
 
1479
      cast = &((*self).d_sidl_baseclass.d_sidl_baseinterface);
 
1480
      return cast;
 
1481
    }
 
1482
    else if (cmp < 0) {
 
1483
      cmp = strcmp(name, "sidl.BaseClass");
 
1484
      if (!cmp) {
 
1485
        (*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
 
1486
        cast = ((struct sidl_BaseClass__object*)self);
 
1487
        return cast;
 
1488
      }
 
1489
    }
 
1490
  }
 
1491
  else if (cmp > 0) {
 
1492
    cmp = strcmp(name, "sidlx.rmi.Socket");
 
1493
    if (!cmp) {
 
1494
      (*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
 
1495
      cast = &((*self).d_sidlx_rmi_socket);
 
1496
      return cast;
 
1497
    }
 
1498
  }
 
1499
  if ((*self->d_epv->f_isType)(self,name, _ex)) {
 
1500
    void* (*func)(struct sidl_rmi_InstanceHandle__object*, struct 
 
1501
      sidl_BaseInterface__object**) = 
 
1502
      (void* (*)(struct sidl_rmi_InstanceHandle__object*, struct 
 
1503
        sidl_BaseInterface__object**)) 
 
1504
      sidl_rmi_ConnectRegistry_getConnect(name, _ex);SIDL_CHECK(*_ex);
 
1505
    cast =  (*func)(((struct sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih, 
 
1506
      _ex);
 
1507
  }
 
1508
 
 
1509
  return cast;
 
1510
  EXIT:
 
1511
  return NULL;
 
1512
}
 
1513
 
 
1514
/* REMOTE DELETE: call the remote destructor for the object. */
 
1515
static void remote_sidlx_rmi_IPv4Socket__delete(
 
1516
  struct sidlx_rmi_IPv4Socket__object* self,
 
1517
  struct sidl_BaseInterface__object* *_ex)
 
1518
{
 
1519
  *_ex = NULL;
 
1520
  free((void*) self);
 
1521
}
 
1522
 
 
1523
/* REMOTE GETURL: call the getURL function for the object. */
 
1524
static char* remote_sidlx_rmi_IPv4Socket__getURL(
 
1525
  struct sidlx_rmi_IPv4Socket__object* self, struct sidl_BaseInterface__object* 
 
1526
    *_ex)
 
1527
{
 
1528
  struct sidl_rmi_InstanceHandle__object *conn = ((struct 
 
1529
    sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
1530
  *_ex = NULL;
 
1531
  if(conn != NULL) {
 
1532
    return sidl_rmi_InstanceHandle_getObjectURL(conn, _ex);
 
1533
  }
 
1534
  return NULL;
 
1535
}
 
1536
 
 
1537
/* REMOTE ADDREF: For internal babel use only! Remote addRef. */
 
1538
static void remote_sidlx_rmi_IPv4Socket__raddRef(
 
1539
  struct sidlx_rmi_IPv4Socket__object* self,struct sidl_BaseInterface__object* 
 
1540
    *_ex)
 
1541
{
 
1542
  struct sidl_BaseException__object* netex = NULL;
 
1543
  /* initialize a new invocation */
 
1544
  struct sidl_BaseInterface__object* _throwaway = NULL;
 
1545
  struct sidl_rmi_InstanceHandle__object *_conn = ((struct 
 
1546
    sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
1547
  sidl_rmi_Response _rsvp = NULL;
 
1548
  sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
1549
    "addRef", _ex ); SIDL_CHECK(*_ex);
 
1550
  /* send actual RMI request */
 
1551
  _rsvp = sidl_rmi_Invocation_invokeMethod(_inv,_ex);SIDL_CHECK(*_ex);
 
1552
  /* Check for exceptions */
 
1553
  netex = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);
 
1554
  if(netex != NULL) {
 
1555
    *_ex = (struct sidl_BaseInterface__object*)netex;
 
1556
    return;
 
1557
  }
 
1558
 
 
1559
  /* cleanup and return */
 
1560
  EXIT:
 
1561
  if(_inv) { sidl_rmi_Invocation_deleteRef(_inv,&_throwaway); }
 
1562
  if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp,&_throwaway); }
 
1563
  return;
 
1564
}
 
1565
 
 
1566
/* REMOTE ISREMOTE: returns true if this object is Remote (it is). */
 
1567
static sidl_bool
 
1568
remote_sidlx_rmi_IPv4Socket__isRemote(
 
1569
    struct sidlx_rmi_IPv4Socket__object* self, 
 
1570
    struct sidl_BaseInterface__object* *_ex) {
 
1571
  *_ex = NULL;
 
1572
  return TRUE;
 
1573
}
 
1574
 
 
1575
/* REMOTE METHOD STUB:_set_hooks */
 
1576
static void
 
1577
remote_sidlx_rmi_IPv4Socket__set_hooks(
 
1578
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
1579
  /* in */ sidl_bool on,
 
1580
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
1581
{
 
1582
  LANG_SPECIFIC_INIT();
 
1583
  *_ex = NULL;
 
1584
  {
 
1585
    /* initialize a new invocation */
 
1586
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
1587
    sidl_BaseException _be = NULL;
 
1588
    sidl_rmi_Response _rsvp = NULL;
 
1589
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
1590
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
1591
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
1592
      "_set_hooks", _ex ); SIDL_CHECK(*_ex);
 
1593
 
 
1594
    /* pack in and inout arguments */
 
1595
    sidl_rmi_Invocation_packBool( _inv, "on", on, _ex);SIDL_CHECK(*_ex);
 
1596
 
 
1597
    /* send actual RMI request */
 
1598
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
1599
 
 
1600
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
1601
    if(_be != NULL) {
 
1602
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
1603
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket._set_hooks.", &throwaway_exception);
 
1604
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
1605
        &throwaway_exception);
 
1606
      goto EXIT;
 
1607
    }
 
1608
 
 
1609
    /* unpack out and inout arguments */
 
1610
 
 
1611
    /* cleanup and return */
 
1612
    EXIT:
 
1613
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
1614
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
1615
    return;
 
1616
  }
 
1617
}
 
1618
 
 
1619
/* REMOTE EXEC: call the exec function for the object. */
 
1620
static void remote_sidlx_rmi_IPv4Socket__exec(
 
1621
  struct sidlx_rmi_IPv4Socket__object* self,const char* methodName,
 
1622
  sidl_rmi_Call inArgs,
 
1623
  sidl_rmi_Return outArgs,
 
1624
  struct sidl_BaseInterface__object* *_ex)
 
1625
{
 
1626
  *_ex = NULL;
 
1627
}
 
1628
 
 
1629
/* REMOTE METHOD STUB:getsockname */
 
1630
static int32_t
 
1631
remote_sidlx_rmi_IPv4Socket_getsockname(
 
1632
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
1633
  /* inout */ int32_t* address,
 
1634
  /* inout */ int32_t* port,
 
1635
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
1636
{
 
1637
  LANG_SPECIFIC_INIT();
 
1638
  *_ex = NULL;
 
1639
  {
 
1640
    /* initialize a new invocation */
 
1641
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
1642
    sidl_BaseException _be = NULL;
 
1643
    sidl_rmi_Response _rsvp = NULL;
 
1644
    int32_t _retval = 0;
 
1645
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
1646
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
1647
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
1648
      "getsockname", _ex ); SIDL_CHECK(*_ex);
 
1649
 
 
1650
    /* pack in and inout arguments */
 
1651
    sidl_rmi_Invocation_packInt( _inv, "address", *address, _ex);SIDL_CHECK(
 
1652
      *_ex);
 
1653
    sidl_rmi_Invocation_packInt( _inv, "port", *port, _ex);SIDL_CHECK(*_ex);
 
1654
 
 
1655
    /* send actual RMI request */
 
1656
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
1657
 
 
1658
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
1659
    if(_be != NULL) {
 
1660
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
1661
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.getsockname.", &throwaway_exception);
 
1662
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
1663
        &throwaway_exception);
 
1664
      goto EXIT;
 
1665
    }
 
1666
 
 
1667
    /* extract return value */
 
1668
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
1669
      *_ex);
 
1670
 
 
1671
    /* unpack out and inout arguments */
 
1672
    sidl_rmi_Response_unpackInt( _rsvp, "address", address, _ex);SIDL_CHECK(
 
1673
      *_ex);
 
1674
    sidl_rmi_Response_unpackInt( _rsvp, "port", port, _ex);SIDL_CHECK(*_ex);
 
1675
 
 
1676
    /* cleanup and return */
 
1677
    EXIT:
 
1678
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
1679
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
1680
    return _retval;
 
1681
  }
 
1682
}
 
1683
 
 
1684
/* REMOTE METHOD STUB:getpeername */
 
1685
static int32_t
 
1686
remote_sidlx_rmi_IPv4Socket_getpeername(
 
1687
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
1688
  /* inout */ int32_t* address,
 
1689
  /* inout */ int32_t* port,
 
1690
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
1691
{
 
1692
  LANG_SPECIFIC_INIT();
 
1693
  *_ex = NULL;
 
1694
  {
 
1695
    /* initialize a new invocation */
 
1696
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
1697
    sidl_BaseException _be = NULL;
 
1698
    sidl_rmi_Response _rsvp = NULL;
 
1699
    int32_t _retval = 0;
 
1700
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
1701
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
1702
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
1703
      "getpeername", _ex ); SIDL_CHECK(*_ex);
 
1704
 
 
1705
    /* pack in and inout arguments */
 
1706
    sidl_rmi_Invocation_packInt( _inv, "address", *address, _ex);SIDL_CHECK(
 
1707
      *_ex);
 
1708
    sidl_rmi_Invocation_packInt( _inv, "port", *port, _ex);SIDL_CHECK(*_ex);
 
1709
 
 
1710
    /* send actual RMI request */
 
1711
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
1712
 
 
1713
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
1714
    if(_be != NULL) {
 
1715
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
1716
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.getpeername.", &throwaway_exception);
 
1717
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
1718
        &throwaway_exception);
 
1719
      goto EXIT;
 
1720
    }
 
1721
 
 
1722
    /* extract return value */
 
1723
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
1724
      *_ex);
 
1725
 
 
1726
    /* unpack out and inout arguments */
 
1727
    sidl_rmi_Response_unpackInt( _rsvp, "address", address, _ex);SIDL_CHECK(
 
1728
      *_ex);
 
1729
    sidl_rmi_Response_unpackInt( _rsvp, "port", port, _ex);SIDL_CHECK(*_ex);
 
1730
 
 
1731
    /* cleanup and return */
 
1732
    EXIT:
 
1733
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
1734
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
1735
    return _retval;
 
1736
  }
 
1737
}
 
1738
 
 
1739
/* REMOTE METHOD STUB:addRef */
 
1740
static void
 
1741
remote_sidlx_rmi_IPv4Socket_addRef(
 
1742
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
1743
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
1744
{
 
1745
  LANG_SPECIFIC_INIT();
 
1746
  *_ex = NULL;
 
1747
  {
 
1748
    struct sidlx_rmi_IPv4Socket__remote* r_obj = (struct 
 
1749
      sidlx_rmi_IPv4Socket__remote*)self->d_data;
 
1750
    LOCK_STATIC_GLOBALS;
 
1751
    r_obj->d_refcount++;
 
1752
#ifdef SIDL_DEBUG_REFCOUNT
 
1753
    fprintf(stderr, "babel: addRef %p new count %d (type %s)\n",r_obj, r_obj->d_refcount, "sidlx.rmi.IPv4Socket Remote Stub");
 
1754
#endif /* SIDL_DEBUG_REFCOUNT */ 
 
1755
    UNLOCK_STATIC_GLOBALS;
 
1756
  }
 
1757
}
 
1758
 
 
1759
/* REMOTE METHOD STUB:deleteRef */
 
1760
static void
 
1761
remote_sidlx_rmi_IPv4Socket_deleteRef(
 
1762
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
1763
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
1764
{
 
1765
  LANG_SPECIFIC_INIT();
 
1766
  *_ex = NULL;
 
1767
  {
 
1768
    struct sidlx_rmi_IPv4Socket__remote* r_obj = (struct 
 
1769
      sidlx_rmi_IPv4Socket__remote*)self->d_data;
 
1770
    LOCK_STATIC_GLOBALS;
 
1771
    r_obj->d_refcount--;
 
1772
#ifdef SIDL_DEBUG_REFCOUNT
 
1773
    fprintf(stderr, "babel: deleteRef %p new count %d (type %s)\n",r_obj, r_obj->d_refcount, "sidlx.rmi.IPv4Socket Remote Stub");
 
1774
#endif /* SIDL_DEBUG_REFCOUNT */ 
 
1775
    if(r_obj->d_refcount == 0) {
 
1776
      sidl_rmi_InstanceHandle_deleteRef(r_obj->d_ih, _ex);
 
1777
      free(r_obj);
 
1778
      free(self);
 
1779
    }
 
1780
    UNLOCK_STATIC_GLOBALS;
 
1781
  }
 
1782
}
 
1783
 
 
1784
/* REMOTE METHOD STUB:isSame */
 
1785
static sidl_bool
 
1786
remote_sidlx_rmi_IPv4Socket_isSame(
 
1787
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
1788
  /* in */ struct sidl_BaseInterface__object* iobj,
 
1789
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
1790
{
 
1791
  LANG_SPECIFIC_INIT();
 
1792
  *_ex = NULL;
 
1793
  {
 
1794
    /* initialize a new invocation */
 
1795
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
1796
    sidl_BaseException _be = NULL;
 
1797
    sidl_rmi_Response _rsvp = NULL;
 
1798
    sidl_bool _retval = FALSE;
 
1799
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
1800
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
1801
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
1802
      "isSame", _ex ); SIDL_CHECK(*_ex);
 
1803
 
 
1804
    /* pack in and inout arguments */
 
1805
    if(iobj){
 
1806
      char* _url = sidl_BaseInterface__getURL((sidl_BaseInterface)iobj, 
 
1807
        _ex);SIDL_CHECK(*_ex);
 
1808
      sidl_rmi_Invocation_packString( _inv, "iobj", _url, _ex);SIDL_CHECK(*_ex);
 
1809
      free((void*)_url);
 
1810
    } else {
 
1811
      sidl_rmi_Invocation_packString( _inv, "iobj", NULL, _ex);SIDL_CHECK(*_ex);
 
1812
    }
 
1813
 
 
1814
    /* send actual RMI request */
 
1815
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
1816
 
 
1817
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
1818
    if(_be != NULL) {
 
1819
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
1820
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.isSame.", &throwaway_exception);
 
1821
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
1822
        &throwaway_exception);
 
1823
      goto EXIT;
 
1824
    }
 
1825
 
 
1826
    /* extract return value */
 
1827
    sidl_rmi_Response_unpackBool( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
1828
      *_ex);
 
1829
 
 
1830
    /* unpack out and inout arguments */
 
1831
 
 
1832
    /* cleanup and return */
 
1833
    EXIT:
 
1834
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
1835
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
1836
    return _retval;
 
1837
  }
 
1838
}
 
1839
 
 
1840
/* REMOTE METHOD STUB:isType */
 
1841
static sidl_bool
 
1842
remote_sidlx_rmi_IPv4Socket_isType(
 
1843
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
1844
  /* in */ const char* name,
 
1845
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
1846
{
 
1847
  LANG_SPECIFIC_INIT();
 
1848
  *_ex = NULL;
 
1849
  {
 
1850
    /* initialize a new invocation */
 
1851
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
1852
    sidl_BaseException _be = NULL;
 
1853
    sidl_rmi_Response _rsvp = NULL;
 
1854
    sidl_bool _retval = FALSE;
 
1855
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
1856
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
1857
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
1858
      "isType", _ex ); SIDL_CHECK(*_ex);
 
1859
 
 
1860
    /* pack in and inout arguments */
 
1861
    sidl_rmi_Invocation_packString( _inv, "name", name, _ex);SIDL_CHECK(*_ex);
 
1862
 
 
1863
    /* send actual RMI request */
 
1864
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
1865
 
 
1866
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
1867
    if(_be != NULL) {
 
1868
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
1869
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.isType.", &throwaway_exception);
 
1870
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
1871
        &throwaway_exception);
 
1872
      goto EXIT;
 
1873
    }
 
1874
 
 
1875
    /* extract return value */
 
1876
    sidl_rmi_Response_unpackBool( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
1877
      *_ex);
 
1878
 
 
1879
    /* unpack out and inout arguments */
 
1880
 
 
1881
    /* cleanup and return */
 
1882
    EXIT:
 
1883
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
1884
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
1885
    return _retval;
 
1886
  }
 
1887
}
 
1888
 
 
1889
/* REMOTE METHOD STUB:getClassInfo */
 
1890
static struct sidl_ClassInfo__object*
 
1891
remote_sidlx_rmi_IPv4Socket_getClassInfo(
 
1892
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
1893
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
1894
{
 
1895
  LANG_SPECIFIC_INIT();
 
1896
  *_ex = NULL;
 
1897
  {
 
1898
    /* initialize a new invocation */
 
1899
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
1900
    sidl_BaseException _be = NULL;
 
1901
    sidl_rmi_Response _rsvp = NULL;
 
1902
    char*_retval_str = NULL;
 
1903
    struct sidl_ClassInfo__object* _retval = 0;
 
1904
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
1905
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
1906
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
1907
      "getClassInfo", _ex ); SIDL_CHECK(*_ex);
 
1908
 
 
1909
    /* pack in and inout arguments */
 
1910
 
 
1911
    /* send actual RMI request */
 
1912
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
1913
 
 
1914
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
1915
    if(_be != NULL) {
 
1916
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
1917
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.getClassInfo.", &throwaway_exception);
 
1918
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
1919
        &throwaway_exception);
 
1920
      goto EXIT;
 
1921
    }
 
1922
 
 
1923
    /* extract return value */
 
1924
    sidl_rmi_Response_unpackString( _rsvp, "_retval", &_retval_str, 
 
1925
      _ex);SIDL_CHECK(*_ex);
 
1926
    _retval = sidl_ClassInfo__connectI(_retval_str, FALSE, _ex);SIDL_CHECK(
 
1927
      *_ex);
 
1928
 
 
1929
    /* unpack out and inout arguments */
 
1930
 
 
1931
    /* cleanup and return */
 
1932
    EXIT:
 
1933
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
1934
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
1935
    return _retval;
 
1936
  }
 
1937
}
 
1938
 
 
1939
/* REMOTE METHOD STUB:close */
 
1940
static int32_t
 
1941
remote_sidlx_rmi_IPv4Socket_close(
 
1942
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
1943
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
1944
{
 
1945
  LANG_SPECIFIC_INIT();
 
1946
  *_ex = NULL;
 
1947
  {
 
1948
    /* initialize a new invocation */
 
1949
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
1950
    sidl_BaseException _be = NULL;
 
1951
    sidl_rmi_Response _rsvp = NULL;
 
1952
    int32_t _retval = 0;
 
1953
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
1954
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
1955
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
1956
      "close", _ex ); SIDL_CHECK(*_ex);
 
1957
 
 
1958
    /* pack in and inout arguments */
 
1959
 
 
1960
    /* send actual RMI request */
 
1961
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
1962
 
 
1963
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
1964
    if(_be != NULL) {
 
1965
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
1966
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.close.", &throwaway_exception);
 
1967
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
1968
        &throwaway_exception);
 
1969
      goto EXIT;
 
1970
    }
 
1971
 
 
1972
    /* extract return value */
 
1973
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
1974
      *_ex);
 
1975
 
 
1976
    /* unpack out and inout arguments */
 
1977
 
 
1978
    /* cleanup and return */
 
1979
    EXIT:
 
1980
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
1981
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
1982
    return _retval;
 
1983
  }
 
1984
}
 
1985
 
 
1986
/* REMOTE METHOD STUB:readn */
 
1987
static int32_t
 
1988
remote_sidlx_rmi_IPv4Socket_readn(
 
1989
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
1990
  /* in */ int32_t nbytes,
 
1991
  /* inout array<char> */ struct sidl_char__array** data,
 
1992
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
1993
{
 
1994
  LANG_SPECIFIC_INIT();
 
1995
  *_ex = NULL;
 
1996
  {
 
1997
    /* initialize a new invocation */
 
1998
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
1999
    sidl_BaseException _be = NULL;
 
2000
    sidl_rmi_Response _rsvp = NULL;
 
2001
    int32_t _retval = 0;
 
2002
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2003
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2004
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2005
      "readn", _ex ); SIDL_CHECK(*_ex);
 
2006
 
 
2007
    /* pack in and inout arguments */
 
2008
    sidl_rmi_Invocation_packInt( _inv, "nbytes", nbytes, _ex);SIDL_CHECK(*_ex);
 
2009
    sidl_rmi_Invocation_packCharArray( _inv, "data",*data,0,0,0, 
 
2010
      _ex);SIDL_CHECK(*_ex);
 
2011
 
 
2012
    /* send actual RMI request */
 
2013
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2014
 
 
2015
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2016
    if(_be != NULL) {
 
2017
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2018
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.readn.", &throwaway_exception);
 
2019
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2020
        &throwaway_exception);
 
2021
      goto EXIT;
 
2022
    }
 
2023
 
 
2024
    /* extract return value */
 
2025
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
2026
      *_ex);
 
2027
 
 
2028
    /* unpack out and inout arguments */
 
2029
    sidl_rmi_Response_unpackCharArray( _rsvp, "data", data,0,0,FALSE, 
 
2030
      _ex);SIDL_CHECK(*_ex);
 
2031
 
 
2032
    /* cleanup and return */
 
2033
    EXIT:
 
2034
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2035
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2036
    return _retval;
 
2037
  }
 
2038
}
 
2039
 
 
2040
/* REMOTE METHOD STUB:readline */
 
2041
static int32_t
 
2042
remote_sidlx_rmi_IPv4Socket_readline(
 
2043
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
2044
  /* in */ int32_t nbytes,
 
2045
  /* inout array<char> */ struct sidl_char__array** data,
 
2046
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
2047
{
 
2048
  LANG_SPECIFIC_INIT();
 
2049
  *_ex = NULL;
 
2050
  {
 
2051
    /* initialize a new invocation */
 
2052
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
2053
    sidl_BaseException _be = NULL;
 
2054
    sidl_rmi_Response _rsvp = NULL;
 
2055
    int32_t _retval = 0;
 
2056
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2057
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2058
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2059
      "readline", _ex ); SIDL_CHECK(*_ex);
 
2060
 
 
2061
    /* pack in and inout arguments */
 
2062
    sidl_rmi_Invocation_packInt( _inv, "nbytes", nbytes, _ex);SIDL_CHECK(*_ex);
 
2063
    sidl_rmi_Invocation_packCharArray( _inv, "data",*data,0,0,0, 
 
2064
      _ex);SIDL_CHECK(*_ex);
 
2065
 
 
2066
    /* send actual RMI request */
 
2067
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2068
 
 
2069
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2070
    if(_be != NULL) {
 
2071
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2072
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.readline.", &throwaway_exception);
 
2073
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2074
        &throwaway_exception);
 
2075
      goto EXIT;
 
2076
    }
 
2077
 
 
2078
    /* extract return value */
 
2079
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
2080
      *_ex);
 
2081
 
 
2082
    /* unpack out and inout arguments */
 
2083
    sidl_rmi_Response_unpackCharArray( _rsvp, "data", data,0,0,FALSE, 
 
2084
      _ex);SIDL_CHECK(*_ex);
 
2085
 
 
2086
    /* cleanup and return */
 
2087
    EXIT:
 
2088
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2089
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2090
    return _retval;
 
2091
  }
 
2092
}
 
2093
 
 
2094
/* REMOTE METHOD STUB:readstring */
 
2095
static int32_t
 
2096
remote_sidlx_rmi_IPv4Socket_readstring(
 
2097
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
2098
  /* in */ int32_t nbytes,
 
2099
  /* inout array<char> */ struct sidl_char__array** data,
 
2100
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
2101
{
 
2102
  LANG_SPECIFIC_INIT();
 
2103
  *_ex = NULL;
 
2104
  {
 
2105
    /* initialize a new invocation */
 
2106
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
2107
    sidl_BaseException _be = NULL;
 
2108
    sidl_rmi_Response _rsvp = NULL;
 
2109
    int32_t _retval = 0;
 
2110
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2111
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2112
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2113
      "readstring", _ex ); SIDL_CHECK(*_ex);
 
2114
 
 
2115
    /* pack in and inout arguments */
 
2116
    sidl_rmi_Invocation_packInt( _inv, "nbytes", nbytes, _ex);SIDL_CHECK(*_ex);
 
2117
    sidl_rmi_Invocation_packCharArray( _inv, "data",*data,0,0,0, 
 
2118
      _ex);SIDL_CHECK(*_ex);
 
2119
 
 
2120
    /* send actual RMI request */
 
2121
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2122
 
 
2123
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2124
    if(_be != NULL) {
 
2125
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2126
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.readstring.", &throwaway_exception);
 
2127
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2128
        &throwaway_exception);
 
2129
      goto EXIT;
 
2130
    }
 
2131
 
 
2132
    /* extract return value */
 
2133
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
2134
      *_ex);
 
2135
 
 
2136
    /* unpack out and inout arguments */
 
2137
    sidl_rmi_Response_unpackCharArray( _rsvp, "data", data,0,0,FALSE, 
 
2138
      _ex);SIDL_CHECK(*_ex);
 
2139
 
 
2140
    /* cleanup and return */
 
2141
    EXIT:
 
2142
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2143
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2144
    return _retval;
 
2145
  }
 
2146
}
 
2147
 
 
2148
/* REMOTE METHOD STUB:readstring_alloc */
 
2149
static int32_t
 
2150
remote_sidlx_rmi_IPv4Socket_readstring_alloc(
 
2151
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
2152
  /* inout array<char> */ struct sidl_char__array** data,
 
2153
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
2154
{
 
2155
  LANG_SPECIFIC_INIT();
 
2156
  *_ex = NULL;
 
2157
  {
 
2158
    /* initialize a new invocation */
 
2159
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
2160
    sidl_BaseException _be = NULL;
 
2161
    sidl_rmi_Response _rsvp = NULL;
 
2162
    int32_t _retval = 0;
 
2163
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2164
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2165
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2166
      "readstring_alloc", _ex ); SIDL_CHECK(*_ex);
 
2167
 
 
2168
    /* pack in and inout arguments */
 
2169
    sidl_rmi_Invocation_packCharArray( _inv, "data",*data,0,0,0, 
 
2170
      _ex);SIDL_CHECK(*_ex);
 
2171
 
 
2172
    /* send actual RMI request */
 
2173
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2174
 
 
2175
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2176
    if(_be != NULL) {
 
2177
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2178
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.readstring_alloc.", &throwaway_exception);
 
2179
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2180
        &throwaway_exception);
 
2181
      goto EXIT;
 
2182
    }
 
2183
 
 
2184
    /* extract return value */
 
2185
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
2186
      *_ex);
 
2187
 
 
2188
    /* unpack out and inout arguments */
 
2189
    sidl_rmi_Response_unpackCharArray( _rsvp, "data", data,0,0,FALSE, 
 
2190
      _ex);SIDL_CHECK(*_ex);
 
2191
 
 
2192
    /* cleanup and return */
 
2193
    EXIT:
 
2194
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2195
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2196
    return _retval;
 
2197
  }
 
2198
}
 
2199
 
 
2200
/* REMOTE METHOD STUB:readint */
 
2201
static int32_t
 
2202
remote_sidlx_rmi_IPv4Socket_readint(
 
2203
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
2204
  /* inout */ int32_t* data,
 
2205
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
2206
{
 
2207
  LANG_SPECIFIC_INIT();
 
2208
  *_ex = NULL;
 
2209
  {
 
2210
    /* initialize a new invocation */
 
2211
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
2212
    sidl_BaseException _be = NULL;
 
2213
    sidl_rmi_Response _rsvp = NULL;
 
2214
    int32_t _retval = 0;
 
2215
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2216
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2217
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2218
      "readint", _ex ); SIDL_CHECK(*_ex);
 
2219
 
 
2220
    /* pack in and inout arguments */
 
2221
    sidl_rmi_Invocation_packInt( _inv, "data", *data, _ex);SIDL_CHECK(*_ex);
 
2222
 
 
2223
    /* send actual RMI request */
 
2224
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2225
 
 
2226
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2227
    if(_be != NULL) {
 
2228
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2229
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.readint.", &throwaway_exception);
 
2230
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2231
        &throwaway_exception);
 
2232
      goto EXIT;
 
2233
    }
 
2234
 
 
2235
    /* extract return value */
 
2236
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
2237
      *_ex);
 
2238
 
 
2239
    /* unpack out and inout arguments */
 
2240
    sidl_rmi_Response_unpackInt( _rsvp, "data", data, _ex);SIDL_CHECK(*_ex);
 
2241
 
 
2242
    /* cleanup and return */
 
2243
    EXIT:
 
2244
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2245
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2246
    return _retval;
 
2247
  }
 
2248
}
 
2249
 
 
2250
/* REMOTE METHOD STUB:writen */
 
2251
static int32_t
 
2252
remote_sidlx_rmi_IPv4Socket_writen(
 
2253
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
2254
  /* in */ int32_t nbytes,
 
2255
  /* in array<char> */ struct sidl_char__array* data,
 
2256
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
2257
{
 
2258
  LANG_SPECIFIC_INIT();
 
2259
  *_ex = NULL;
 
2260
  {
 
2261
    /* initialize a new invocation */
 
2262
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
2263
    sidl_BaseException _be = NULL;
 
2264
    sidl_rmi_Response _rsvp = NULL;
 
2265
    int32_t _retval = 0;
 
2266
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2267
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2268
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2269
      "writen", _ex ); SIDL_CHECK(*_ex);
 
2270
 
 
2271
    /* pack in and inout arguments */
 
2272
    sidl_rmi_Invocation_packInt( _inv, "nbytes", nbytes, _ex);SIDL_CHECK(*_ex);
 
2273
    sidl_rmi_Invocation_packCharArray( _inv, "data",data,0,0,0, _ex);SIDL_CHECK(
 
2274
      *_ex);
 
2275
 
 
2276
    /* send actual RMI request */
 
2277
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2278
 
 
2279
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2280
    if(_be != NULL) {
 
2281
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2282
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.writen.", &throwaway_exception);
 
2283
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2284
        &throwaway_exception);
 
2285
      goto EXIT;
 
2286
    }
 
2287
 
 
2288
    /* extract return value */
 
2289
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
2290
      *_ex);
 
2291
 
 
2292
    /* unpack out and inout arguments */
 
2293
 
 
2294
    /* cleanup and return */
 
2295
    EXIT:
 
2296
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2297
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2298
    return _retval;
 
2299
  }
 
2300
}
 
2301
 
 
2302
/* REMOTE METHOD STUB:writestring */
 
2303
static int32_t
 
2304
remote_sidlx_rmi_IPv4Socket_writestring(
 
2305
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
2306
  /* in */ int32_t nbytes,
 
2307
  /* in array<char> */ struct sidl_char__array* data,
 
2308
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
2309
{
 
2310
  LANG_SPECIFIC_INIT();
 
2311
  *_ex = NULL;
 
2312
  {
 
2313
    /* initialize a new invocation */
 
2314
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
2315
    sidl_BaseException _be = NULL;
 
2316
    sidl_rmi_Response _rsvp = NULL;
 
2317
    int32_t _retval = 0;
 
2318
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2319
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2320
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2321
      "writestring", _ex ); SIDL_CHECK(*_ex);
 
2322
 
 
2323
    /* pack in and inout arguments */
 
2324
    sidl_rmi_Invocation_packInt( _inv, "nbytes", nbytes, _ex);SIDL_CHECK(*_ex);
 
2325
    sidl_rmi_Invocation_packCharArray( _inv, "data",data,0,0,0, _ex);SIDL_CHECK(
 
2326
      *_ex);
 
2327
 
 
2328
    /* send actual RMI request */
 
2329
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2330
 
 
2331
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2332
    if(_be != NULL) {
 
2333
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2334
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.writestring.", &throwaway_exception);
 
2335
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2336
        &throwaway_exception);
 
2337
      goto EXIT;
 
2338
    }
 
2339
 
 
2340
    /* extract return value */
 
2341
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
2342
      *_ex);
 
2343
 
 
2344
    /* unpack out and inout arguments */
 
2345
 
 
2346
    /* cleanup and return */
 
2347
    EXIT:
 
2348
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2349
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2350
    return _retval;
 
2351
  }
 
2352
}
 
2353
 
 
2354
/* REMOTE METHOD STUB:writeint */
 
2355
static int32_t
 
2356
remote_sidlx_rmi_IPv4Socket_writeint(
 
2357
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
2358
  /* in */ int32_t data,
 
2359
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
2360
{
 
2361
  LANG_SPECIFIC_INIT();
 
2362
  *_ex = NULL;
 
2363
  {
 
2364
    /* initialize a new invocation */
 
2365
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
2366
    sidl_BaseException _be = NULL;
 
2367
    sidl_rmi_Response _rsvp = NULL;
 
2368
    int32_t _retval = 0;
 
2369
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2370
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2371
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2372
      "writeint", _ex ); SIDL_CHECK(*_ex);
 
2373
 
 
2374
    /* pack in and inout arguments */
 
2375
    sidl_rmi_Invocation_packInt( _inv, "data", data, _ex);SIDL_CHECK(*_ex);
 
2376
 
 
2377
    /* send actual RMI request */
 
2378
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2379
 
 
2380
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2381
    if(_be != NULL) {
 
2382
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2383
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.writeint.", &throwaway_exception);
 
2384
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2385
        &throwaway_exception);
 
2386
      goto EXIT;
 
2387
    }
 
2388
 
 
2389
    /* extract return value */
 
2390
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
2391
      *_ex);
 
2392
 
 
2393
    /* unpack out and inout arguments */
 
2394
 
 
2395
    /* cleanup and return */
 
2396
    EXIT:
 
2397
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2398
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2399
    return _retval;
 
2400
  }
 
2401
}
 
2402
 
 
2403
/* REMOTE METHOD STUB:setFileDescriptor */
 
2404
static void
 
2405
remote_sidlx_rmi_IPv4Socket_setFileDescriptor(
 
2406
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
2407
  /* in */ int32_t fd,
 
2408
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
2409
{
 
2410
  LANG_SPECIFIC_INIT();
 
2411
  *_ex = NULL;
 
2412
  {
 
2413
    /* initialize a new invocation */
 
2414
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
2415
    sidl_BaseException _be = NULL;
 
2416
    sidl_rmi_Response _rsvp = NULL;
 
2417
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2418
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2419
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2420
      "setFileDescriptor", _ex ); SIDL_CHECK(*_ex);
 
2421
 
 
2422
    /* pack in and inout arguments */
 
2423
    sidl_rmi_Invocation_packInt( _inv, "fd", fd, _ex);SIDL_CHECK(*_ex);
 
2424
 
 
2425
    /* send actual RMI request */
 
2426
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2427
 
 
2428
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2429
    if(_be != NULL) {
 
2430
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2431
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.setFileDescriptor.", &throwaway_exception);
 
2432
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2433
        &throwaway_exception);
 
2434
      goto EXIT;
 
2435
    }
 
2436
 
 
2437
    /* unpack out and inout arguments */
 
2438
 
 
2439
    /* cleanup and return */
 
2440
    EXIT:
 
2441
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2442
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2443
    return;
 
2444
  }
 
2445
}
 
2446
 
 
2447
/* REMOTE METHOD STUB:getFileDescriptor */
 
2448
static int32_t
 
2449
remote_sidlx_rmi_IPv4Socket_getFileDescriptor(
 
2450
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
2451
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
2452
{
 
2453
  LANG_SPECIFIC_INIT();
 
2454
  *_ex = NULL;
 
2455
  {
 
2456
    /* initialize a new invocation */
 
2457
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
2458
    sidl_BaseException _be = NULL;
 
2459
    sidl_rmi_Response _rsvp = NULL;
 
2460
    int32_t _retval = 0;
 
2461
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2462
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2463
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2464
      "getFileDescriptor", _ex ); SIDL_CHECK(*_ex);
 
2465
 
 
2466
    /* pack in and inout arguments */
 
2467
 
 
2468
    /* send actual RMI request */
 
2469
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2470
 
 
2471
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2472
    if(_be != NULL) {
 
2473
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2474
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.getFileDescriptor.", &throwaway_exception);
 
2475
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2476
        &throwaway_exception);
 
2477
      goto EXIT;
 
2478
    }
 
2479
 
 
2480
    /* extract return value */
 
2481
    sidl_rmi_Response_unpackInt( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
2482
      *_ex);
 
2483
 
 
2484
    /* unpack out and inout arguments */
 
2485
 
 
2486
    /* cleanup and return */
 
2487
    EXIT:
 
2488
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2489
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2490
    return _retval;
 
2491
  }
 
2492
}
 
2493
 
 
2494
/* REMOTE METHOD STUB:test */
 
2495
static sidl_bool
 
2496
remote_sidlx_rmi_IPv4Socket_test(
 
2497
  /* in */ struct sidlx_rmi_IPv4Socket__object *self ,
 
2498
  /* in */ int32_t secs,
 
2499
  /* in */ int32_t usecs,
 
2500
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
2501
{
 
2502
  LANG_SPECIFIC_INIT();
 
2503
  *_ex = NULL;
 
2504
  {
 
2505
    /* initialize a new invocation */
 
2506
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
2507
    sidl_BaseException _be = NULL;
 
2508
    sidl_rmi_Response _rsvp = NULL;
 
2509
    sidl_bool _retval = FALSE;
 
2510
    struct sidl_rmi_InstanceHandle__object * _conn = ((struct 
 
2511
      sidlx_rmi_IPv4Socket__remote*)self->d_data)->d_ih;
 
2512
    sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, 
 
2513
      "test", _ex ); SIDL_CHECK(*_ex);
 
2514
 
 
2515
    /* pack in and inout arguments */
 
2516
    sidl_rmi_Invocation_packInt( _inv, "secs", secs, _ex);SIDL_CHECK(*_ex);
 
2517
    sidl_rmi_Invocation_packInt( _inv, "usecs", usecs, _ex);SIDL_CHECK(*_ex);
 
2518
 
 
2519
    /* send actual RMI request */
 
2520
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
2521
 
 
2522
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
2523
    if(_be != NULL) {
 
2524
      struct sidl_BaseInterface__object* throwaway_exception = NULL;
 
2525
sidl_BaseException_addLine(_be, "Exception unserialized from sidlx.rmi.IPv4Socket.test.", &throwaway_exception);
 
2526
      *_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast(_be,
 
2527
        &throwaway_exception);
 
2528
      goto EXIT;
 
2529
    }
 
2530
 
 
2531
    /* extract return value */
 
2532
    sidl_rmi_Response_unpackBool( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(
 
2533
      *_ex);
 
2534
 
 
2535
    /* unpack out and inout arguments */
 
2536
 
 
2537
    /* cleanup and return */
 
2538
    EXIT:
 
2539
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
2540
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
2541
    return _retval;
 
2542
  }
 
2543
}
 
2544
 
 
2545
/* REMOTE EPV: create remote entry point vectors (EPVs). */
 
2546
static void sidlx_rmi_IPv4Socket__init_remote_epv(void)
 
2547
{
 
2548
  /* assert( HAVE_LOCKED_STATIC_GLOBALS ); */
 
2549
  struct sidlx_rmi_IPv4Socket__epv* epv = &s_rem_epv__sidlx_rmi_ipv4socket;
 
2550
  struct sidl_BaseClass__epv*       e0  = &s_rem_epv__sidl_baseclass;
 
2551
  struct sidl_BaseInterface__epv*   e1  = &s_rem_epv__sidl_baseinterface;
 
2552
  struct sidlx_rmi_Socket__epv*     e2  = &s_rem_epv__sidlx_rmi_socket;
 
2553
 
 
2554
  epv->f__cast                  = remote_sidlx_rmi_IPv4Socket__cast;
 
2555
  epv->f__delete                = remote_sidlx_rmi_IPv4Socket__delete;
 
2556
  epv->f__exec                  = remote_sidlx_rmi_IPv4Socket__exec;
 
2557
  epv->f__getURL                = remote_sidlx_rmi_IPv4Socket__getURL;
 
2558
  epv->f__raddRef               = remote_sidlx_rmi_IPv4Socket__raddRef;
 
2559
  epv->f__isRemote              = remote_sidlx_rmi_IPv4Socket__isRemote;
 
2560
  epv->f__set_hooks             = remote_sidlx_rmi_IPv4Socket__set_hooks;
 
2561
  epv->f__ctor                  = NULL;
 
2562
  epv->f__ctor2                 = NULL;
 
2563
  epv->f__dtor                  = NULL;
 
2564
  epv->f_getsockname            = remote_sidlx_rmi_IPv4Socket_getsockname;
 
2565
  epv->f_getpeername            = remote_sidlx_rmi_IPv4Socket_getpeername;
 
2566
  epv->f_addRef                 = remote_sidlx_rmi_IPv4Socket_addRef;
 
2567
  epv->f_deleteRef              = remote_sidlx_rmi_IPv4Socket_deleteRef;
 
2568
  epv->f_isSame                 = remote_sidlx_rmi_IPv4Socket_isSame;
 
2569
  epv->f_isType                 = remote_sidlx_rmi_IPv4Socket_isType;
 
2570
  epv->f_getClassInfo           = remote_sidlx_rmi_IPv4Socket_getClassInfo;
 
2571
  epv->f_close                  = remote_sidlx_rmi_IPv4Socket_close;
 
2572
  epv->f_readn                  = remote_sidlx_rmi_IPv4Socket_readn;
 
2573
  epv->f_readline               = remote_sidlx_rmi_IPv4Socket_readline;
 
2574
  epv->f_readstring             = remote_sidlx_rmi_IPv4Socket_readstring;
 
2575
  epv->f_readstring_alloc       = remote_sidlx_rmi_IPv4Socket_readstring_alloc;
 
2576
  epv->f_readint                = remote_sidlx_rmi_IPv4Socket_readint;
 
2577
  epv->f_writen                 = remote_sidlx_rmi_IPv4Socket_writen;
 
2578
  epv->f_writestring            = remote_sidlx_rmi_IPv4Socket_writestring;
 
2579
  epv->f_writeint               = remote_sidlx_rmi_IPv4Socket_writeint;
 
2580
  epv->f_setFileDescriptor      = remote_sidlx_rmi_IPv4Socket_setFileDescriptor;
 
2581
  epv->f_getFileDescriptor      = remote_sidlx_rmi_IPv4Socket_getFileDescriptor;
 
2582
  epv->f_test                   = remote_sidlx_rmi_IPv4Socket_test;
 
2583
 
 
2584
  e0->f__cast        = (void* (*)(struct sidl_BaseClass__object*,const char*, 
 
2585
    struct sidl_BaseInterface__object**)) epv->f__cast;
 
2586
  e0->f__delete      = (void (*)(struct sidl_BaseClass__object*,struct 
 
2587
    sidl_BaseInterface__object**)) epv->f__delete;
 
2588
  e0->f__getURL      = (char* (*)(struct sidl_BaseClass__object*,struct 
 
2589
    sidl_BaseInterface__object**)) epv->f__getURL;
 
2590
  e0->f__raddRef     = (void (*)(struct sidl_BaseClass__object*,struct 
 
2591
    sidl_BaseInterface__object**)) epv->f__raddRef;
 
2592
  e0->f__isRemote    = (sidl_bool (*)(struct sidl_BaseClass__object*,struct 
 
2593
    sidl_BaseInterface__object**)) epv->f__isRemote;
 
2594
  e0->f__set_hooks   = (void (*)(struct sidl_BaseClass__object*,int32_t, struct 
 
2595
    sidl_BaseInterface__object**)) epv->f__set_hooks;
 
2596
  e0->f__exec        = (void (*)(struct sidl_BaseClass__object*,const char*,
 
2597
    struct sidl_rmi_Call__object*,struct sidl_rmi_Return__object*,struct 
 
2598
    sidl_BaseInterface__object **)) epv->f__exec;
 
2599
  e0->f_addRef       = (void (*)(struct sidl_BaseClass__object*,struct 
 
2600
    sidl_BaseInterface__object **)) epv->f_addRef;
 
2601
  e0->f_deleteRef    = (void (*)(struct sidl_BaseClass__object*,struct 
 
2602
    sidl_BaseInterface__object **)) epv->f_deleteRef;
 
2603
  e0->f_isSame       = (sidl_bool (*)(struct sidl_BaseClass__object*,struct 
 
2604
    sidl_BaseInterface__object*,struct sidl_BaseInterface__object **)) 
 
2605
    epv->f_isSame;
 
2606
  e0->f_isType       = (sidl_bool (*)(struct sidl_BaseClass__object*,const 
 
2607
    char*,struct sidl_BaseInterface__object **)) epv->f_isType;
 
2608
  e0->f_getClassInfo = (struct sidl_ClassInfo__object* (*)(struct 
 
2609
    sidl_BaseClass__object*,struct sidl_BaseInterface__object **)) 
 
2610
    epv->f_getClassInfo;
 
2611
 
 
2612
  e1->f__cast        = (void* (*)(void*,const char*, struct 
 
2613
    sidl_BaseInterface__object**)) epv->f__cast;
 
2614
  e1->f__delete      = (void (*)(void*,struct sidl_BaseInterface__object**)) 
 
2615
    epv->f__delete;
 
2616
  e1->f__getURL      = (char* (*)(void*,struct sidl_BaseInterface__object**)) 
 
2617
    epv->f__getURL;
 
2618
  e1->f__raddRef     = (void (*)(void*,struct sidl_BaseInterface__object**)) 
 
2619
    epv->f__raddRef;
 
2620
  e1->f__isRemote    = (sidl_bool (*)(void*,struct 
 
2621
    sidl_BaseInterface__object**)) epv->f__isRemote;
 
2622
  e1->f__set_hooks   = (void (*)(void*,int32_t, struct 
 
2623
    sidl_BaseInterface__object**)) epv->f__set_hooks;
 
2624
  e1->f__exec        = (void (*)(void*,const char*,struct 
 
2625
    sidl_rmi_Call__object*,struct sidl_rmi_Return__object*,struct 
 
2626
    sidl_BaseInterface__object **)) epv->f__exec;
 
2627
  e1->f_addRef       = (void (*)(void*,struct sidl_BaseInterface__object **)) 
 
2628
    epv->f_addRef;
 
2629
  e1->f_deleteRef    = (void (*)(void*,struct sidl_BaseInterface__object **)) 
 
2630
    epv->f_deleteRef;
 
2631
  e1->f_isSame       = (sidl_bool (*)(void*,struct sidl_BaseInterface__object*,
 
2632
    struct sidl_BaseInterface__object **)) epv->f_isSame;
 
2633
  e1->f_isType       = (sidl_bool (*)(void*,const char*,struct 
 
2634
    sidl_BaseInterface__object **)) epv->f_isType;
 
2635
  e1->f_getClassInfo = (struct sidl_ClassInfo__object* (*)(void*,struct 
 
2636
    sidl_BaseInterface__object **)) epv->f_getClassInfo;
 
2637
 
 
2638
  e2->f__cast             = (void* (*)(void*,const char*, struct 
 
2639
    sidl_BaseInterface__object**)) epv->f__cast;
 
2640
  e2->f__delete           = (void (*)(void*,struct 
 
2641
    sidl_BaseInterface__object**)) epv->f__delete;
 
2642
  e2->f__getURL           = (char* (*)(void*,struct 
 
2643
    sidl_BaseInterface__object**)) epv->f__getURL;
 
2644
  e2->f__raddRef          = (void (*)(void*,struct 
 
2645
    sidl_BaseInterface__object**)) epv->f__raddRef;
 
2646
  e2->f__isRemote         = (sidl_bool (*)(void*,struct 
 
2647
    sidl_BaseInterface__object**)) epv->f__isRemote;
 
2648
  e2->f__set_hooks        = (void (*)(void*,int32_t, struct 
 
2649
    sidl_BaseInterface__object**)) epv->f__set_hooks;
 
2650
  e2->f__exec             = (void (*)(void*,const char*,struct 
 
2651
    sidl_rmi_Call__object*,struct sidl_rmi_Return__object*,struct 
 
2652
    sidl_BaseInterface__object **)) epv->f__exec;
 
2653
  e2->f_close             = (int32_t (*)(void*,struct 
 
2654
    sidl_BaseInterface__object **)) epv->f_close;
 
2655
  e2->f_readn             = (int32_t (*)(void*,int32_t,struct 
 
2656
    sidl_char__array**,struct sidl_BaseInterface__object **)) epv->f_readn;
 
2657
  e2->f_readline          = (int32_t (*)(void*,int32_t,struct 
 
2658
    sidl_char__array**,struct sidl_BaseInterface__object **)) epv->f_readline;
 
2659
  e2->f_readstring        = (int32_t (*)(void*,int32_t,struct 
 
2660
    sidl_char__array**,struct sidl_BaseInterface__object **)) epv->f_readstring;
 
2661
  e2->f_readstring_alloc  = (int32_t (*)(void*,struct sidl_char__array**,struct 
 
2662
    sidl_BaseInterface__object **)) epv->f_readstring_alloc;
 
2663
  e2->f_readint           = (int32_t (*)(void*,int32_t*,struct 
 
2664
    sidl_BaseInterface__object **)) epv->f_readint;
 
2665
  e2->f_writen            = (int32_t (*)(void*,int32_t,struct sidl_char__array*,
 
2666
    struct sidl_BaseInterface__object **)) epv->f_writen;
 
2667
  e2->f_writestring       = (int32_t (*)(void*,int32_t,struct sidl_char__array*,
 
2668
    struct sidl_BaseInterface__object **)) epv->f_writestring;
 
2669
  e2->f_writeint          = (int32_t (*)(void*,int32_t,struct 
 
2670
    sidl_BaseInterface__object **)) epv->f_writeint;
 
2671
  e2->f_setFileDescriptor = (void (*)(void*,int32_t,struct 
 
2672
    sidl_BaseInterface__object **)) epv->f_setFileDescriptor;
 
2673
  e2->f_getFileDescriptor = (int32_t (*)(void*,struct 
 
2674
    sidl_BaseInterface__object **)) epv->f_getFileDescriptor;
 
2675
  e2->f_test              = (sidl_bool (*)(void*,int32_t,int32_t,struct 
 
2676
    sidl_BaseInterface__object **)) epv->f_test;
 
2677
  e2->f_addRef            = (void (*)(void*,struct sidl_BaseInterface__object 
 
2678
    **)) epv->f_addRef;
 
2679
  e2->f_deleteRef         = (void (*)(void*,struct sidl_BaseInterface__object 
 
2680
    **)) epv->f_deleteRef;
 
2681
  e2->f_isSame            = (sidl_bool (*)(void*,struct 
 
2682
    sidl_BaseInterface__object*,struct sidl_BaseInterface__object **)) 
 
2683
    epv->f_isSame;
 
2684
  e2->f_isType            = (sidl_bool (*)(void*,const char*,struct 
 
2685
    sidl_BaseInterface__object **)) epv->f_isType;
 
2686
  e2->f_getClassInfo      = (struct sidl_ClassInfo__object* (*)(void*,struct 
 
2687
    sidl_BaseInterface__object **)) epv->f_getClassInfo;
 
2688
 
 
2689
  s_remote_initialized = 1;
 
2690
}
 
2691
 
 
2692
/* Create an instance that connects to an existing remote object. */
 
2693
static struct sidlx_rmi_IPv4Socket__object*
 
2694
sidlx_rmi_IPv4Socket__remoteConnect(const char *url, sidl_bool ar, struct 
 
2695
  sidl_BaseInterface__object* *_ex)
 
2696
{
 
2697
  struct sidlx_rmi_IPv4Socket__object* self = NULL;
 
2698
 
 
2699
  struct sidlx_rmi_IPv4Socket__object* s0;
 
2700
  struct sidl_BaseClass__object* s1;
 
2701
 
 
2702
  struct sidlx_rmi_IPv4Socket__remote* r_obj = NULL;
 
2703
  sidl_rmi_InstanceHandle instance = NULL;
 
2704
  char* objectID = NULL;
 
2705
  objectID = NULL;
 
2706
  *_ex = NULL;
 
2707
  if(url == NULL) {return NULL;}
 
2708
  objectID = sidl_rmi_ServerRegistry_isLocalObject(url, _ex);
 
2709
  if(objectID) {
 
2710
    struct sidlx_rmi_IPv4Socket__object* retobj = NULL;
 
2711
    struct sidl_BaseInterface__object *throwaway_exception;
 
2712
    sidl_BaseInterface bi = (
 
2713
      sidl_BaseInterface)sidl_rmi_InstanceRegistry_getInstanceByString(objectID,
 
2714
      _ex); SIDL_CHECK(*_ex);
 
2715
    (*bi->d_epv->f_deleteRef)(bi->d_object, &throwaway_exception);
 
2716
    retobj = (struct sidlx_rmi_IPv4Socket__object*) (*bi->d_epv->f__cast)(
 
2717
      bi->d_object, "sidlx.rmi.IPv4Socket", _ex);
 
2718
    if(!ar) { 
 
2719
      (*bi->d_epv->f_deleteRef)(bi->d_object, &throwaway_exception);
 
2720
    }
 
2721
    return retobj;
 
2722
  }
 
2723
  instance = sidl_rmi_ProtocolFactory_connectInstance(url, 
 
2724
    "sidlx.rmi.IPv4Socket", ar, _ex ); SIDL_CHECK(*_ex);
 
2725
  if ( instance == NULL) { return NULL; }
 
2726
  self =
 
2727
    (struct sidlx_rmi_IPv4Socket__object*) malloc(
 
2728
      sizeof(struct sidlx_rmi_IPv4Socket__object));
 
2729
 
 
2730
  r_obj =
 
2731
    (struct sidlx_rmi_IPv4Socket__remote*) malloc(
 
2732
      sizeof(struct sidlx_rmi_IPv4Socket__remote));
 
2733
 
 
2734
  if(!self || !r_obj) {
 
2735
    sidl_MemAllocException ex = sidl_MemAllocException_getSingletonException(
 
2736
      _ex);
 
2737
    SIDL_CHECK(*_ex);
 
2738
    sidl_MemAllocException_setNote(ex, "Out of memory.", _ex); SIDL_CHECK(*_ex);
 
2739
    sidl_MemAllocException_add(ex, __FILE__, __LINE__, 
 
2740
      "sidlx.rmi.IPv4Socket.EPVgeneration", _ex);
 
2741
    SIDL_CHECK(*_ex);
 
2742
    *_ex = (struct sidl_BaseInterface__object*)ex;
 
2743
    goto EXIT;
 
2744
  }
 
2745
 
 
2746
  r_obj->d_refcount = 1;
 
2747
  r_obj->d_ih = instance;
 
2748
  s0 =                                self;
 
2749
  s1 =                                &s0->d_sidl_baseclass;
 
2750
 
 
2751
  LOCK_STATIC_GLOBALS;
 
2752
  if (!s_remote_initialized) {
 
2753
    sidlx_rmi_IPv4Socket__init_remote_epv();
 
2754
  }
 
2755
  UNLOCK_STATIC_GLOBALS;
 
2756
 
 
2757
  s1->d_sidl_baseinterface.d_epv    = &s_rem_epv__sidl_baseinterface;
 
2758
  s1->d_sidl_baseinterface.d_object = (void*) self;
 
2759
 
 
2760
  s1->d_data = (void*) r_obj;
 
2761
  s1->d_epv  = &s_rem_epv__sidl_baseclass;
 
2762
 
 
2763
  s0->d_sidlx_rmi_socket.d_epv    = &s_rem_epv__sidlx_rmi_socket;
 
2764
  s0->d_sidlx_rmi_socket.d_object = (void*) self;
 
2765
 
 
2766
  s0->d_data = (void*) r_obj;
 
2767
  s0->d_epv  = &s_rem_epv__sidlx_rmi_ipv4socket;
 
2768
 
 
2769
  self->d_data = (void*) r_obj;
 
2770
 
 
2771
  return self;
 
2772
  EXIT:
 
2773
  if(self) { free(self); }
 
2774
  if(r_obj) { free(r_obj); }
 
2775
  return NULL;
 
2776
}
 
2777
/* Create an instance that uses an already existing  */
 
2778
/* InstanceHandle to connect to an existing remote object. */
 
2779
static struct sidlx_rmi_IPv4Socket__object*
 
2780
sidlx_rmi_IPv4Socket__IHConnect(sidl_rmi_InstanceHandle instance, struct 
 
2781
  sidl_BaseInterface__object* *_ex)
 
2782
{
 
2783
  struct sidlx_rmi_IPv4Socket__object* self = NULL;
 
2784
 
 
2785
  struct sidlx_rmi_IPv4Socket__object* s0;
 
2786
  struct sidl_BaseClass__object* s1;
 
2787
 
 
2788
  struct sidlx_rmi_IPv4Socket__remote* r_obj = NULL;
 
2789
  self =
 
2790
    (struct sidlx_rmi_IPv4Socket__object*) malloc(
 
2791
      sizeof(struct sidlx_rmi_IPv4Socket__object));
 
2792
 
 
2793
  r_obj =
 
2794
    (struct sidlx_rmi_IPv4Socket__remote*) malloc(
 
2795
      sizeof(struct sidlx_rmi_IPv4Socket__remote));
 
2796
 
 
2797
  if(!self || !r_obj) {
 
2798
    sidl_MemAllocException ex = sidl_MemAllocException_getSingletonException(
 
2799
      _ex);
 
2800
    SIDL_CHECK(*_ex);
 
2801
    sidl_MemAllocException_setNote(ex, "Out of memory.", _ex); SIDL_CHECK(*_ex);
 
2802
    sidl_MemAllocException_add(ex, __FILE__, __LINE__, 
 
2803
      "sidlx.rmi.IPv4Socket.EPVgeneration", _ex);
 
2804
    SIDL_CHECK(*_ex);
 
2805
    *_ex = (struct sidl_BaseInterface__object*)ex;
 
2806
    goto EXIT;
 
2807
  }
 
2808
 
 
2809
  r_obj->d_refcount = 1;
 
2810
  r_obj->d_ih = instance;
 
2811
  s0 =                                self;
 
2812
  s1 =                                &s0->d_sidl_baseclass;
 
2813
 
 
2814
  LOCK_STATIC_GLOBALS;
 
2815
  if (!s_remote_initialized) {
 
2816
    sidlx_rmi_IPv4Socket__init_remote_epv();
 
2817
  }
 
2818
  UNLOCK_STATIC_GLOBALS;
 
2819
 
 
2820
  s1->d_sidl_baseinterface.d_epv    = &s_rem_epv__sidl_baseinterface;
 
2821
  s1->d_sidl_baseinterface.d_object = (void*) self;
 
2822
 
 
2823
  s1->d_data = (void*) r_obj;
 
2824
  s1->d_epv  = &s_rem_epv__sidl_baseclass;
 
2825
 
 
2826
  s0->d_sidlx_rmi_socket.d_epv    = &s_rem_epv__sidlx_rmi_socket;
 
2827
  s0->d_sidlx_rmi_socket.d_object = (void*) self;
 
2828
 
 
2829
  s0->d_data = (void*) r_obj;
 
2830
  s0->d_epv  = &s_rem_epv__sidlx_rmi_ipv4socket;
 
2831
 
 
2832
  self->d_data = (void*) r_obj;
 
2833
 
 
2834
  sidl_rmi_InstanceHandle_addRef(instance,_ex);SIDL_CHECK(*_ex);
 
2835
  return self;
 
2836
  EXIT:
 
2837
  if(self) { free(self); }
 
2838
  if(r_obj) { free(r_obj); }
 
2839
  return NULL;
 
2840
}
 
2841
/* REMOTE: generate remote instance given URL string. */
 
2842
static struct sidlx_rmi_IPv4Socket__object*
 
2843
sidlx_rmi_IPv4Socket__remoteCreate(const char *url, struct 
 
2844
  sidl_BaseInterface__object **_ex)
 
2845
{
 
2846
  struct sidl_BaseInterface__object* _throwaway_exception = NULL;
 
2847
  struct sidlx_rmi_IPv4Socket__object* self = NULL;
 
2848
 
 
2849
  struct sidlx_rmi_IPv4Socket__object* s0;
 
2850
  struct sidl_BaseClass__object* s1;
 
2851
 
 
2852
  struct sidlx_rmi_IPv4Socket__remote* r_obj = NULL;
 
2853
  sidl_rmi_InstanceHandle instance = sidl_rmi_ProtocolFactory_createInstance(
 
2854
    url, "sidlx.rmi.IPv4Socket", _ex ); SIDL_CHECK(*_ex);
 
2855
  if ( instance == NULL) { return NULL; }
 
2856
  self =
 
2857
    (struct sidlx_rmi_IPv4Socket__object*) malloc(
 
2858
      sizeof(struct sidlx_rmi_IPv4Socket__object));
 
2859
 
 
2860
  r_obj =
 
2861
    (struct sidlx_rmi_IPv4Socket__remote*) malloc(
 
2862
      sizeof(struct sidlx_rmi_IPv4Socket__remote));
 
2863
 
 
2864
  if(!self || !r_obj) {
 
2865
    sidl_MemAllocException ex = sidl_MemAllocException_getSingletonException(
 
2866
      _ex);
 
2867
    SIDL_CHECK(*_ex);
 
2868
    sidl_MemAllocException_setNote(ex, "Out of memory.", _ex); SIDL_CHECK(*_ex);
 
2869
    sidl_MemAllocException_add(ex, __FILE__, __LINE__, 
 
2870
      "sidlx.rmi.IPv4Socket.EPVgeneration", _ex);
 
2871
    SIDL_CHECK(*_ex);
 
2872
    *_ex = (struct sidl_BaseInterface__object*)ex;
 
2873
    goto EXIT;
 
2874
  }
 
2875
 
 
2876
  r_obj->d_refcount = 1;
 
2877
  r_obj->d_ih = instance;
 
2878
  s0 =                                self;
 
2879
  s1 =                                &s0->d_sidl_baseclass;
 
2880
 
 
2881
  LOCK_STATIC_GLOBALS;
 
2882
  if (!s_remote_initialized) {
 
2883
    sidlx_rmi_IPv4Socket__init_remote_epv();
 
2884
  }
 
2885
  UNLOCK_STATIC_GLOBALS;
 
2886
 
 
2887
  s1->d_sidl_baseinterface.d_epv    = &s_rem_epv__sidl_baseinterface;
 
2888
  s1->d_sidl_baseinterface.d_object = (void*) self;
 
2889
 
 
2890
  s1->d_data = (void*) r_obj;
 
2891
  s1->d_epv  = &s_rem_epv__sidl_baseclass;
 
2892
 
 
2893
  s0->d_sidlx_rmi_socket.d_epv    = &s_rem_epv__sidlx_rmi_socket;
 
2894
  s0->d_sidlx_rmi_socket.d_object = (void*) self;
 
2895
 
 
2896
  s0->d_data = (void*) r_obj;
 
2897
  s0->d_epv  = &s_rem_epv__sidlx_rmi_ipv4socket;
 
2898
 
 
2899
  self->d_data = (void*) r_obj;
 
2900
 
 
2901
  return self;
 
2902
  EXIT:
 
2903
  if(instance) { sidl_rmi_InstanceHandle_deleteRef(instance, 
 
2904
    &_throwaway_exception); }
 
2905
  if(self) { free(self); }
 
2906
  if(r_obj) { free(r_obj); }
 
2907
  return NULL;
 
2908
}
 
2909
/*
 
2910
 * RMI connector function for the class.
 
2911
 */
 
2912
 
 
2913
struct sidlx_rmi_IPv4Socket__object*
 
2914
sidlx_rmi_IPv4Socket__connectI(const char* url, sidl_bool ar, struct 
 
2915
  sidl_BaseInterface__object **_ex)
 
2916
{
 
2917
  return sidlx_rmi_IPv4Socket__remoteConnect(url, ar, _ex);
 
2918
}
 
2919
 
 
2920
 
 
2921
#endif /*WITH_RMI*/