~ubuntu-core-dev/ubuntu/maverick/eucalyptus/devel

« back to all changes in this revision

Viewing changes to cluster/generated/adb_ccResourceType.c

  • Committer: Dustin Kirkland
  • Date: 2010-07-22 08:41:57 UTC
  • mfrom: (1050.1.19 ubuntu)
  • Revision ID: kirkland@x200-20100722084157-zh2p8dkawznvxxpn
Approving Dave Walker's merge of new upstream Eucalyptus 2.0 release.

Dustin Kirkland <kirkland@canonical.com>

* New major upstream version merge, 2.0 (r1211).
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 21-eucalyptus-1.7-with-gwt-1.6.4.patch: New patch, allows 
    eucalyptus-1.7 to be built against gwt 1.6.4. Based on patch courtesy 
    of Dmitrii Zagorodnov, upstream. (LP: #597330)
* debian/eucalyptus-java-common.links: 
  - Changed symlink for groovy, point to groovy.all.jar, making compatiable 
    with groovy versions >1.7. (LP: #595421)
  - Added ant.jar & jetty-rewrite-handler.jar as they are now required.
* debian/control
  - & debian/build-jars: Added libjavassist-java and libjetty-extra-java as 
    build dependencies.
  - Added libjetty-extra-java as a dependency of eucalyptus-java-common
* The binary resulting jar's have been renamed from eucalyptus-*-1.6.2.jar
  to eucalyptus-*-main.jar:    
  - debian/eucalyptus-cc.upstart
  - debian/eucalyptus-cloud.install
  - debian/eucalyptus-common.eucalyptus.upstart
  - debian/eucalyptus-java-common.install
  - debian/eucalyptus-network.upstart
  - debian/eucalyptus-sc.install
  - debian/eucalyptus-walrus.install
* debian/eucalyptus-java-common.install: New upstream jars that have been
  installed:
  - eucalyptus-db-hsqldb-ext-main.jar
  - eucalyptus-component-main.jar
* debian/control:
  - Updated Standards Version to 3.8.4 (no change)
  - Updated the upstream Homepage to: http://open.eucalyptus.com/
  - Changed Vcs-Bzr to reflect new location of Ubuntu hosted development branch.
  - Made the Build Dependency of groovy and the binary eucalyptus-java-common
    package depend on version >=1.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
 
3
 
        /**
4
 
         * adb_ccResourceType.c
5
 
         *
6
 
         * This file was auto-generated from WSDL
7
 
         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
8
 
         */
9
 
 
10
 
        #include "adb_ccResourceType.h"
11
 
 
12
 
                /*
13
 
                 * This type was generated from the piece of schema that had
14
 
                 * name = ccResourceType
15
 
                 * Namespace URI = http://eucalyptus.ucsb.edu/
16
 
                 * Namespace Prefix = ns1
17
 
                 */
18
 
 
19
 
 
20
 
 
21
 
        struct adb_ccResourceType
22
 
        {
23
 
            adb_virtualMachineType_t* property_instanceType;
24
 
 
25
 
 
26
 
                axis2_bool_t is_valid_instanceType;
27
 
 
28
 
 
29
 
            int property_maxInstances;
30
 
 
31
 
 
32
 
                axis2_bool_t is_valid_maxInstances;
33
 
 
34
 
 
35
 
            int property_availableInstances;
36
 
 
37
 
 
38
 
                axis2_bool_t is_valid_availableInstances;
39
 
 
40
 
 
41
 
 
42
 
        };
43
 
 
44
 
 
45
 
       /************************* Private Function prototypes ********************************/
46
 
 
47
 
 
48
 
                axis2_status_t AXIS2_CALL
49
 
                adb_ccResourceType_set_instanceType_nil(
50
 
                        adb_ccResourceType_t* _ccResourceType,
51
 
                        const axutil_env_t *env);
52
 
 
53
 
 
54
 
                axis2_status_t AXIS2_CALL
55
 
                adb_ccResourceType_set_maxInstances_nil(
56
 
                        adb_ccResourceType_t* _ccResourceType,
57
 
                        const axutil_env_t *env);
58
 
 
59
 
 
60
 
                axis2_status_t AXIS2_CALL
61
 
                adb_ccResourceType_set_availableInstances_nil(
62
 
                        adb_ccResourceType_t* _ccResourceType,
63
 
                        const axutil_env_t *env);
64
 
 
65
 
 
66
 
 
67
 
       /************************* Function Implmentations ********************************/
68
 
        adb_ccResourceType_t* AXIS2_CALL
69
 
        adb_ccResourceType_create(
70
 
            const axutil_env_t *env)
71
 
        {
72
 
            adb_ccResourceType_t *_ccResourceType = NULL;
73
 
 
74
 
            AXIS2_ENV_CHECK(env, NULL);
75
 
 
76
 
            _ccResourceType = (adb_ccResourceType_t *) AXIS2_MALLOC(env->
77
 
                allocator, sizeof(adb_ccResourceType_t));
78
 
 
79
 
            if(NULL == _ccResourceType)
80
 
            {
81
 
                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
82
 
                return NULL;
83
 
            }
84
 
 
85
 
            memset(_ccResourceType, 0, sizeof(adb_ccResourceType_t));
86
 
 
87
 
            _ccResourceType->property_instanceType  = NULL;
88
 
                  _ccResourceType->is_valid_instanceType  = AXIS2_FALSE;
89
 
            _ccResourceType->is_valid_maxInstances  = AXIS2_FALSE;
90
 
            _ccResourceType->is_valid_availableInstances  = AXIS2_FALSE;
91
 
 
92
 
 
93
 
            return _ccResourceType;
94
 
        }
95
 
 
96
 
        axis2_status_t AXIS2_CALL
97
 
        adb_ccResourceType_free (
98
 
                adb_ccResourceType_t* _ccResourceType,
99
 
                const axutil_env_t *env)
100
 
        {
101
 
 
102
 
 
103
 
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
104
 
            AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
105
 
 
106
 
            adb_ccResourceType_reset_instanceType(_ccResourceType, env);
107
 
            adb_ccResourceType_reset_maxInstances(_ccResourceType, env);
108
 
            adb_ccResourceType_reset_availableInstances(_ccResourceType, env);
109
 
 
110
 
 
111
 
            if(_ccResourceType)
112
 
            {
113
 
                AXIS2_FREE(env->allocator, _ccResourceType);
114
 
                _ccResourceType = NULL;
115
 
            }
116
 
            return AXIS2_SUCCESS;
117
 
        }
118
 
 
119
 
 
120
 
 
121
 
 
122
 
        axis2_status_t AXIS2_CALL
123
 
        adb_ccResourceType_deserialize(
124
 
                adb_ccResourceType_t* _ccResourceType,
125
 
                const axutil_env_t *env,
126
 
                axiom_node_t **dp_parent,
127
 
                axis2_bool_t *dp_is_early_node_valid,
128
 
                axis2_bool_t dont_care_minoccurs)
129
 
        {
130
 
          axiom_node_t *parent = *dp_parent;
131
 
 
132
 
          axis2_status_t status = AXIS2_SUCCESS;
133
 
 
134
 
              void *element = NULL;
135
 
 
136
 
             axis2_char_t* text_value = NULL;
137
 
             axutil_qname_t *qname = NULL;
138
 
 
139
 
            axutil_qname_t *element_qname = NULL;
140
 
 
141
 
               axiom_node_t *first_node = NULL;
142
 
               axis2_bool_t is_early_node_valid = AXIS2_TRUE;
143
 
               axiom_node_t *current_node = NULL;
144
 
               axiom_element_t *current_element = NULL;
145
 
 
146
 
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
147
 
            AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
148
 
 
149
 
 
150
 
 
151
 
              while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
152
 
              {
153
 
                  parent = axiom_node_get_next_sibling(parent, env);
154
 
              }
155
 
              if (NULL == parent)
156
 
              {
157
 
                /* This should be checked before everything */
158
 
                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
159
 
                            "Failed in building adb object for ccResourceType : "
160
 
                            "NULL elemenet can not be passed to deserialize");
161
 
                return AXIS2_FAILURE;
162
 
              }
163
 
 
164
 
 
165
 
                      first_node = axiom_node_get_first_child(parent, env);
166
 
 
167
 
 
168
 
 
169
 
 
170
 
                     /*
171
 
                      * building instanceType element
172
 
                      */
173
 
 
174
 
 
175
 
 
176
 
                                   current_node = first_node;
177
 
                                   is_early_node_valid = AXIS2_FALSE;
178
 
 
179
 
 
180
 
                                    while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
181
 
                                    {
182
 
                                        current_node = axiom_node_get_next_sibling(current_node, env);
183
 
                                    }
184
 
                                    if(current_node != NULL)
185
 
                                    {
186
 
                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
187
 
                                        qname = axiom_element_get_qname(current_element, env, current_node);
188
 
                                    }
189
 
 
190
 
                                 element_qname = axutil_qname_create(env, "instanceType", "http://eucalyptus.ucsb.edu/", NULL);
191
 
 
192
 
 
193
 
                           if (adb_virtualMachineType_is_particle() ||
194
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
195
 
                           {
196
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
197
 
                              {
198
 
                                is_early_node_valid = AXIS2_TRUE;
199
 
                              }
200
 
 
201
 
 
202
 
                                      element = (void*)adb_virtualMachineType_create(env);
203
 
 
204
 
                                      status =  adb_virtualMachineType_deserialize((adb_virtualMachineType_t*)element,
205
 
                                                                            env, &current_node, &is_early_node_valid, AXIS2_FALSE);
206
 
                                      if(AXIS2_FAILURE == status)
207
 
                                      {
208
 
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building adb object for element instanceType");
209
 
                                      }
210
 
                                      else
211
 
                                      {
212
 
                                          status = adb_ccResourceType_set_instanceType(_ccResourceType, env,
213
 
                                                                   (adb_virtualMachineType_t*)element);
214
 
                                      }
215
 
 
216
 
                                 if(AXIS2_FAILURE ==  status)
217
 
                                 {
218
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for instanceType ");
219
 
                                     if(element_qname)
220
 
                                     {
221
 
                                         axutil_qname_free(element_qname, env);
222
 
                                     }
223
 
                                     return AXIS2_FAILURE;
224
 
                                 }
225
 
                              }
226
 
 
227
 
                  if(element_qname)
228
 
                  {
229
 
                     axutil_qname_free(element_qname, env);
230
 
                     element_qname = NULL;
231
 
                  }
232
 
 
233
 
 
234
 
 
235
 
                     /*
236
 
                      * building maxInstances element
237
 
                      */
238
 
 
239
 
 
240
 
 
241
 
                                    /*
242
 
                                     * because elements are ordered this works fine
243
 
                                     */
244
 
 
245
 
 
246
 
                                   if(current_node != NULL && is_early_node_valid)
247
 
                                   {
248
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
249
 
 
250
 
 
251
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
252
 
                                        {
253
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
254
 
                                        }
255
 
                                        if(current_node != NULL)
256
 
                                        {
257
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
258
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
259
 
                                        }
260
 
 
261
 
                                   }
262
 
                                   is_early_node_valid = AXIS2_FALSE;
263
 
 
264
 
                                 element_qname = axutil_qname_create(env, "maxInstances", "http://eucalyptus.ucsb.edu/", NULL);
265
 
 
266
 
 
267
 
                           if (
268
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
269
 
                           {
270
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
271
 
                              {
272
 
                                is_early_node_valid = AXIS2_TRUE;
273
 
                              }
274
 
 
275
 
 
276
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
277
 
                                      if(text_value != NULL)
278
 
                                      {
279
 
                                            status = adb_ccResourceType_set_maxInstances(_ccResourceType, env,
280
 
                                                                   atoi(text_value));
281
 
                                      }
282
 
 
283
 
                                      else
284
 
                                      {
285
 
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element maxInstances");
286
 
                                          status = AXIS2_FAILURE;
287
 
                                      }
288
 
 
289
 
                                 if(AXIS2_FAILURE ==  status)
290
 
                                 {
291
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for maxInstances ");
292
 
                                     if(element_qname)
293
 
                                     {
294
 
                                         axutil_qname_free(element_qname, env);
295
 
                                     }
296
 
                                     return AXIS2_FAILURE;
297
 
                                 }
298
 
                              }
299
 
 
300
 
                  if(element_qname)
301
 
                  {
302
 
                     axutil_qname_free(element_qname, env);
303
 
                     element_qname = NULL;
304
 
                  }
305
 
 
306
 
 
307
 
 
308
 
                     /*
309
 
                      * building availableInstances element
310
 
                      */
311
 
 
312
 
 
313
 
 
314
 
                                    /*
315
 
                                     * because elements are ordered this works fine
316
 
                                     */
317
 
 
318
 
 
319
 
                                   if(current_node != NULL && is_early_node_valid)
320
 
                                   {
321
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
322
 
 
323
 
 
324
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
325
 
                                        {
326
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
327
 
                                        }
328
 
                                        if(current_node != NULL)
329
 
                                        {
330
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
331
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
332
 
                                        }
333
 
 
334
 
                                   }
335
 
                                   is_early_node_valid = AXIS2_FALSE;
336
 
 
337
 
                                 element_qname = axutil_qname_create(env, "availableInstances", "http://eucalyptus.ucsb.edu/", NULL);
338
 
 
339
 
 
340
 
                           if (
341
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
342
 
                           {
343
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
344
 
                              {
345
 
                                is_early_node_valid = AXIS2_TRUE;
346
 
                              }
347
 
 
348
 
 
349
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
350
 
                                      if(text_value != NULL)
351
 
                                      {
352
 
                                            status = adb_ccResourceType_set_availableInstances(_ccResourceType, env,
353
 
                                                                   atoi(text_value));
354
 
                                      }
355
 
 
356
 
                                      else
357
 
                                      {
358
 
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element availableInstances");
359
 
                                          status = AXIS2_FAILURE;
360
 
                                      }
361
 
 
362
 
                                 if(AXIS2_FAILURE ==  status)
363
 
                                 {
364
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for availableInstances ");
365
 
                                     if(element_qname)
366
 
                                     {
367
 
                                         axutil_qname_free(element_qname, env);
368
 
                                     }
369
 
                                     return AXIS2_FAILURE;
370
 
                                 }
371
 
                              }
372
 
 
373
 
                  if(element_qname)
374
 
                  {
375
 
                     axutil_qname_free(element_qname, env);
376
 
                     element_qname = NULL;
377
 
                  }
378
 
 
379
 
          return status;
380
 
       }
381
 
 
382
 
          axis2_bool_t AXIS2_CALL
383
 
          adb_ccResourceType_is_particle()
384
 
          {
385
 
 
386
 
                 return AXIS2_FALSE;
387
 
 
388
 
          }
389
 
 
390
 
 
391
 
          void AXIS2_CALL
392
 
          adb_ccResourceType_declare_parent_namespaces(
393
 
                    adb_ccResourceType_t* _ccResourceType,
394
 
                    const axutil_env_t *env, axiom_element_t *parent_element,
395
 
                    axutil_hash_t *namespaces, int *next_ns_index)
396
 
          {
397
 
 
398
 
                  /* Here this is an empty function, Nothing to declare */
399
 
 
400
 
          }
401
 
 
402
 
 
403
 
 
404
 
        axiom_node_t* AXIS2_CALL
405
 
        adb_ccResourceType_serialize(
406
 
                adb_ccResourceType_t* _ccResourceType,
407
 
                const axutil_env_t *env, axiom_node_t *parent, axiom_element_t *parent_element, int parent_tag_closed, axutil_hash_t *namespaces, int *next_ns_index)
408
 
        {
409
 
 
410
 
 
411
 
             axis2_char_t *string_to_stream;
412
 
 
413
 
 
414
 
         axiom_node_t *current_node = NULL;
415
 
         int tag_closed = 0;
416
 
 
417
 
 
418
 
 
419
 
                axiom_namespace_t *ns1 = NULL;
420
 
 
421
 
                axis2_char_t *qname_uri = NULL;
422
 
                axis2_char_t *qname_prefix = NULL;
423
 
                axis2_char_t *p_prefix = NULL;
424
 
                axis2_bool_t ns_already_defined;
425
 
 
426
 
                    axis2_char_t text_value_1[64];
427
 
 
428
 
                    axis2_char_t text_value_2[64];
429
 
 
430
 
                    axis2_char_t text_value_3[64];
431
 
 
432
 
               axis2_char_t *start_input_str = NULL;
433
 
               axis2_char_t *end_input_str = NULL;
434
 
               unsigned int start_input_str_len = 0;
435
 
               unsigned int end_input_str_len = 0;
436
 
 
437
 
 
438
 
               axiom_data_source_t *data_source = NULL;
439
 
               axutil_stream_t *stream = NULL;
440
 
 
441
 
 
442
 
 
443
 
            AXIS2_ENV_CHECK(env, NULL);
444
 
            AXIS2_PARAM_CHECK(env->error, _ccResourceType, NULL);
445
 
 
446
 
 
447
 
                    current_node = parent;
448
 
                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, env);
449
 
                    if (!data_source)
450
 
                        return NULL;
451
 
                    stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
452
 
                    if (!stream)
453
 
                        return NULL;
454
 
 
455
 
            if(!parent_tag_closed)
456
 
            {
457
 
 
458
 
              string_to_stream = ">";
459
 
              axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
460
 
              tag_closed = 1;
461
 
 
462
 
            }
463
 
 
464
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
465
 
                       {
466
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
467
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
468
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
469
 
 
470
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
471
 
                                            "http://eucalyptus.ucsb.edu/",
472
 
                                            p_prefix));
473
 
                       }
474
 
 
475
 
 
476
 
                   if (!_ccResourceType->is_valid_instanceType)
477
 
                   {
478
 
 
479
 
                           /* no need to complain for minoccurs=0 element */
480
 
 
481
 
 
482
 
                   }
483
 
                   else
484
 
                   {
485
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
486
 
                                 (4 + axutil_strlen(p_prefix) +
487
 
                                  axutil_strlen("instanceType")));
488
 
 
489
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
490
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
491
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("instanceType")));
492
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
493
 
 
494
 
 
495
 
 
496
 
 
497
 
 
498
 
 
499
 
                     /*
500
 
                      * parsing instanceType element
501
 
                      */
