File: Gtm-stubs.c

package info (click to toggle)
gtm 0.4.4-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,732 kB
  • ctags: 680
  • sloc: ansic: 6,929; sh: 6,837; makefile: 354; sed: 93
file content (114 lines) | stat: -rw-r--r-- 4,866 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
 * This file was generated by orbit-idl - DO NOT EDIT!
 */

#include <string.h>
#include "Gtm.h"

CORBA_boolean 
GTM_Download_add_url(GTM_Download _obj, CORBA_char * url, CORBA_char * dir, CORBA_boolean disable_proxy, CORBA_boolean disable_auto_dl, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;

   if (_obj->servant && _obj->vepv && GTM_Download__classid) {
      return ((POA_GTM_Download__epv *) _obj->vepv[GTM_Download__classid])->add_url(_obj->servant, url, dir, disable_proxy, disable_auto_dl, ev);

   }
   _cnx = ORBit_object_get_connection(_obj);
 _ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[8];
      } _ORBIT_operation_name_data = {
	 8, "add_url"
      };
      static const struct iovec _ORBIT_operation_vec =
      {(gpointer) & _ORBIT_operation_name_data, 12};
      register CORBA_unsigned_long _ORBIT_tmpvar_0;
      CORBA_unsigned_long _ORBIT_tmpvar_1;
      register CORBA_unsigned_long _ORBIT_tmpvar_2;
      CORBA_unsigned_long _ORBIT_tmpvar_3;

      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_tmpvar_1 = strlen(url) + 1;
      giop_message_buffer_do_alignment(GIOP_MESSAGE_BUFFER(_ORBIT_send_buffer), 4);
      {
	 guchar *_ORBIT_t;

	 _ORBIT_t = alloca(sizeof(_ORBIT_tmpvar_1));
	 memcpy(_ORBIT_t, &(_ORBIT_tmpvar_1), sizeof(_ORBIT_tmpvar_1));
	 giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER(_ORBIT_send_buffer), (_ORBIT_t), sizeof(_ORBIT_tmpvar_1));
      }
      giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER(_ORBIT_send_buffer), (url), sizeof(url[_ORBIT_tmpvar_0]) * _ORBIT_tmpvar_1);
      _ORBIT_tmpvar_3 = strlen(dir) + 1;
      giop_message_buffer_do_alignment(GIOP_MESSAGE_BUFFER(_ORBIT_send_buffer), 4);
      {
	 guchar *_ORBIT_t;

	 _ORBIT_t = alloca(sizeof(_ORBIT_tmpvar_3));
	 memcpy(_ORBIT_t, &(_ORBIT_tmpvar_3), sizeof(_ORBIT_tmpvar_3));
	 giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER(_ORBIT_send_buffer), (_ORBIT_t), sizeof(_ORBIT_tmpvar_3));
      }
      giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER(_ORBIT_send_buffer), (dir), sizeof(dir[_ORBIT_tmpvar_2]) * _ORBIT_tmpvar_3);
      giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER(_ORBIT_send_buffer), &(disable_proxy), sizeof(disable_proxy));
      giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER(_ORBIT_send_buffer), &(disable_auto_dl), sizeof(disable_auto_dl));
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      CORBA_boolean _ORBIT_retval;

      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
	 _ORBIT_retval = *((CORBA_boolean *) _ORBIT_curptr);
      } else {
	 _ORBIT_retval = *((CORBA_boolean *) _ORBIT_curptr);
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return _ORBIT_retval;
    _ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return _ORBIT_retval;
    _ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return _ORBIT_retval;
      }
   }
}