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)
10
#include "adb_ccResourceType.h"
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
21
struct adb_ccResourceType
23
adb_virtualMachineType_t* property_instanceType;
26
axis2_bool_t is_valid_instanceType;
29
int property_maxInstances;
32
axis2_bool_t is_valid_maxInstances;
35
int property_availableInstances;
38
axis2_bool_t is_valid_availableInstances;
45
/************************* Private Function prototypes ********************************/
48
axis2_status_t AXIS2_CALL
49
adb_ccResourceType_set_instanceType_nil(
50
adb_ccResourceType_t* _ccResourceType,
51
const axutil_env_t *env);
54
axis2_status_t AXIS2_CALL
55
adb_ccResourceType_set_maxInstances_nil(
56
adb_ccResourceType_t* _ccResourceType,
57
const axutil_env_t *env);
60
axis2_status_t AXIS2_CALL
61
adb_ccResourceType_set_availableInstances_nil(
62
adb_ccResourceType_t* _ccResourceType,
63
const axutil_env_t *env);
67
/************************* Function Implmentations ********************************/
68
adb_ccResourceType_t* AXIS2_CALL
69
adb_ccResourceType_create(
70
const axutil_env_t *env)
72
adb_ccResourceType_t *_ccResourceType = NULL;
74
AXIS2_ENV_CHECK(env, NULL);
76
_ccResourceType = (adb_ccResourceType_t *) AXIS2_MALLOC(env->
77
allocator, sizeof(adb_ccResourceType_t));
79
if(NULL == _ccResourceType)
81
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
85
memset(_ccResourceType, 0, sizeof(adb_ccResourceType_t));
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;
93
return _ccResourceType;
96
axis2_status_t AXIS2_CALL
97
adb_ccResourceType_free (
98
adb_ccResourceType_t* _ccResourceType,
99
const axutil_env_t *env)
103
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
104
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
106
adb_ccResourceType_reset_instanceType(_ccResourceType, env);
107
adb_ccResourceType_reset_maxInstances(_ccResourceType, env);
108
adb_ccResourceType_reset_availableInstances(_ccResourceType, env);
113
AXIS2_FREE(env->allocator, _ccResourceType);
114
_ccResourceType = NULL;
116
return AXIS2_SUCCESS;
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)
130
axiom_node_t *parent = *dp_parent;
132
axis2_status_t status = AXIS2_SUCCESS;
134
void *element = NULL;
136
axis2_char_t* text_value = NULL;
137
axutil_qname_t *qname = NULL;
139
axutil_qname_t *element_qname = NULL;
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;
146
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
147
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
151
while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
153
parent = axiom_node_get_next_sibling(parent, env);
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;
165
first_node = axiom_node_get_first_child(parent, env);
171
* building instanceType element
176
current_node = first_node;
177
is_early_node_valid = AXIS2_FALSE;
180
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
182
current_node = axiom_node_get_next_sibling(current_node, env);
184
if(current_node != NULL)
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);
190
element_qname = axutil_qname_create(env, "instanceType", "http://eucalyptus.ucsb.edu/", NULL);
193
if (adb_virtualMachineType_is_particle() ||
194
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
196
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
198
is_early_node_valid = AXIS2_TRUE;
202
element = (void*)adb_virtualMachineType_create(env);
204
status = adb_virtualMachineType_deserialize((adb_virtualMachineType_t*)element,
205
env, ¤t_node, &is_early_node_valid, AXIS2_FALSE);
206
if(AXIS2_FAILURE == status)
208
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building adb object for element instanceType");
212
status = adb_ccResourceType_set_instanceType(_ccResourceType, env,
213
(adb_virtualMachineType_t*)element);
216
if(AXIS2_FAILURE == status)
218
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for instanceType ");
221
axutil_qname_free(element_qname, env);
223
return AXIS2_FAILURE;
229
axutil_qname_free(element_qname, env);
230
element_qname = NULL;
236
* building maxInstances element
242
* because elements are ordered this works fine
246
if(current_node != NULL && is_early_node_valid)
248
current_node = axiom_node_get_next_sibling(current_node, env);
251
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
253
current_node = axiom_node_get_next_sibling(current_node, env);
255
if(current_node != NULL)
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);
262
is_early_node_valid = AXIS2_FALSE;
264
element_qname = axutil_qname_create(env, "maxInstances", "http://eucalyptus.ucsb.edu/", NULL);
268
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
270
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
272
is_early_node_valid = AXIS2_TRUE;
276
text_value = axiom_element_get_text(current_element, env, current_node);
277
if(text_value != NULL)
279
status = adb_ccResourceType_set_maxInstances(_ccResourceType, env,
285
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element maxInstances");
286
status = AXIS2_FAILURE;
289
if(AXIS2_FAILURE == status)
291
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for maxInstances ");
294
axutil_qname_free(element_qname, env);
296
return AXIS2_FAILURE;
302
axutil_qname_free(element_qname, env);
303
element_qname = NULL;
309
* building availableInstances element
315
* because elements are ordered this works fine
319
if(current_node != NULL && is_early_node_valid)
321
current_node = axiom_node_get_next_sibling(current_node, env);
324
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
326
current_node = axiom_node_get_next_sibling(current_node, env);
328
if(current_node != NULL)
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);
335
is_early_node_valid = AXIS2_FALSE;
337
element_qname = axutil_qname_create(env, "availableInstances", "http://eucalyptus.ucsb.edu/", NULL);
341
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
343
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
345
is_early_node_valid = AXIS2_TRUE;
349
text_value = axiom_element_get_text(current_element, env, current_node);
350
if(text_value != NULL)
352
status = adb_ccResourceType_set_availableInstances(_ccResourceType, env,
358
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element availableInstances");
359
status = AXIS2_FAILURE;
362
if(AXIS2_FAILURE == status)
364
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for availableInstances ");
367
axutil_qname_free(element_qname, env);
369
return AXIS2_FAILURE;
375
axutil_qname_free(element_qname, env);
376
element_qname = NULL;
382
axis2_bool_t AXIS2_CALL
383
adb_ccResourceType_is_particle()
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)
398
/* Here this is an empty function, Nothing to declare */
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)
411
axis2_char_t *string_to_stream;
414
axiom_node_t *current_node = NULL;
419
axiom_namespace_t *ns1 = NULL;
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;
426
axis2_char_t text_value_1[64];
428
axis2_char_t text_value_2[64];
430
axis2_char_t text_value_3[64];
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;
438
axiom_data_source_t *data_source = NULL;
439
axutil_stream_t *stream = NULL;
443
AXIS2_ENV_CHECK(env, NULL);
444
AXIS2_PARAM_CHECK(env->error, _ccResourceType, NULL);
447
current_node = parent;
448
data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, env);
451
stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
455
if(!parent_tag_closed)
458
string_to_stream = ">";
459
axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
464
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
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);
470
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
471
"http://eucalyptus.ucsb.edu/",
476
if (!_ccResourceType->is_valid_instanceType)
479
/* no need to complain for minoccurs=0 element */
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")));
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 */
500
* parsing instanceType element
505
sprintf(start_input_str, "<%s%sinstanceType",
506
p_prefix?p_prefix:"",
507
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
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);
515
if(!adb_virtualMachineType_is_particle())
517
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
520
adb_virtualMachineType_serialize(_ccResourceType->property_instanceType,
521
env, current_node, parent_element,
522
adb_virtualMachineType_is_particle() || AXIS2_FALSE, namespaces, next_ns_index);
524
if(!adb_virtualMachineType_is_particle())
526
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
530
AXIS2_FREE(env->allocator,start_input_str);
531
AXIS2_FREE(env->allocator,end_input_str);
535
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
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);
541
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
542
"http://eucalyptus.ucsb.edu/",
547
if (!_ccResourceType->is_valid_maxInstances)
550
/* no need to complain for minoccurs=0 element */
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")));
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 */
571
* parsing maxInstances element
576
sprintf(start_input_str, "<%s%smaxInstances>",
577
p_prefix?p_prefix:"",
578
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
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);
586
sprintf (text_value_2, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, _ccResourceType->property_maxInstances);
588
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
590
axutil_stream_write(stream, env, text_value_2, axutil_strlen(text_value_2));
592
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
595
AXIS2_FREE(env->allocator,start_input_str);
596
AXIS2_FREE(env->allocator,end_input_str);
600
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
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);
606
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
607
"http://eucalyptus.ucsb.edu/",
612
if (!_ccResourceType->is_valid_availableInstances)
615
/* no need to complain for minoccurs=0 element */
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")));
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 */
636
* parsing availableInstances element
641
sprintf(start_input_str, "<%s%savailableInstances>",
642
p_prefix?p_prefix:"",
643
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
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);
651
sprintf (text_value_3, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, _ccResourceType->property_availableInstances);
653
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
655
axutil_stream_write(stream, env, text_value_3, axutil_strlen(text_value_3));
657
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
660
AXIS2_FREE(env->allocator,start_input_str);
661
AXIS2_FREE(env->allocator,end_input_str);
673
* getter for instanceType.
675
adb_virtualMachineType_t* AXIS2_CALL
676
adb_ccResourceType_get_instanceType(
677
adb_ccResourceType_t* _ccResourceType,
678
const axutil_env_t *env)
681
AXIS2_ENV_CHECK(env, NULL);
682
AXIS2_PARAM_CHECK(env->error, _ccResourceType, NULL);
685
return _ccResourceType->property_instanceType;
689
* setter for instanceType
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)
699
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
700
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
702
if(_ccResourceType->is_valid_instanceType &&
703
arg_instanceType == _ccResourceType->property_instanceType)
706
return AXIS2_SUCCESS;
709
adb_ccResourceType_reset_instanceType(_ccResourceType, env);
712
if(NULL == arg_instanceType)
714
/* We are already done */
715
return AXIS2_SUCCESS;
717
_ccResourceType->property_instanceType = arg_instanceType;
718
_ccResourceType->is_valid_instanceType = AXIS2_TRUE;
720
return AXIS2_SUCCESS;
726
* resetter for instanceType
728
axis2_status_t AXIS2_CALL
729
adb_ccResourceType_reset_instanceType(
730
adb_ccResourceType_t* _ccResourceType,
731
const axutil_env_t *env)
735
void *element = NULL;
737
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
738
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
744
if(_ccResourceType->property_instanceType != NULL)
748
adb_virtualMachineType_free(_ccResourceType->property_instanceType, env);
749
_ccResourceType->property_instanceType = NULL;
754
_ccResourceType->is_valid_instanceType = AXIS2_FALSE;
755
return AXIS2_SUCCESS;
759
* Check whether instanceType is nill
761
axis2_bool_t AXIS2_CALL
762
adb_ccResourceType_is_instanceType_nil(
763
adb_ccResourceType_t* _ccResourceType,
764
const axutil_env_t *env)
766
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
767
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_TRUE);
769
return !_ccResourceType->is_valid_instanceType;
773
* Set instanceType to nill (currently the same as reset)
775
axis2_status_t AXIS2_CALL
776
adb_ccResourceType_set_instanceType_nil(
777
adb_ccResourceType_t* _ccResourceType,
778
const axutil_env_t *env)
780
return adb_ccResourceType_reset_instanceType(_ccResourceType, env);
786
* getter for maxInstances.
789
adb_ccResourceType_get_maxInstances(
790
adb_ccResourceType_t* _ccResourceType,
791
const axutil_env_t *env)
794
AXIS2_ENV_CHECK(env, (int)0);
795
AXIS2_PARAM_CHECK(env->error, _ccResourceType, (int)0);
798
return _ccResourceType->property_maxInstances;
802
* setter for maxInstances
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)
812
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
813
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
815
if(_ccResourceType->is_valid_maxInstances &&
816
arg_maxInstances == _ccResourceType->property_maxInstances)
819
return AXIS2_SUCCESS;
822
adb_ccResourceType_reset_maxInstances(_ccResourceType, env);
824
_ccResourceType->property_maxInstances = arg_maxInstances;
825
_ccResourceType->is_valid_maxInstances = AXIS2_TRUE;
827
return AXIS2_SUCCESS;
833
* resetter for maxInstances
835
axis2_status_t AXIS2_CALL
836
adb_ccResourceType_reset_maxInstances(
837
adb_ccResourceType_t* _ccResourceType,
838
const axutil_env_t *env)
842
void *element = NULL;
844
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
845
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
848
_ccResourceType->is_valid_maxInstances = AXIS2_FALSE;
849
return AXIS2_SUCCESS;
853
* Check whether maxInstances is nill
855
axis2_bool_t AXIS2_CALL
856
adb_ccResourceType_is_maxInstances_nil(
857
adb_ccResourceType_t* _ccResourceType,
858
const axutil_env_t *env)
860
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
861
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_TRUE);
863
return !_ccResourceType->is_valid_maxInstances;
867
* Set maxInstances to nill (currently the same as reset)
869
axis2_status_t AXIS2_CALL
870
adb_ccResourceType_set_maxInstances_nil(
871
adb_ccResourceType_t* _ccResourceType,
872
const axutil_env_t *env)
874
return adb_ccResourceType_reset_maxInstances(_ccResourceType, env);
880
* getter for availableInstances.
883
adb_ccResourceType_get_availableInstances(
884
adb_ccResourceType_t* _ccResourceType,
885
const axutil_env_t *env)
888
AXIS2_ENV_CHECK(env, (int)0);
889
AXIS2_PARAM_CHECK(env->error, _ccResourceType, (int)0);
892
return _ccResourceType->property_availableInstances;
896
* setter for availableInstances
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)
906
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
907
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
909
if(_ccResourceType->is_valid_availableInstances &&
910
arg_availableInstances == _ccResourceType->property_availableInstances)
913
return AXIS2_SUCCESS;
916
adb_ccResourceType_reset_availableInstances(_ccResourceType, env);
918
_ccResourceType->property_availableInstances = arg_availableInstances;
919
_ccResourceType->is_valid_availableInstances = AXIS2_TRUE;
921
return AXIS2_SUCCESS;
927
* resetter for availableInstances
929
axis2_status_t AXIS2_CALL
930
adb_ccResourceType_reset_availableInstances(
931
adb_ccResourceType_t* _ccResourceType,
932
const axutil_env_t *env)
936
void *element = NULL;
938
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
939
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_FAILURE);
942
_ccResourceType->is_valid_availableInstances = AXIS2_FALSE;
943
return AXIS2_SUCCESS;
947
* Check whether availableInstances is nill
949
axis2_bool_t AXIS2_CALL
950
adb_ccResourceType_is_availableInstances_nil(
951
adb_ccResourceType_t* _ccResourceType,
952
const axutil_env_t *env)
954
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
955
AXIS2_PARAM_CHECK(env->error, _ccResourceType, AXIS2_TRUE);
957
return !_ccResourceType->is_valid_availableInstances;
961
* Set availableInstances to nill (currently the same as reset)
963
axis2_status_t AXIS2_CALL
964
adb_ccResourceType_set_availableInstances_nil(
965
adb_ccResourceType_t* _ccResourceType,
966
const axutil_env_t *env)
968
return adb_ccResourceType_reset_availableInstances(_ccResourceType, env);