502
 
 
503
 
 
504
 
 
505
 
                            sprintf(start_input_str, "<%s%sinstanceType",
506
 
                                 p_prefix?p_prefix:"",
507
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
508
 
 
509
 
                        start_input_str_len = axutil_strlen(start_input_str);
510
 
                        sprintf(end_input_str, "</%s%sinstanceType>",
511
 
                                 p_prefix?p_prefix:"",
512
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
513
 
                        end_input_str_len = axutil_strlen(end_input_str);
514
 
 
515
 
                            if(!adb_virtualMachineType_is_particle())
516
 
                            {
517
 
                                axutil_stream_write(stream, env, start_input_str, start_input_str_len);
518
 
                            }
519
 
 
520
 
                            adb_virtualMachineType_serialize(_ccResourceType->property_instanceType,
521
 
                                                                                 env, current_node, parent_element,
522
 
                                                                                 adb_virtualMachineType_is_particle() || AXIS2_FALSE, namespaces, next_ns_index);
523
 
 
524
 
                            if(!adb_virtualMachineType_is_particle())
525
 
                            {
526
 
                                axutil_stream_write(stream, env, end_input_str, end_input_str_len);
527
 
                            }
528
 
 
529
 
 
530
 
                     AXIS2_FREE(env->allocator,start_input_str);
531
 
                     AXIS2_FREE(env->allocator,end_input_str);
532
 
                 }
533
 
 
534
 
 
535
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
536
 
                       {
537
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
538
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
539
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
540
 
 
541
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
542
 
                                            "http://eucalyptus.ucsb.edu/",
543
 
                                            p_prefix));
544
 
                       }
545
 
 
546
 
 
547
 
                   if (!_ccResourceType->is_valid_maxInstances)
548
 
                   {
549
 
 
550
 
                           /* no need to complain for minoccurs=0 element */
551
 
 
552
 
 
553
 
                   }
554
 
                   else
555
 
                   {
556
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
557
 
                                 (4 + axutil_strlen(p_prefix) +
558
 
                                  axutil_strlen("maxInstances")));
559
 
 
560
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
561
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
562
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("maxInstances")));
563
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
564
 
 
565
 
 
566
 
 
567
 
 
568
 
 
569
 
 
570
 
                     /*
571
 
                      * parsing maxInstances element
572
 
                      */
573
 
 
574
 
 
575
 
 
576
 
                            sprintf(start_input_str, "<%s%smaxInstances>",
577
 
                                 p_prefix?p_prefix:"",
578
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
579
 
 
580
 
                        start_input_str_len = axutil_strlen(start_input_str);
581
 
                        sprintf(end_input_str, "</%s%smaxInstances>",
582
 
                                 p_prefix?p_prefix:"",
583
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
584
 
                        end_input_str_len = axutil_strlen(end_input_str);
585
 
 
586
 
                               sprintf (text_value_2, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, _ccResourceType->property_maxInstances);
587
 
 
588
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
589
 
 
590
 
                           axutil_stream_write(stream, env, text_value_2, axutil_strlen(text_value_2));
591
 
 
592
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
593
 
 
594
 
 
595
 
                     AXIS2_FREE(env->allocator,start_input_str);
596
 
                     AXIS2_FREE(env->allocator,end_input_str);
597
 
                 }
598
 
 
599
 
 
600
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
601
 
                       {
602
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
603
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
604
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
605
 
 
606
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
607
 
                                            "http://eucalyptus.ucsb.edu/",
608
 
                                            p_prefix));
609
 
                       }
610
 
 
611
 
 
612
 
                   if (!_ccResourceType->is_valid_availableInstances)
613
 
                   {
614
 
 
615
 
                           /* no need to complain for minoccurs=0 element */
616
 
 
617
 
 
618
 
                   }
619
 
                   else
620
 
                   {
621
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
622
 
                                 (4 + axutil_strlen(p_prefix) +
623
 
                                  axutil_strlen("availableInstances")));
624
 
 
625
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
626
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
627
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("availableInstances")));
628
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
629
 
 
630
 
 
631
 
 
632
 
 
633
 
 
634
 
 
635
 
                     /*
636
 
                      * parsing availableInstances element
637
 
                      */
638
 
 
639
 
 
640
 
 
641
 
                            sprintf(start_input_str, "<%s%savailableInstances>",
642
 
                                 p_prefix?p_prefix:"",
643
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
644
 
 
645
 
                        start_input_str_len = axutil_strlen(start_input_str);
646
 
                        sprintf(end_input_str, "</%s%savailableInstances>",
647
 
                                 p_prefix?p_prefix:"",
648
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
649
 
                        end_input_str_len = axutil_strlen(end_input_str);
650
 
 
651
 
                               sprintf (text_value_3, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, _ccResourceType->property_availableInstances);
652
 
 
653
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
654
 
 
655
 
                           axutil_stream_write(stream, env, text_value_3, axutil_strlen(text_value_3));
656
 
 
657
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
658
 
 
659
 
 
660
 
                     AXIS2_FREE(env->allocator,start_input_str);
661
 
                     AXIS2_FREE(env->allocator,end_input_str);
662
 
                 }
663
 
 
664
 
 
665
 
 
666
 
            return parent;
667
 
        }
668
 
 
669
 
 
670
 
 
671
 
 
672
 
            /**
673
 
             * getter for instanceType.
674
 
             */
675
 
            adb_virtualMachineType_t* AXIS2_CALL
676
 
            adb_ccResourceType_get_instanceType(
677
 
                    adb_ccResourceType_t* _ccResourceType,
678
 
                    const axutil_env_t *env)
679
 
             {
680
 
 
681
 
                    AXIS2_ENV_CHECK(env, NULL);
682
 
                    AXIS2_PARAM_CHECK(env->error, _ccResourceType, NULL);
683
 
 
684
 
 
685
 
                return _ccResourceType->property_instanceType;
686
 
             }
687
 
 
688
 
            /**
689
 
             * setter for instanceType
690
 
             */
691
 
            axis2_status_t AXIS2_CALL
692
 
            adb_ccResourceType_set_instanceType(
693
 
                    adb_ccResourceType_t* _ccResourceType,
694
 
                    const axutil_env_t *env,
695
 
                    adb_virtualMachineType_t*  arg_instanceType)
696
 
             {
697
 
 
698
 
 
699
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
700
 
                AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
701
 
 
702
 
                if(_ccResourceType->is_valid_instanceType &&
703
 
                        arg_instanceType == _ccResourceType->property_instanceType)
704
 
                {
705
 
 
706
 
                    return AXIS2_SUCCESS;
707
 
                }
708
 
 
709
 
                adb_ccResourceType_reset_instanceType(_ccResourceType, env);
710
 
 
711
 
 
712
 
                if(NULL == arg_instanceType)
713
 
                {
714
 
                    /* We are already done */
715
 
                    return AXIS2_SUCCESS;
716
 
                }
717
 
                _ccResourceType->property_instanceType = arg_instanceType;
718
 
                        _ccResourceType->is_valid_instanceType = AXIS2_TRUE;
719
 
 
720
 
                return AXIS2_SUCCESS;
721
 
             }
722
 
 
723
 
 
724
 
 
725
 
           /**
726
 
            * resetter for instanceType
727
 
            */
728
 
           axis2_status_t AXIS2_CALL
729
 
           adb_ccResourceType_reset_instanceType(
730
 
                   adb_ccResourceType_t* _ccResourceType,
731
 
                   const axutil_env_t *env)
732
 
           {
733
 
               int i = 0;
734
 
               int count = 0;
735
 
               void *element = NULL;
736
 
 
737
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
738
 
               AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
739
 
 
740
 
 
741
 
 
742
 
 
743
 
 
744
 
                if(_ccResourceType->property_instanceType != NULL)
745
 
                {
746
 
 
747
 
 
748
 
                        adb_virtualMachineType_free(_ccResourceType->property_instanceType, env);
749
 
                     _ccResourceType->property_instanceType = NULL;
750
 
                }
751
 
 
752
 
 
753
 
 
754
 
                _ccResourceType->is_valid_instanceType = AXIS2_FALSE;
755
 
               return AXIS2_SUCCESS;
756
 
           }
757
 
 
758
 
           /**
759
 
            * Check whether instanceType is nill
760
 
            */
761
 
           axis2_bool_t AXIS2_CALL
762
 
           adb_ccResourceType_is_instanceType_nil(
763
 
                   adb_ccResourceType_t* _ccResourceType,
764
 
                   const axutil_env_t *env)
765
 
           {
766
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
767
 
               AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_TRUE);
768
 
 
769
 
               return !_ccResourceType->is_valid_instanceType;
770
 
           }
771
 
 
772
 
           /**
773
 
            * Set instanceType to nill (currently the same as reset)
774
 
            */
775
 
           axis2_status_t AXIS2_CALL
776
 
           adb_ccResourceType_set_instanceType_nil(
777
 
                   adb_ccResourceType_t* _ccResourceType,
778
 
                   const axutil_env_t *env)
779
 
           {
780
 
               return adb_ccResourceType_reset_instanceType(_ccResourceType, env);
781
 
           }
782
 
 
783
 
 
784
 
 
785
 
            /**
786
 
             * getter for maxInstances.
787
 
             */
788
 
            int AXIS2_CALL
789
 
            adb_ccResourceType_get_maxInstances(
790
 
                    adb_ccResourceType_t* _ccResourceType,
791
 
                    const axutil_env_t *env)
792
 
             {
793
 
 
794
 
                    AXIS2_ENV_CHECK(env, (int)0);
795
 
                    AXIS2_PARAM_CHECK(env->error, _ccResourceType, (int)0);
796
 
 
797
 
 
798
 
                return _ccResourceType->property_maxInstances;
799
 
             }
800
 
 
801
 
            /**
802
 
             * setter for maxInstances
803
 
             */
804
 
            axis2_status_t AXIS2_CALL
805
 
            adb_ccResourceType_set_maxInstances(
806
 
                    adb_ccResourceType_t* _ccResourceType,
807
 
                    const axutil_env_t *env,
808
 
                    const int  arg_maxInstances)
809
 
             {
810
 
 
811
 
 
812
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
813
 
                AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
814
 
 
815
 
                if(_ccResourceType->is_valid_maxInstances &&
816
 
                        arg_maxInstances == _ccResourceType->property_maxInstances)
817
 
                {
818
 
 
819
 
                    return AXIS2_SUCCESS;
820
 
                }
821
 
 
822
 
                adb_ccResourceType_reset_maxInstances(_ccResourceType, env);
823
 
 
824
 
                _ccResourceType->property_maxInstances = arg_maxInstances;
825
 
                        _ccResourceType->is_valid_maxInstances = AXIS2_TRUE;
826
 
 
827
 
                return AXIS2_SUCCESS;
828
 
             }
829
 
 
830
 
 
831
 
 
832
 
           /**
833
 
            * resetter for maxInstances
834
 
            */
835
 
           axis2_status_t AXIS2_CALL
836
 
           adb_ccResourceType_reset_maxInstances(
837
 
                   adb_ccResourceType_t* _ccResourceType,
838
 
                   const axutil_env_t *env)
839
 
           {
840
 
               int i = 0;
841
 
               int count = 0;
842
 
               void *element = NULL;
843
 
 
844
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
845
 
               AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
846
 
 
847
 
 
848
 
               _ccResourceType->is_valid_maxInstances = AXIS2_FALSE;
849
 
               return AXIS2_SUCCESS;
850
 
           }
851
 
 
852
 
           /**
853
 
            * Check whether maxInstances is nill
854
 
            */
855
 
           axis2_bool_t AXIS2_CALL
856
 
           adb_ccResourceType_is_maxInstances_nil(
857
 
                   adb_ccResourceType_t* _ccResourceType,
858
 
                   const axutil_env_t *env)
859
 
           {
860
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
861
 
               AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_TRUE);
862
 
 
863
 
               return !_ccResourceType->is_valid_maxInstances;
864
 
           }
865
 
 
866
 
           /**
867
 
            * Set maxInstances to nill (currently the same as reset)
868
 
            */
869
 
           axis2_status_t AXIS2_CALL
870
 
           adb_ccResourceType_set_maxInstances_nil(
871
 
                   adb_ccResourceType_t* _ccResourceType,
872
 
                   const axutil_env_t *env)
873
 
           {
874
 
               return adb_ccResourceType_reset_maxInstances(_ccResourceType, env);
875
 
           }
876
 
 
877
 
 
878
 
 
879
 
            /**
880
 
             * getter for availableInstances.
881
 
             */
882
 
            int AXIS2_CALL
883
 
            adb_ccResourceType_get_availableInstances(
884
 
                    adb_ccResourceType_t* _ccResourceType,
885
 
                    const axutil_env_t *env)
886
 
             {
887
 
 
888
 
                    AXIS2_ENV_CHECK(env, (int)0);
889
 
                    AXIS2_PARAM_CHECK(env->error, _ccResourceType, (int)0);
890
 
 
891
 
 
892
 
                return _ccResourceType->property_availableInstances;
893
 
             }
894
 
 
895
 
            /**
896
 
             * setter for availableInstances
897
 
             */
898
 
            axis2_status_t AXIS2_CALL
899
 
            adb_ccResourceType_set_availableInstances(
900
 
                    adb_ccResourceType_t* _ccResourceType,
901
 
                    const axutil_env_t *env,
902
 
                    const int  arg_availableInstances)
903
 
             {
904
 
 
905
 
 
906
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
907
 
                AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
908
 
 
909
 
                if(_ccResourceType->is_valid_availableInstances &&
910
 
                        arg_availableInstances == _ccResourceType->property_availableInstances)
911
 
                {
912
 
 
913
 
                    return AXIS2_SUCCESS;
914
 
                }
915
 
 
916
 
                adb_ccResourceType_reset_availableInstances(_ccResourceType, env);
917
 
 
918
 
                _ccResourceType->property_availableInstances = arg_availableInstances;
919
 
                        _ccResourceType->is_valid_availableInstances = AXIS2_TRUE;
920
 
 
921
 
                return AXIS2_SUCCESS;
922
 
             }
923
 
 
924
 
 
925
 
 
926
 
           /**
927
 
            * resetter for availableInstances
928
 
            */
929
 
           axis2_status_t AXIS2_CALL
930
 
           adb_ccResourceType_reset_availableInstances(
931
 
                   adb_ccResourceType_t* _ccResourceType,
932
 
                   const axutil_env_t *env)
933
 
           {
934
 
               int i = 0;
935
 
               int count = 0;
936
 
               void *element = NULL;
937
 
 
938
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
939
 
               AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
940
 
 
941
 
 
942
 
               _ccResourceType->is_valid_availableInstances = AXIS2_FALSE;
943
 
               return AXIS2_SUCCESS;
944
 
           }
945
 
 
946
 
           /**
947
 
            * Check whether availableInstances is nill
948
 
            */
949
 
           axis2_bool_t AXIS2_CALL
950
 
           adb_ccResourceType_is_availableInstances_nil(
951
 
                   adb_ccResourceType_t* _ccResourceType,
952
 
                   const axutil_env_t *env)
953
 
           {
954
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
955
 
               AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_TRUE);
956
 
 
957
 
               return !_ccResourceType->is_valid_availableInstances;
958
 
           }
959
 
 
960
 
           /**
961
 
            * Set availableInstances to nill (currently the same as reset)
962
 
            */
963
 
           axis2_status_t AXIS2_CALL
964
 
           adb_ccResourceType_set_availableInstances_nil(
965
 
                   adb_ccResourceType_t* _ccResourceType,
966
 
                   const axutil_env_t *env)
967
 
           {
968
 
               return adb_ccResourceType_reset_availableInstances(_ccResourceType, env);
969
 
           }
970
 
 
971
 
 
972