cmpi-bindings 0.9.0 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ext/cmpi-bindings/cmpi_wrap.c +732 -206
- data/ext/cmpi-bindings/string_array.h +4 -4
- data/ext/src/cmpi_provider.c +9 -9
- data/ext/src/target_ruby.c +7 -2
- data/lib/cmpi.rb +35 -9
- metadata +15 -24
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f1cefd23941e2b4ebbda38e5661bd8ce55966373
|
4
|
+
data.tar.gz: cde95d6241639d9ad75a69d72b7a5c6975c9d6f1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 068cf7f60cee5715603d9d5d2c22e935ecbe7851c619465eceb557ce3bda3fa31e6f9a188ae1d2f78993e6898155cd80f1bc5d48ab08fffe61c380c1b9c1673c
|
7
|
+
data.tar.gz: a92c3337d9244c123f8ffff18b502fe6b1fb6ece0893966d89d8542d4ad4fd862abe3dab42ccd556765b0ec5553254db351ee5c642de6b560acbc700f9af8039
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version 2.0.
|
3
|
+
* Version 2.0.10
|
4
4
|
*
|
5
5
|
* This file is not intended to be easily readable and contains a number of
|
6
6
|
* coding conventions designed to improve portability and efficiency. Do not make
|
@@ -398,7 +398,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
|
398
398
|
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
399
399
|
}
|
400
400
|
#else /* no cast-rank mode */
|
401
|
-
# define SWIG_AddCast
|
401
|
+
# define SWIG_AddCast(r) (r)
|
402
402
|
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
|
403
403
|
#endif
|
404
404
|
|
@@ -462,18 +462,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
|
|
462
462
|
|
463
463
|
/*
|
464
464
|
Check type equivalence in a name list like <name1>|<name2>|...
|
465
|
-
Return 0 if
|
465
|
+
Return 0 if equal, -1 if nb < tb, 1 if nb > tb
|
466
466
|
*/
|
467
467
|
SWIGRUNTIME int
|
468
|
-
|
469
|
-
int equiv =
|
468
|
+
SWIG_TypeCmp(const char *nb, const char *tb) {
|
469
|
+
int equiv = 1;
|
470
470
|
const char* te = tb + strlen(tb);
|
471
471
|
const char* ne = nb;
|
472
|
-
while (
|
472
|
+
while (equiv != 0 && *ne) {
|
473
473
|
for (nb = ne; *ne; ++ne) {
|
474
474
|
if (*ne == '|') break;
|
475
475
|
}
|
476
|
-
equiv =
|
476
|
+
equiv = SWIG_TypeNameComp(nb, ne, tb, te);
|
477
477
|
if (*ne) ++ne;
|
478
478
|
}
|
479
479
|
return equiv;
|
@@ -481,24 +481,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
|
|
481
481
|
|
482
482
|
/*
|
483
483
|
Check type equivalence in a name list like <name1>|<name2>|...
|
484
|
-
Return 0 if equal,
|
484
|
+
Return 0 if not equal, 1 if equal
|
485
485
|
*/
|
486
486
|
SWIGRUNTIME int
|
487
|
-
|
488
|
-
|
489
|
-
const char* te = tb + strlen(tb);
|
490
|
-
const char* ne = nb;
|
491
|
-
while (!equiv && *ne) {
|
492
|
-
for (nb = ne; *ne; ++ne) {
|
493
|
-
if (*ne == '|') break;
|
494
|
-
}
|
495
|
-
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
|
496
|
-
if (*ne) ++ne;
|
497
|
-
}
|
498
|
-
return equiv;
|
487
|
+
SWIG_TypeEquiv(const char *nb, const char *tb) {
|
488
|
+
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
|
499
489
|
}
|
500
490
|
|
501
|
-
|
502
491
|
/*
|
503
492
|
Check the typename
|
504
493
|
*/
|
@@ -1166,19 +1155,19 @@ extern "C" {
|
|
1166
1155
|
# error sizeof(void*) is not the same as long or long long
|
1167
1156
|
#endif
|
1168
1157
|
|
1169
|
-
|
1170
|
-
/* Global Ruby hash table to store Trackings from C/C++
|
1158
|
+
/* Global hash table to store Trackings from C/C++
|
1171
1159
|
structs to Ruby Objects.
|
1172
1160
|
*/
|
1173
|
-
static
|
1161
|
+
static st_table* swig_ruby_trackings = NULL;
|
1162
|
+
|
1163
|
+
VALUE get_swig_trackings_count(ANYARGS) {
|
1164
|
+
return SWIG2NUM(swig_ruby_trackings->num_entries);
|
1165
|
+
}
|
1174
1166
|
|
1175
|
-
/* Global variable that stores a reference to the ruby
|
1176
|
-
hash table delete function. */
|
1177
|
-
static ID swig_ruby_hash_delete;
|
1178
1167
|
|
1179
|
-
/* Setup a
|
1168
|
+
/* Setup a hash table to store Trackings */
|
1180
1169
|
SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
|
1181
|
-
/* Create a
|
1170
|
+
/* Create a hash table to store Trackings from C++
|
1182
1171
|
objects to Ruby objects. */
|
1183
1172
|
|
1184
1173
|
/* Try to see if some other .so has already created a
|
@@ -1187,87 +1176,47 @@ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
|
|
1187
1176
|
This is done to allow multiple DSOs to share the same
|
1188
1177
|
tracking table.
|
1189
1178
|
*/
|
1190
|
-
|
1179
|
+
VALUE trackings_value = Qnil;
|
1180
|
+
/* change the variable name so that we can mix modules
|
1181
|
+
compiled with older SWIG's */
|
1182
|
+
ID trackings_id = rb_intern( "@__safetrackings__" );
|
1191
1183
|
VALUE verbose = rb_gv_get("VERBOSE");
|
1192
1184
|
rb_gv_set("VERBOSE", Qfalse);
|
1193
|
-
|
1185
|
+
trackings_value = rb_ivar_get( _mSWIG, trackings_id );
|
1194
1186
|
rb_gv_set("VERBOSE", verbose);
|
1195
1187
|
|
1196
|
-
/*
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
/* We cast the pointer to an unsigned long
|
1211
|
-
and then store a reference to it using
|
1212
|
-
a Ruby number object. */
|
1213
|
-
|
1214
|
-
/* Convert the pointer to a Ruby number */
|
1215
|
-
return SWIG2NUM(ptr);
|
1216
|
-
}
|
1217
|
-
|
1218
|
-
/* Get a Ruby number to reference an object */
|
1219
|
-
SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
|
1220
|
-
/* We cast the object to an unsigned long
|
1221
|
-
and then store a reference to it using
|
1222
|
-
a Ruby number object. */
|
1223
|
-
|
1224
|
-
/* Convert the Object to a Ruby number */
|
1225
|
-
return SWIG2NUM(object);
|
1226
|
-
}
|
1227
|
-
|
1228
|
-
/* Get a Ruby object from a previously stored reference */
|
1229
|
-
SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
|
1230
|
-
/* The provided Ruby number object is a reference
|
1231
|
-
to the Ruby object we want.*/
|
1232
|
-
|
1233
|
-
/* Convert the Ruby number to a Ruby object */
|
1234
|
-
return NUM2SWIG(reference);
|
1188
|
+
/* The trick here is that we have to store the hash table
|
1189
|
+
pointer in a Ruby variable. We do not want Ruby's GC to
|
1190
|
+
treat this pointer as a Ruby object, so we convert it to
|
1191
|
+
a Ruby numeric value. */
|
1192
|
+
if (trackings_value == Qnil) {
|
1193
|
+
/* No, it hasn't. Create one ourselves */
|
1194
|
+
swig_ruby_trackings = st_init_numtable();
|
1195
|
+
rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) );
|
1196
|
+
}
|
1197
|
+
else {
|
1198
|
+
swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
|
1199
|
+
}
|
1200
|
+
|
1201
|
+
rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", get_swig_trackings_count, NULL);
|
1235
1202
|
}
|
1236
1203
|
|
1237
1204
|
/* Add a Tracking from a C/C++ struct to a Ruby object */
|
1238
1205
|
SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
|
1239
|
-
/* In a Ruby hash table we store the pointer and
|
1240
|
-
the associated Ruby object. The trick here is
|
1241
|
-
that we cannot store the Ruby object directly - if
|
1242
|
-
we do then it cannot be garbage collected. So
|
1243
|
-
instead we typecast it as a unsigned long and
|
1244
|
-
convert it to a Ruby number object.*/
|
1245
|
-
|
1246
|
-
/* Get a reference to the pointer as a Ruby number */
|
1247
|
-
VALUE key = SWIG_RubyPtrToReference(ptr);
|
1248
|
-
|
1249
|
-
/* Get a reference to the Ruby object as a Ruby number */
|
1250
|
-
VALUE value = SWIG_RubyObjectToReference(object);
|
1251
|
-
|
1252
1206
|
/* Store the mapping to the global hash table. */
|
1253
|
-
|
1207
|
+
st_insert(swig_ruby_trackings, (st_data_t)ptr, object);
|
1254
1208
|
}
|
1255
1209
|
|
1256
1210
|
/* Get the Ruby object that owns the specified C/C++ struct */
|
1257
1211
|
SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
|
1258
|
-
/* Get a reference to the pointer as a Ruby number */
|
1259
|
-
VALUE key = SWIG_RubyPtrToReference(ptr);
|
1260
|
-
|
1261
1212
|
/* Now lookup the value stored in the global hash table */
|
1262
|
-
VALUE value
|
1263
|
-
|
1264
|
-
if (
|
1265
|
-
|
1266
|
-
return Qnil;
|
1213
|
+
VALUE value;
|
1214
|
+
|
1215
|
+
if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) {
|
1216
|
+
return value;
|
1267
1217
|
}
|
1268
1218
|
else {
|
1269
|
-
|
1270
|
-
return SWIG_RubyReferenceToObject(value);
|
1219
|
+
return Qnil;
|
1271
1220
|
}
|
1272
1221
|
}
|
1273
1222
|
|
@@ -1276,12 +1225,8 @@ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
|
|
1276
1225
|
since the same memory address may be reused later to create
|
1277
1226
|
a new object. */
|
1278
1227
|
SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
|
1279
|
-
/*
|
1280
|
-
|
1281
|
-
|
1282
|
-
/* Delete the object from the hash table by calling Ruby's
|
1283
|
-
do this we need to call the Hash.delete method.*/
|
1284
|
-
rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
|
1228
|
+
/* Delete the object from the hash table */
|
1229
|
+
st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL);
|
1285
1230
|
}
|
1286
1231
|
|
1287
1232
|
/* This is a helper method that unlinks a Ruby object from its
|
@@ -1291,10 +1236,25 @@ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
|
|
1291
1236
|
VALUE object = SWIG_RubyInstanceFor(ptr);
|
1292
1237
|
|
1293
1238
|
if (object != Qnil) {
|
1239
|
+
if (TYPE(object) != T_DATA)
|
1240
|
+
abort();
|
1294
1241
|
DATA_PTR(object) = 0;
|
1295
1242
|
}
|
1296
1243
|
}
|
1297
1244
|
|
1245
|
+
/* This is a helper method that iterates over all the trackings
|
1246
|
+
passing the C++ object pointer and its related Ruby object
|
1247
|
+
to the passed callback function. */
|
1248
|
+
|
1249
|
+
/* Proxy method to abstract the internal trackings datatype */
|
1250
|
+
static int _ruby_internal_iterate_callback(void* ptr, VALUE obj, void(*meth)(void* ptr, VALUE obj)) {
|
1251
|
+
(*meth)(ptr, obj);
|
1252
|
+
return ST_CONTINUE;
|
1253
|
+
}
|
1254
|
+
|
1255
|
+
SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
|
1256
|
+
st_foreach(swig_ruby_trackings, (int (*)(ANYARGS))&_ruby_internal_iterate_callback, (st_data_t)meth);
|
1257
|
+
}
|
1298
1258
|
|
1299
1259
|
#ifdef __cplusplus
|
1300
1260
|
}
|
@@ -1750,7 +1710,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
|
|
1750
1710
|
SWIGINTERN
|
1751
1711
|
int SWIG_Ruby_isCallable( VALUE proc )
|
1752
1712
|
{
|
1753
|
-
if ( rb_respond_to( proc, swig_call_id )
|
1713
|
+
if ( rb_respond_to( proc, swig_call_id ) )
|
1754
1714
|
return 1;
|
1755
1715
|
return 0;
|
1756
1716
|
}
|
@@ -1763,7 +1723,7 @@ int SWIG_Ruby_isCallable( VALUE proc )
|
|
1763
1723
|
SWIGINTERN
|
1764
1724
|
int SWIG_Ruby_arity( VALUE proc, int minimal )
|
1765
1725
|
{
|
1766
|
-
if ( rb_respond_to( proc, swig_arity_id )
|
1726
|
+
if ( rb_respond_to( proc, swig_arity_id ) )
|
1767
1727
|
{
|
1768
1728
|
VALUE num = rb_funcall( proc, swig_arity_id, 0 );
|
1769
1729
|
int arity = NUM2INT(num);
|
@@ -1846,19 +1806,18 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1846
1806
|
#define SWIGTYPE_p_float swig_types[51]
|
1847
1807
|
#define SWIGTYPE_p_int swig_types[52]
|
1848
1808
|
#define SWIGTYPE_p_long_long swig_types[53]
|
1849
|
-
#define
|
1850
|
-
#define
|
1851
|
-
#define
|
1852
|
-
#define
|
1853
|
-
#define
|
1854
|
-
#define
|
1855
|
-
#define
|
1856
|
-
#define
|
1857
|
-
#define
|
1858
|
-
#define
|
1859
|
-
|
1860
|
-
static
|
1861
|
-
static swig_module_info swig_module = {swig_types, 65, 0, 0, 0, 0};
|
1809
|
+
#define SWIGTYPE_p_p_char swig_types[54]
|
1810
|
+
#define SWIGTYPE_p_p_void swig_types[55]
|
1811
|
+
#define SWIGTYPE_p_short swig_types[56]
|
1812
|
+
#define SWIGTYPE_p_signed_char swig_types[57]
|
1813
|
+
#define SWIGTYPE_p_uint64_t swig_types[58]
|
1814
|
+
#define SWIGTYPE_p_unsigned_char swig_types[59]
|
1815
|
+
#define SWIGTYPE_p_unsigned_int swig_types[60]
|
1816
|
+
#define SWIGTYPE_p_unsigned_long_long swig_types[61]
|
1817
|
+
#define SWIGTYPE_p_unsigned_short swig_types[62]
|
1818
|
+
#define SWIGTYPE_p_void swig_types[63]
|
1819
|
+
static swig_type_info *swig_types[65];
|
1820
|
+
static swig_module_info swig_module = {swig_types, 64, 0, 0, 0, 0};
|
1862
1821
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1863
1822
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1864
1823
|
|
@@ -1873,7 +1832,7 @@ static VALUE mCmpi;
|
|
1873
1832
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1874
1833
|
|
1875
1834
|
|
1876
|
-
#define SWIGVERSION
|
1835
|
+
#define SWIGVERSION 0x020010
|
1877
1836
|
#define SWIG_VERSION SWIGVERSION
|
1878
1837
|
|
1879
1838
|
|
@@ -2307,10 +2266,12 @@ cmpi_broker()
|
|
2307
2266
|
VALUE broker = rb_funcall(mCmpi, rb_intern("broker"), 0);
|
2308
2267
|
res1 = SWIG_ConvertPtr(broker, &ptr, SWIGTYPE_p__CMPIBroker, 0 | 0 );
|
2309
2268
|
if (!SWIG_IsOK(res1)) {
|
2310
|
-
|
2269
|
+
SWIG_exception(SWIG_ArgError(res1), Ruby_Format_TypeError("", "CMPIBroker *", "broker", 1, broker));
|
2311
2270
|
}
|
2312
2271
|
return (CMPIBroker *)ptr;
|
2272
|
+
#if !defined (SWIGRUBY)
|
2313
2273
|
fail:
|
2274
|
+
#endif
|
2314
2275
|
return NULL;
|
2315
2276
|
}
|
2316
2277
|
|
@@ -2339,11 +2300,6 @@ to_cmpi_string(VALUE data)
|
|
2339
2300
|
static CMPIType
|
2340
2301
|
target_to_value(Target_Type data, CMPIValue *value, CMPIType type)
|
2341
2302
|
{
|
2342
|
-
/* A NULL value always has CMPIType CMPI_null */
|
2343
|
-
if (Target_Null_p(data)) {
|
2344
|
-
value->chars = NULL;
|
2345
|
-
return CMPI_null;
|
2346
|
-
}
|
2347
2303
|
#if defined(SWIGRUBY)
|
2348
2304
|
/*
|
2349
2305
|
* Array-type
|
@@ -2353,7 +2309,12 @@ target_to_value(Target_Type data, CMPIValue *value, CMPIType type)
|
|
2353
2309
|
|
2354
2310
|
const CMPIBroker* broker = cmpi_broker();
|
2355
2311
|
int size, i;
|
2312
|
+
CMPIType element_type = 0;
|
2356
2313
|
if (TYPE(data) != T_ARRAY) {
|
2314
|
+
if (Target_Null_p(data)) {
|
2315
|
+
value->array = NULL;
|
2316
|
+
return CMPI_null;
|
2317
|
+
}
|
2357
2318
|
data = rb_funcall(data, rb_intern("to_a"), 0 );
|
2358
2319
|
}
|
2359
2320
|
size = RARRAY_LEN(data);
|
@@ -2362,9 +2323,22 @@ target_to_value(Target_Type data, CMPIValue *value, CMPIType type)
|
|
2362
2323
|
type &= ~CMPI_ARRAY;
|
2363
2324
|
for (i = 0; i < size; ++i) {
|
2364
2325
|
CMPIValue val;
|
2326
|
+
CMPIType new_type;
|
2365
2327
|
Target_Type elem = rb_ary_entry(data, i);
|
2366
|
-
target_to_value(elem, &val, type);
|
2367
|
-
|
2328
|
+
new_type = target_to_value(elem, &val, type);
|
2329
|
+
if (element_type) {
|
2330
|
+
/* ensure all array elements have same type */
|
2331
|
+
if (new_type != element_type) {
|
2332
|
+
SWIG_exception(SWIG_ValueError, "non-uniform element types in array");
|
2333
|
+
}
|
2334
|
+
}
|
2335
|
+
else {
|
2336
|
+
element_type = new_type;
|
2337
|
+
}
|
2338
|
+
CMSetArrayElementAt(value->array, i, &val, element_type);
|
2339
|
+
}
|
2340
|
+
if (type & ((1<<15)|(1<<14))) { /* embedded instance or object */
|
2341
|
+
type = element_type;
|
2368
2342
|
}
|
2369
2343
|
/* re-add ARRAY flag */
|
2370
2344
|
type |= CMPI_ARRAY;
|
@@ -2377,16 +2351,26 @@ target_to_value(Target_Type data, CMPIValue *value, CMPIType type)
|
|
2377
2351
|
*/
|
2378
2352
|
|
2379
2353
|
if ((type & CMPI_REAL)) {
|
2354
|
+
if (Target_Null_p(data)) {
|
2355
|
+
SWIG_exception(SWIG_ValueError, "can't convert NULL to real");
|
2356
|
+
}
|
2380
2357
|
if (TYPE(data) != T_FLOAT) {
|
2381
2358
|
data = rb_funcall(data, rb_intern("to_f"), 0 );
|
2382
2359
|
}
|
2383
2360
|
}
|
2384
2361
|
else if ((type & CMPI_INTEGER)) {
|
2362
|
+
if (Target_Null_p(data)) {
|
2363
|
+
SWIG_exception(SWIG_ValueError, "can't convert NULL to integer");
|
2364
|
+
}
|
2385
2365
|
if (!FIXNUM_P(data)) {
|
2386
2366
|
data = rb_funcall(data, rb_intern("to_i"), 0 );
|
2387
2367
|
}
|
2388
2368
|
}
|
2389
|
-
|
2369
|
+
else if (Target_Null_p(data)) {
|
2370
|
+
/* A NULL value always has CMPIType CMPI_null */
|
2371
|
+
value->chars = NULL;
|
2372
|
+
return CMPI_null;
|
2373
|
+
}
|
2390
2374
|
switch (type) {
|
2391
2375
|
case CMPI_null: /* 0 */
|
2392
2376
|
/* CMPIType not given, deduce it from Ruby type */
|
@@ -2491,7 +2475,7 @@ target_to_value(Target_Type data, CMPIValue *value, CMPIType type)
|
|
2491
2475
|
res = SWIG_ConvertPtr(data, (void *)&(value->inst), SWIGTYPE_p__CMPIInstance, 0 | 0 );
|
2492
2476
|
}
|
2493
2477
|
if (!SWIG_IsOK(res)) {
|
2494
|
-
|
2478
|
+
SWIG_exception(SWIG_ArgError(res), Ruby_Format_TypeError( "", "CMPIInstance *","target_to_value", 1, data ));
|
2495
2479
|
}
|
2496
2480
|
break;
|
2497
2481
|
}
|
@@ -2512,7 +2496,7 @@ target_to_value(Target_Type data, CMPIValue *value, CMPIType type)
|
|
2512
2496
|
res = SWIG_ConvertPtr(data, (void *)&(value->ref), SWIGTYPE_p__CMPIObjectPath, 0 | 0 );
|
2513
2497
|
}
|
2514
2498
|
if (!SWIG_IsOK(res)) {
|
2515
|
-
|
2499
|
+
SWIG_exception(SWIG_ArgError(res), Ruby_Format_TypeError( "", "CMPIObjectPath *","target_to_value", 1, data ));
|
2516
2500
|
}
|
2517
2501
|
break;
|
2518
2502
|
}
|
@@ -2553,6 +2537,31 @@ target_to_value(Target_Type data, CMPIValue *value, CMPIType type)
|
|
2553
2537
|
case CMPI_charsptr: /* ((16+10)<<8) */
|
2554
2538
|
break;
|
2555
2539
|
#endif
|
2540
|
+
case ((1)<<14): { /* cmpi-bindings-ruby: EmbeddedObject */
|
2541
|
+
/* class or instance */
|
2542
|
+
/* need CMPIClass as Ruby class */
|
2543
|
+
int res;
|
2544
|
+
res = SWIG_ConvertPtr(data, (void *)&(value->inst), SWIGTYPE_p__CMPIInstance, 0 | 0 );
|
2545
|
+
if (!SWIG_IsOK(res)) {
|
2546
|
+
SWIG_exception(SWIG_ValueError, "EmbeddedObject supports CMPI::Instance only");
|
2547
|
+
}
|
2548
|
+
else {
|
2549
|
+
type = CMPI_instance;
|
2550
|
+
}
|
2551
|
+
}
|
2552
|
+
break;
|
2553
|
+
case ((1)<<15): { /* cmpi-bindings-ruby: EmbeddedInstance */
|
2554
|
+
/* class or instance */
|
2555
|
+
int res;
|
2556
|
+
res = SWIG_ConvertPtr(data, (void *)&(value->inst), SWIGTYPE_p__CMPIInstance, 0 | 0 );
|
2557
|
+
if (!SWIG_IsOK(res)) {
|
2558
|
+
SWIG_exception(SWIG_ValueError, "EmbeddedInstance expects CMPI::Instance");
|
2559
|
+
}
|
2560
|
+
else {
|
2561
|
+
type = CMPI_instance;
|
2562
|
+
}
|
2563
|
+
}
|
2564
|
+
break;
|
2556
2565
|
default: {
|
2557
2566
|
static char msg[64];
|
2558
2567
|
snprintf(msg, 63, "target_to_value unhandled type 0x%04x", type);
|
@@ -2561,7 +2570,9 @@ target_to_value(Target_Type data, CMPIValue *value, CMPIType type)
|
|
2561
2570
|
break;
|
2562
2571
|
} /* switch (type) */
|
2563
2572
|
}
|
2573
|
+
#if !defined (SWIGRUBY)
|
2564
2574
|
fail:
|
2575
|
+
#endif
|
2565
2576
|
return type;
|
2566
2577
|
#else
|
2567
2578
|
#error Undefined
|
@@ -2647,6 +2658,32 @@ static void _raise_ex(const CMPIStatus* st)
|
|
2647
2658
|
#endif /* SWIGPYTHON */
|
2648
2659
|
}
|
2649
2660
|
|
2661
|
+
/*
|
2662
|
+
*==============================================================================
|
2663
|
+
* CMPISelectExp wrapper to capture also the projections
|
2664
|
+
*==============================================================================
|
2665
|
+
*/
|
2666
|
+
|
2667
|
+
typedef struct select_filter_exp {
|
2668
|
+
const CMPISelectExp *exp;
|
2669
|
+
char **filter;
|
2670
|
+
} select_filter_exp;
|
2671
|
+
|
2672
|
+
static select_filter_exp *
|
2673
|
+
wrap_select_filter(const CMPISelectExp *exp, char **keys)
|
2674
|
+
{
|
2675
|
+
select_filter_exp *sfe = (select_filter_exp *)calloc(1, sizeof(select_filter_exp));
|
2676
|
+
if (sfe == NULL) {
|
2677
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
2678
|
+
}
|
2679
|
+
sfe->exp = exp;
|
2680
|
+
sfe->filter = keys;
|
2681
|
+
#if !defined(SWIGRUBY)
|
2682
|
+
fail:
|
2683
|
+
#endif
|
2684
|
+
return sfe;
|
2685
|
+
}
|
2686
|
+
|
2650
2687
|
/*
|
2651
2688
|
**==============================================================================
|
2652
2689
|
**
|
@@ -2723,6 +2760,71 @@ static void log_message(
|
|
2723
2760
|
|
2724
2761
|
#include "string_array.h"
|
2725
2762
|
|
2763
|
+
/*
|
2764
|
+
* helper for CMPISelectExp wrapper
|
2765
|
+
*/
|
2766
|
+
|
2767
|
+
static void
|
2768
|
+
release_select_filter_exp(select_filter_exp *sfe)
|
2769
|
+
{
|
2770
|
+
CMRelease((CMPISelectExp *)sfe->exp);
|
2771
|
+
if (sfe->filter) {
|
2772
|
+
int i = 0;
|
2773
|
+
while (sfe->filter[i])
|
2774
|
+
free(sfe->filter[i++]);
|
2775
|
+
free(sfe->filter);
|
2776
|
+
}
|
2777
|
+
free(sfe);
|
2778
|
+
}
|
2779
|
+
|
2780
|
+
static select_filter_exp *
|
2781
|
+
create_select_filter_exp(const CMPIBroker* broker, const char *query, const char *language, char **keys)
|
2782
|
+
{
|
2783
|
+
CMPIStatus st = {CMPI_RC_OK, NULL};
|
2784
|
+
CMPIArray *projection;
|
2785
|
+
select_filter_exp *sfe;
|
2786
|
+
CMPISelectExp *exp = CMNewSelectExp(broker, query, language, &projection, &st);
|
2787
|
+
RAISE_IF(st);
|
2788
|
+
sfe = wrap_select_filter(exp, NULL);
|
2789
|
+
if (projection || keys) {
|
2790
|
+
size_t kcount = 0;
|
2791
|
+
int pcount = 0;
|
2792
|
+
int count = 0;
|
2793
|
+
if (keys) {
|
2794
|
+
kcount = string_array_size(keys);
|
2795
|
+
}
|
2796
|
+
if (projection) {
|
2797
|
+
pcount = CMGetArrayCount(projection, NULL);
|
2798
|
+
}
|
2799
|
+
count = pcount + kcount;
|
2800
|
+
if (count > 0) {
|
2801
|
+
int i = 0;
|
2802
|
+
sfe->filter = calloc(count + 1, sizeof(char **)); /* incl. final NULL ptr */
|
2803
|
+
for (; i < kcount; i++) {
|
2804
|
+
sfe->filter[i] = strdup(keys[i]);
|
2805
|
+
}
|
2806
|
+
for (; i < count; i++) {
|
2807
|
+
CMPIData data = CMGetArrayElementAt(projection, i-kcount, &st);
|
2808
|
+
if (st.rc != CMPI_RC_OK) {
|
2809
|
+
release_select_filter_exp(sfe);
|
2810
|
+
sfe = NULL;
|
2811
|
+
RAISE_IF(st);
|
2812
|
+
break;
|
2813
|
+
}
|
2814
|
+
sfe->filter[i] = (char *)strdup(CMGetCharsPtr(data.value.string, NULL));
|
2815
|
+
CMRelease(data.value.string);
|
2816
|
+
}
|
2817
|
+
}
|
2818
|
+
if (projection) {
|
2819
|
+
CMRelease(projection);
|
2820
|
+
}
|
2821
|
+
}
|
2822
|
+
#if !defined(SWIGRUBY)
|
2823
|
+
fail:
|
2824
|
+
#endif
|
2825
|
+
return sfe;
|
2826
|
+
}
|
2827
|
+
|
2726
2828
|
|
2727
2829
|
|
2728
2830
|
#include <limits.h>
|
@@ -2752,7 +2854,7 @@ SWIG_ruby_failed(void)
|
|
2752
2854
|
}
|
2753
2855
|
|
2754
2856
|
|
2755
|
-
/*@SWIG:/usr/share/swig/2.0.
|
2857
|
+
/*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2756
2858
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
2757
2859
|
{
|
2758
2860
|
VALUE obj = args[0];
|
@@ -2811,7 +2913,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2811
2913
|
}
|
2812
2914
|
|
2813
2915
|
|
2814
|
-
/*@SWIG:/usr/share/swig/2.0.
|
2916
|
+
/*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2815
2917
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args)
|
2816
2918
|
{
|
2817
2919
|
VALUE obj = args[0];
|
@@ -2900,7 +3002,7 @@ SWIG_From_unsigned_SS_char (unsigned char value)
|
|
2900
3002
|
}
|
2901
3003
|
|
2902
3004
|
|
2903
|
-
/*@SWIG:/usr/share/swig/2.0.
|
3005
|
+
/*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2904
3006
|
SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE *args)
|
2905
3007
|
{
|
2906
3008
|
VALUE obj = args[0];
|
@@ -2929,7 +3031,7 @@ SWIG_AsVal_long_SS_long (VALUE obj, long long *val)
|
|
2929
3031
|
}
|
2930
3032
|
|
2931
3033
|
|
2932
|
-
/*@SWIG:/usr/share/swig/2.0.
|
3034
|
+
/*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2933
3035
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
2934
3036
|
{
|
2935
3037
|
VALUE obj = args[0];
|
@@ -3020,7 +3122,7 @@ SWIG_From_signed_SS_char (signed char value)
|
|
3020
3122
|
}
|
3021
3123
|
|
3022
3124
|
|
3023
|
-
/*@SWIG:/usr/share/swig/2.0.
|
3125
|
+
/*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
3024
3126
|
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
|
3025
3127
|
{
|
3026
3128
|
VALUE obj = args[0];
|
@@ -3174,7 +3276,7 @@ SWIGINTERN int _CMPIData_is_array(struct _CMPIData *self){
|
|
3174
3276
|
SWIGINTERN VALUE _CMPIData__value(struct _CMPIData *self){
|
3175
3277
|
return data_value(self);
|
3176
3278
|
}
|
3177
|
-
SWIGINTERN struct _CMPIStatus *new__CMPIStatus(){
|
3279
|
+
SWIGINTERN struct _CMPIStatus *new__CMPIStatus(void){
|
3178
3280
|
CMPIStatus *status = (CMPIStatus *)calloc(1, sizeof(CMPIStatus));
|
3179
3281
|
status->rc = CMPI_RC_OK;
|
3180
3282
|
return status;
|
@@ -3316,12 +3418,12 @@ SWIGINTERN struct _CMPIObjectPath *new__CMPIObjectPath(VALUE ns_t,VALUE cn_t){
|
|
3316
3418
|
/* parse <namespace>:<classname>[.<key>=<value>[,<key>=<value>]...] */
|
3317
3419
|
CMPIValue value;
|
3318
3420
|
const char *ptr;
|
3319
|
-
|
3320
3421
|
/* find and extract namespace */
|
3422
|
+
/* fprintf(stderr, "CMPIObjectPath.new(%s)\n", ns); */
|
3321
3423
|
ptr = strchr(ns, ':');
|
3322
3424
|
if (ptr == NULL) {
|
3323
3425
|
path = NULL;
|
3324
|
-
|
3426
|
+
SWIG_exception(SWIG_ValueError, "Missing ':' between namespace and classname");
|
3325
3427
|
}
|
3326
3428
|
ns = strndup(ns, ptr-ns);
|
3327
3429
|
/* find and extract classname */
|
@@ -3334,7 +3436,6 @@ SWIGINTERN struct _CMPIObjectPath *new__CMPIObjectPath(VALUE ns_t,VALUE cn_t){
|
|
3334
3436
|
path = CMNewObjectPath( broker, ns, cn, &st );
|
3335
3437
|
RAISE_IF(st);
|
3336
3438
|
|
3337
|
-
|
3338
3439
|
/* find and extract properties (if any) */
|
3339
3440
|
|
3340
3441
|
/*
|
@@ -3349,25 +3450,30 @@ SWIGINTERN struct _CMPIObjectPath *new__CMPIObjectPath(VALUE ns_t,VALUE cn_t){
|
|
3349
3450
|
ptr = strchr(key, '=');
|
3350
3451
|
if (ptr == NULL) {
|
3351
3452
|
path = NULL;
|
3352
|
-
|
3453
|
+
SWIG_exception(SWIG_ValueError, "Missing '=' between property name and value");
|
3353
3454
|
}
|
3354
3455
|
key = strndup(key, ptr-key);
|
3355
3456
|
val = ++ptr;
|
3356
3457
|
if (*val == '"') {
|
3357
3458
|
val++;
|
3358
3459
|
ptr = val;
|
3359
|
-
for (
|
3460
|
+
for (;*ptr;) {
|
3360
3461
|
ptr = strchr(ptr, '"');
|
3361
3462
|
if (ptr == NULL) {
|
3362
3463
|
path = NULL;
|
3363
|
-
|
3464
|
+
SWIG_exception(SWIG_ValueError, "Missing '\"' at end of string value");
|
3364
3465
|
}
|
3365
3466
|
if (*(ptr-1) != '\\') /* not escaped " */
|
3366
3467
|
break;
|
3367
3468
|
ptr++;
|
3368
3469
|
}
|
3369
3470
|
val = strndup(val, ptr-val);
|
3370
|
-
++ptr;
|
3471
|
+
++ptr; /* skip " */
|
3472
|
+
if (*ptr) { /* not EOS */
|
3473
|
+
if (*ptr++ != ',') {
|
3474
|
+
SWIG_exception(SWIG_ValueError, "Missing ',' after string value");
|
3475
|
+
}
|
3476
|
+
}
|
3371
3477
|
}
|
3372
3478
|
else {
|
3373
3479
|
ptr = strchr(ptr, ',');
|
@@ -3375,8 +3481,9 @@ SWIGINTERN struct _CMPIObjectPath *new__CMPIObjectPath(VALUE ns_t,VALUE cn_t){
|
|
3375
3481
|
val = strndup(val, ptr-val);
|
3376
3482
|
++ptr;
|
3377
3483
|
}
|
3378
|
-
else
|
3484
|
+
else {
|
3379
3485
|
val = strdup(val);
|
3486
|
+
}
|
3380
3487
|
}
|
3381
3488
|
value.string = CMNewString(broker, val, &st);
|
3382
3489
|
RAISE_IF(st);
|
@@ -3390,7 +3497,9 @@ SWIGINTERN struct _CMPIObjectPath *new__CMPIObjectPath(VALUE ns_t,VALUE cn_t){
|
|
3390
3497
|
path = CMNewObjectPath( broker, ns, cn, &st );
|
3391
3498
|
RAISE_IF(st);
|
3392
3499
|
}
|
3393
|
-
|
3500
|
+
|
3501
|
+
|
3502
|
+
|
3394
3503
|
return path;
|
3395
3504
|
}
|
3396
3505
|
SWIGINTERN char const *_CMPIObjectPath_string(struct _CMPIObjectPath *self){
|
@@ -3403,10 +3512,22 @@ SWIGINTERN CMPIStatus _CMPIObjectPath_set(struct _CMPIObjectPath *self,VALUE pro
|
|
3403
3512
|
const char *name;
|
3404
3513
|
CMPIValue value;
|
3405
3514
|
CMPIType actual_type;
|
3406
|
-
CMPIType type
|
3515
|
+
CMPIType type;
|
3516
|
+
CMPIStatus status;
|
3517
|
+
if (NIL_P(expected_type)) {
|
3518
|
+
type = 0;
|
3519
|
+
}
|
3520
|
+
else if (FIXNUM_P(expected_type)) {
|
3521
|
+
type = FIX2LONG(expected_type);
|
3522
|
+
}
|
3523
|
+
else {
|
3524
|
+
SWIG_exception(SWIG_ValueError, "bad expected_type");
|
3525
|
+
}
|
3407
3526
|
name = target_charptr(property);
|
3408
3527
|
actual_type = target_to_value(data, &value, type);
|
3409
|
-
|
3528
|
+
status = CMAddKey(self, name, &value, actual_type);
|
3529
|
+
RAISE_IF(status);
|
3530
|
+
return status;
|
3410
3531
|
}
|
3411
3532
|
SWIGINTERN void _CMPIObjectPath_add_key(struct _CMPIObjectPath *self,char const *name,CMPIValue const *value,CMPIType const type){
|
3412
3533
|
RAISE_IF(CMAddKey(self, name, value, type));
|
@@ -3571,10 +3692,22 @@ SWIGINTERN CMPIStatus _CMPIInstance_set(struct _CMPIInstance *self,VALUE propert
|
|
3571
3692
|
const char *name;
|
3572
3693
|
CMPIValue value;
|
3573
3694
|
CMPIType actual_type;
|
3574
|
-
CMPIType type
|
3695
|
+
CMPIType type;
|
3696
|
+
CMPIStatus status;
|
3697
|
+
if (NIL_P(expected_type)) {
|
3698
|
+
type = 0;
|
3699
|
+
}
|
3700
|
+
else if (FIXNUM_P(expected_type)) {
|
3701
|
+
type = FIX2LONG(expected_type);
|
3702
|
+
}
|
3703
|
+
else {
|
3704
|
+
SWIG_exception(SWIG_ValueError, "bad expected_type");
|
3705
|
+
}
|
3575
3706
|
name = target_charptr(property);
|
3576
3707
|
actual_type = target_to_value(data, &value, type);
|
3577
|
-
|
3708
|
+
status = CMSetProperty(self, name, &value, actual_type);
|
3709
|
+
RAISE_IF(status);
|
3710
|
+
return status;
|
3578
3711
|
}
|
3579
3712
|
SWIGINTERN void _CMPIInstance_set_property(struct _CMPIInstance *self,char const *name,CMPIValue const *value,CMPIType const type){
|
3580
3713
|
RAISE_IF(CMSetProperty(self, name, value, type));
|
@@ -3772,8 +3905,26 @@ SWIGINTERN int _CMPIArgs_arg_count(struct _CMPIArgs *self){
|
|
3772
3905
|
|
3773
3906
|
return result;
|
3774
3907
|
}
|
3908
|
+
SWIGINTERN struct _CMPISelectExp *new__CMPISelectExp(char const *query,char const *language,char **keys){
|
3909
|
+
|
3910
|
+
const CMPIBroker* broker = cmpi_broker();
|
3911
|
+
|
3912
|
+
return (CMPISelectExp *)create_select_filter_exp(broker, query, language, keys);
|
3913
|
+
}
|
3914
|
+
SWIGINTERN int _CMPISelectExp_match(struct _CMPISelectExp *self,CMPIInstance *instance){
|
3915
|
+
CMPIStatus st = {CMPI_RC_OK, NULL};
|
3916
|
+
select_filter_exp *sfe = (select_filter_exp *)self;
|
3917
|
+
CMPIBoolean res = CMEvaluateSelExp(sfe->exp, instance, &st);
|
3918
|
+
RAISE_IF(st);
|
3919
|
+
return res;
|
3920
|
+
}
|
3921
|
+
SWIGINTERN char **_CMPISelectExp_filter(struct _CMPISelectExp *self){
|
3922
|
+
select_filter_exp *sfe = (select_filter_exp *)self;
|
3923
|
+
return sfe->filter;
|
3924
|
+
}
|
3775
3925
|
SWIGINTERN char const *_CMPISelectExp_string(struct _CMPISelectExp *self){
|
3776
|
-
|
3926
|
+
select_filter_exp *sfe = (select_filter_exp *)self;
|
3927
|
+
CMPIString *s = CMGetSelExpString(sfe->exp, NULL);
|
3777
3928
|
const char *result = strdup(CMGetCharPtr(s));
|
3778
3929
|
CMRelease(s);
|
3779
3930
|
return result;
|
@@ -3927,7 +4078,7 @@ SWIGINTERN uint64_t _CMPIDateTime_to_i(struct _CMPIDateTime *self){
|
|
3927
4078
|
SWIGINTERN int _CMPIDateTime_is_interval(struct _CMPIDateTime *self){
|
3928
4079
|
return CMIsInterval(self, NULL);
|
3929
4080
|
}
|
3930
|
-
SWIGINTERN struct _CMPIException *new__CMPIException(){
|
4081
|
+
SWIGINTERN struct _CMPIException *new__CMPIException(void){
|
3931
4082
|
return (CMPIException*)calloc(1, sizeof(CMPIException));
|
3932
4083
|
}
|
3933
4084
|
SWIGINTERN int _CMPIException_get_error_code(struct _CMPIException *self){
|
@@ -4176,14 +4327,8 @@ SWIGINTERN CMPIArray *_CMPIBroker_new_array(struct _CMPIBroker *self,int count,C
|
|
4176
4327
|
RAISE_IF(st);
|
4177
4328
|
return result;
|
4178
4329
|
}
|
4179
|
-
SWIGINTERN CMPISelectExp *_CMPIBroker_new_select_exp(struct _CMPIBroker *self,char const *query,char const *lang,
|
4180
|
-
|
4181
|
-
CMPISelectExp* result;
|
4182
|
-
|
4183
|
-
return CMNewSelectExp(self, query, lang, projection, &st);
|
4184
|
-
RAISE_IF(st);
|
4185
|
-
|
4186
|
-
return result;
|
4330
|
+
SWIGINTERN CMPISelectExp *_CMPIBroker_new_select_exp(struct _CMPIBroker *self,char const *query,char const *lang,char **projection){
|
4331
|
+
return (CMPISelectExp *)create_select_filter_exp(self, query, lang, projection);
|
4187
4332
|
}
|
4188
4333
|
SWIGINTERN CMPIError *_CMPIBroker_new_error(struct _CMPIBroker *self,char const *owner,char const *msgID,char const *msg,CMPIErrorSeverity const sev,CMPIErrorProbableCause const pc,CMPIrc const cimStatusCode){
|
4189
4334
|
CMPIStatus st = { CMPI_RC_OK, NULL };
|
@@ -10203,8 +10348,6 @@ _wrap_CMPIInstance_set_property_filter(int argc, VALUE *argv, VALUE self) {
|
|
10203
10348
|
char **arg2 = (char **) 0 ;
|
10204
10349
|
void *argp1 = 0 ;
|
10205
10350
|
int res1 = 0 ;
|
10206
|
-
void *argp2 = 0 ;
|
10207
|
-
int res2 = 0 ;
|
10208
10351
|
|
10209
10352
|
if ((argc < 1) || (argc > 1)) {
|
10210
10353
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
@@ -10214,11 +10357,27 @@ _wrap_CMPIInstance_set_property_filter(int argc, VALUE *argv, VALUE self) {
|
|
10214
10357
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _CMPIInstance *","set_property_filter", 1, self ));
|
10215
10358
|
}
|
10216
10359
|
arg1 = (struct _CMPIInstance *)(argp1);
|
10217
|
-
|
10218
|
-
|
10219
|
-
|
10360
|
+
{
|
10361
|
+
if (argv[0] == Qnil) {
|
10362
|
+
arg2 = NULL;
|
10363
|
+
}
|
10364
|
+
else {
|
10365
|
+
int count, i;
|
10366
|
+
rb_check_type(argv[0], T_ARRAY);
|
10367
|
+
count = RARRAY_LEN(argv[0]);
|
10368
|
+
arg2 = (char **)calloc(count + 1, sizeof(char **)); /* incl. trailing NULL */
|
10369
|
+
if (arg2 == NULL) {
|
10370
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
10371
|
+
}
|
10372
|
+
for (i = 0; i < count; i++) {
|
10373
|
+
arg2[i] = (char *)target_charptr(rb_ary_entry(argv[0], i));
|
10374
|
+
if (arg2[i] == NULL) {
|
10375
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
10376
|
+
}
|
10377
|
+
}
|
10378
|
+
arg2[i] = NULL;
|
10379
|
+
}
|
10220
10380
|
}
|
10221
|
-
arg2 = (char **)(argp2);
|
10222
10381
|
{
|
10223
10382
|
_clr_raised();
|
10224
10383
|
_CMPIInstance_set_property_filter(arg1,(char const **)arg2);
|
@@ -10233,8 +10392,16 @@ _wrap_CMPIInstance_set_property_filter(int argc, VALUE *argv, VALUE self) {
|
|
10233
10392
|
SWIG_fail;
|
10234
10393
|
}
|
10235
10394
|
}
|
10395
|
+
{
|
10396
|
+
if (arg2)
|
10397
|
+
free(arg2);
|
10398
|
+
}
|
10236
10399
|
return Qnil;
|
10237
10400
|
fail:
|
10401
|
+
{
|
10402
|
+
if (arg2)
|
10403
|
+
free(arg2);
|
10404
|
+
}
|
10238
10405
|
return Qnil;
|
10239
10406
|
}
|
10240
10407
|
|
@@ -10580,8 +10747,117 @@ fail:
|
|
10580
10747
|
*/
|
10581
10748
|
static swig_class SwigClassCMPISelectExp;
|
10582
10749
|
|
10750
|
+
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
10751
|
+
SWIGINTERN VALUE
|
10752
|
+
_wrap_CMPISelectExp_allocate(VALUE self) {
|
10753
|
+
#else
|
10754
|
+
SWIGINTERN VALUE
|
10755
|
+
_wrap_CMPISelectExp_allocate(int argc, VALUE *argv, VALUE self) {
|
10756
|
+
#endif
|
10757
|
+
|
10758
|
+
|
10759
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p__CMPISelectExp);
|
10760
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
10761
|
+
rb_obj_call_init(vresult, argc, argv);
|
10762
|
+
#endif
|
10763
|
+
return vresult;
|
10764
|
+
}
|
10765
|
+
|
10766
|
+
|
10767
|
+
|
10768
|
+
/*
|
10769
|
+
Document-method: Cmpi::CMPISelectExp.new
|
10770
|
+
|
10771
|
+
call-seq:
|
10772
|
+
CMPISelectExp.new(char const * query, char const * language, char ** keys=nil)
|
10773
|
+
|
10774
|
+
Class constructor.
|
10775
|
+
|
10776
|
+
*/
|
10777
|
+
SWIGINTERN VALUE
|
10778
|
+
_wrap_new_CMPISelectExp(int argc, VALUE *argv, VALUE self) {
|
10779
|
+
char *arg1 = (char *) 0 ;
|
10780
|
+
char *arg2 = (char *) 0 ;
|
10781
|
+
char **arg3 = (char **) NULL ;
|
10782
|
+
int res1 ;
|
10783
|
+
char *buf1 = 0 ;
|
10784
|
+
int alloc1 = 0 ;
|
10785
|
+
int res2 ;
|
10786
|
+
char *buf2 = 0 ;
|
10787
|
+
int alloc2 = 0 ;
|
10788
|
+
struct _CMPISelectExp *result = 0 ;
|
10789
|
+
|
10790
|
+
if ((argc < 2) || (argc > 3)) {
|
10791
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
10792
|
+
}
|
10793
|
+
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
|
10794
|
+
if (!SWIG_IsOK(res1)) {
|
10795
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","_CMPISelectExp", 1, argv[0] ));
|
10796
|
+
}
|
10797
|
+
arg1 = (char *)(buf1);
|
10798
|
+
res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
|
10799
|
+
if (!SWIG_IsOK(res2)) {
|
10800
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","_CMPISelectExp", 2, argv[1] ));
|
10801
|
+
}
|
10802
|
+
arg2 = (char *)(buf2);
|
10803
|
+
if (argc > 2) {
|
10804
|
+
{
|
10805
|
+
if (argv[2] == Qnil) {
|
10806
|
+
arg3 = NULL;
|
10807
|
+
}
|
10808
|
+
else {
|
10809
|
+
int count, i;
|
10810
|
+
rb_check_type(argv[2], T_ARRAY);
|
10811
|
+
count = RARRAY_LEN(argv[2]);
|
10812
|
+
arg3 = (char **)calloc(count + 1, sizeof(char **)); /* incl. trailing NULL */
|
10813
|
+
if (arg3 == NULL) {
|
10814
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
10815
|
+
}
|
10816
|
+
for (i = 0; i < count; i++) {
|
10817
|
+
arg3[i] = (char *)target_charptr(rb_ary_entry(argv[2], i));
|
10818
|
+
if (arg3[i] == NULL) {
|
10819
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
10820
|
+
}
|
10821
|
+
}
|
10822
|
+
arg3[i] = NULL;
|
10823
|
+
}
|
10824
|
+
}
|
10825
|
+
}
|
10826
|
+
{
|
10827
|
+
_clr_raised();
|
10828
|
+
result = (struct _CMPISelectExp *)new__CMPISelectExp((char const *)arg1,(char const *)arg2,arg3);
|
10829
|
+
DATA_PTR(self) = result;
|
10830
|
+
if (_get_raised())
|
10831
|
+
{
|
10832
|
+
_clr_raised();
|
10833
|
+
|
10834
|
+
|
10835
|
+
|
10836
|
+
|
10837
|
+
|
10838
|
+
SWIG_fail;
|
10839
|
+
}
|
10840
|
+
}
|
10841
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
10842
|
+
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
10843
|
+
{
|
10844
|
+
if (arg3)
|
10845
|
+
free(arg3);
|
10846
|
+
}
|
10847
|
+
return self;
|
10848
|
+
fail:
|
10849
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
10850
|
+
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
10851
|
+
{
|
10852
|
+
if (arg3)
|
10853
|
+
free(arg3);
|
10854
|
+
}
|
10855
|
+
return Qnil;
|
10856
|
+
}
|
10857
|
+
|
10858
|
+
|
10583
10859
|
SWIGINTERN void delete__CMPISelectExp(struct _CMPISelectExp *self){
|
10584
|
-
|
10860
|
+
release_select_filter_exp((select_filter_exp *)self);
|
10585
10861
|
}
|
10586
10862
|
SWIGINTERN void
|
10587
10863
|
free__CMPISelectExp(struct _CMPISelectExp *arg1) {
|
@@ -10589,6 +10865,125 @@ free__CMPISelectExp(struct _CMPISelectExp *arg1) {
|
|
10589
10865
|
}
|
10590
10866
|
|
10591
10867
|
|
10868
|
+
/*
|
10869
|
+
Document-method: Cmpi::CMPISelectExp.match
|
10870
|
+
|
10871
|
+
call-seq:
|
10872
|
+
match(CMPIInstance instance) -> int
|
10873
|
+
|
10874
|
+
An instance method.
|
10875
|
+
|
10876
|
+
*/
|
10877
|
+
SWIGINTERN VALUE
|
10878
|
+
_wrap_CMPISelectExp_match(int argc, VALUE *argv, VALUE self) {
|
10879
|
+
struct _CMPISelectExp *arg1 = (struct _CMPISelectExp *) 0 ;
|
10880
|
+
CMPIInstance *arg2 = (CMPIInstance *) 0 ;
|
10881
|
+
void *argp1 = 0 ;
|
10882
|
+
int res1 = 0 ;
|
10883
|
+
void *argp2 = 0 ;
|
10884
|
+
int res2 = 0 ;
|
10885
|
+
int result;
|
10886
|
+
VALUE vresult = Qnil;
|
10887
|
+
|
10888
|
+
if ((argc < 1) || (argc > 1)) {
|
10889
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10890
|
+
}
|
10891
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CMPISelectExp, 0 | 0 );
|
10892
|
+
if (!SWIG_IsOK(res1)) {
|
10893
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _CMPISelectExp *","match", 1, self ));
|
10894
|
+
}
|
10895
|
+
arg1 = (struct _CMPISelectExp *)(argp1);
|
10896
|
+
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p__CMPIInstance, 0 | 0 );
|
10897
|
+
if (!SWIG_IsOK(res2)) {
|
10898
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CMPIInstance *","match", 2, argv[0] ));
|
10899
|
+
}
|
10900
|
+
arg2 = (CMPIInstance *)(argp2);
|
10901
|
+
{
|
10902
|
+
_clr_raised();
|
10903
|
+
result = (int)_CMPISelectExp_match(arg1,arg2);
|
10904
|
+
if (_get_raised())
|
10905
|
+
{
|
10906
|
+
_clr_raised();
|
10907
|
+
|
10908
|
+
|
10909
|
+
|
10910
|
+
|
10911
|
+
|
10912
|
+
SWIG_fail;
|
10913
|
+
}
|
10914
|
+
}
|
10915
|
+
vresult = (result != 0) ? Qtrue : Qfalse;
|
10916
|
+
return vresult;
|
10917
|
+
fail:
|
10918
|
+
return Qnil;
|
10919
|
+
}
|
10920
|
+
|
10921
|
+
|
10922
|
+
|
10923
|
+
/*
|
10924
|
+
Document-method: Cmpi::CMPISelectExp.filter
|
10925
|
+
|
10926
|
+
call-seq:
|
10927
|
+
filter -> char **
|
10928
|
+
|
10929
|
+
An instance method.
|
10930
|
+
|
10931
|
+
*/
|
10932
|
+
SWIGINTERN VALUE
|
10933
|
+
_wrap_CMPISelectExp_filter(int argc, VALUE *argv, VALUE self) {
|
10934
|
+
struct _CMPISelectExp *arg1 = (struct _CMPISelectExp *) 0 ;
|
10935
|
+
void *argp1 = 0 ;
|
10936
|
+
int res1 = 0 ;
|
10937
|
+
char **result = 0 ;
|
10938
|
+
VALUE vresult = Qnil;
|
10939
|
+
|
10940
|
+
if ((argc < 0) || (argc > 0)) {
|
10941
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
10942
|
+
}
|
10943
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CMPISelectExp, 0 | 0 );
|
10944
|
+
if (!SWIG_IsOK(res1)) {
|
10945
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _CMPISelectExp *","filter", 1, self ));
|
10946
|
+
}
|
10947
|
+
arg1 = (struct _CMPISelectExp *)(argp1);
|
10948
|
+
{
|
10949
|
+
_clr_raised();
|
10950
|
+
result = (char **)_CMPISelectExp_filter(arg1);
|
10951
|
+
if (_get_raised())
|
10952
|
+
{
|
10953
|
+
_clr_raised();
|
10954
|
+
|
10955
|
+
|
10956
|
+
|
10957
|
+
|
10958
|
+
|
10959
|
+
SWIG_fail;
|
10960
|
+
}
|
10961
|
+
}
|
10962
|
+
{
|
10963
|
+
if (result == NULL) {
|
10964
|
+
vresult = Qnil;
|
10965
|
+
}
|
10966
|
+
else {
|
10967
|
+
size_t count = string_array_size(result);
|
10968
|
+
if (count == 0) {
|
10969
|
+
vresult = rb_ary_new();
|
10970
|
+
}
|
10971
|
+
else {
|
10972
|
+
int i;
|
10973
|
+
vresult = rb_ary_new2(count);
|
10974
|
+
for (i = 0; i < count; i++) {
|
10975
|
+
rb_ary_store(vresult, i, rb_str_new2(result[i]));
|
10976
|
+
}
|
10977
|
+
}
|
10978
|
+
}
|
10979
|
+
}
|
10980
|
+
return vresult;
|
10981
|
+
fail:
|
10982
|
+
return Qnil;
|
10983
|
+
}
|
10984
|
+
|
10985
|
+
|
10986
|
+
|
10592
10987
|
/*
|
10593
10988
|
Document-method: Cmpi::CMPISelectExp.to_s
|
10594
10989
|
|
@@ -12486,8 +12881,6 @@ _wrap_CMPIBroker_enumInstances(int argc, VALUE *argv, VALUE self) {
|
|
12486
12881
|
int res2 = 0 ;
|
12487
12882
|
void *argp3 = 0 ;
|
12488
12883
|
int res3 = 0 ;
|
12489
|
-
void *argp4 = 0 ;
|
12490
|
-
int res4 = 0 ;
|
12491
12884
|
CMPIEnumeration *result = 0 ;
|
12492
12885
|
VALUE vresult = Qnil;
|
12493
12886
|
|
@@ -12509,11 +12902,27 @@ _wrap_CMPIBroker_enumInstances(int argc, VALUE *argv, VALUE self) {
|
|
12509
12902
|
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "CMPIObjectPath const *","enumInstances", 3, argv[1] ));
|
12510
12903
|
}
|
12511
12904
|
arg3 = (CMPIObjectPath *)(argp3);
|
12512
|
-
|
12513
|
-
|
12514
|
-
|
12905
|
+
{
|
12906
|
+
if (argv[2] == Qnil) {
|
12907
|
+
arg4 = NULL;
|
12908
|
+
}
|
12909
|
+
else {
|
12910
|
+
int count, i;
|
12911
|
+
rb_check_type(argv[2], T_ARRAY);
|
12912
|
+
count = RARRAY_LEN(argv[2]);
|
12913
|
+
arg4 = (char **)calloc(count + 1, sizeof(char **)); /* incl. trailing NULL */
|
12914
|
+
if (arg4 == NULL) {
|
12915
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
12916
|
+
}
|
12917
|
+
for (i = 0; i < count; i++) {
|
12918
|
+
arg4[i] = (char *)target_charptr(rb_ary_entry(argv[2], i));
|
12919
|
+
if (arg4[i] == NULL) {
|
12920
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
12921
|
+
}
|
12922
|
+
}
|
12923
|
+
arg4[i] = NULL;
|
12924
|
+
}
|
12515
12925
|
}
|
12516
|
-
arg4 = (char **)(argp4);
|
12517
12926
|
{
|
12518
12927
|
_clr_raised();
|
12519
12928
|
result = (CMPIEnumeration *)_CMPIBroker_enumInstances(arg1,(struct _CMPIContext const *)arg2,(struct _CMPIObjectPath const *)arg3,(char const **)arg4);
|
@@ -12529,8 +12938,16 @@ _wrap_CMPIBroker_enumInstances(int argc, VALUE *argv, VALUE self) {
|
|
12529
12938
|
}
|
12530
12939
|
}
|
12531
12940
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__CMPIEnumeration, 0 | 0 );
|
12941
|
+
{
|
12942
|
+
if (arg4)
|
12943
|
+
free(arg4);
|
12944
|
+
}
|
12532
12945
|
return vresult;
|
12533
12946
|
fail:
|
12947
|
+
{
|
12948
|
+
if (arg4)
|
12949
|
+
free(arg4);
|
12950
|
+
}
|
12534
12951
|
return Qnil;
|
12535
12952
|
}
|
12536
12953
|
|
@@ -12557,8 +12974,6 @@ _wrap_CMPIBroker_getInstance(int argc, VALUE *argv, VALUE self) {
|
|
12557
12974
|
int res2 = 0 ;
|
12558
12975
|
void *argp3 = 0 ;
|
12559
12976
|
int res3 = 0 ;
|
12560
|
-
void *argp4 = 0 ;
|
12561
|
-
int res4 = 0 ;
|
12562
12977
|
CMPIInstance *result = 0 ;
|
12563
12978
|
VALUE vresult = Qnil;
|
12564
12979
|
|
@@ -12580,11 +12995,27 @@ _wrap_CMPIBroker_getInstance(int argc, VALUE *argv, VALUE self) {
|
|
12580
12995
|
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "CMPIObjectPath const *","getInstance", 3, argv[1] ));
|
12581
12996
|
}
|
12582
12997
|
arg3 = (CMPIObjectPath *)(argp3);
|
12583
|
-
|
12584
|
-
|
12585
|
-
|
12998
|
+
{
|
12999
|
+
if (argv[2] == Qnil) {
|
13000
|
+
arg4 = NULL;
|
13001
|
+
}
|
13002
|
+
else {
|
13003
|
+
int count, i;
|
13004
|
+
rb_check_type(argv[2], T_ARRAY);
|
13005
|
+
count = RARRAY_LEN(argv[2]);
|
13006
|
+
arg4 = (char **)calloc(count + 1, sizeof(char **)); /* incl. trailing NULL */
|
13007
|
+
if (arg4 == NULL) {
|
13008
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
13009
|
+
}
|
13010
|
+
for (i = 0; i < count; i++) {
|
13011
|
+
arg4[i] = (char *)target_charptr(rb_ary_entry(argv[2], i));
|
13012
|
+
if (arg4[i] == NULL) {
|
13013
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
13014
|
+
}
|
13015
|
+
}
|
13016
|
+
arg4[i] = NULL;
|
13017
|
+
}
|
12586
13018
|
}
|
12587
|
-
arg4 = (char **)(argp4);
|
12588
13019
|
{
|
12589
13020
|
_clr_raised();
|
12590
13021
|
result = (CMPIInstance *)_CMPIBroker_getInstance(arg1,(struct _CMPIContext const *)arg2,(struct _CMPIObjectPath const *)arg3,(char const **)arg4);
|
@@ -12600,8 +13031,16 @@ _wrap_CMPIBroker_getInstance(int argc, VALUE *argv, VALUE self) {
|
|
12600
13031
|
}
|
12601
13032
|
}
|
12602
13033
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__CMPIInstance, 0 | 0 );
|
13034
|
+
{
|
13035
|
+
if (arg4)
|
13036
|
+
free(arg4);
|
13037
|
+
}
|
12603
13038
|
return vresult;
|
12604
13039
|
fail:
|
13040
|
+
{
|
13041
|
+
if (arg4)
|
13042
|
+
free(arg4);
|
13043
|
+
}
|
12605
13044
|
return Qnil;
|
12606
13045
|
}
|
12607
13046
|
|
@@ -12702,8 +13141,6 @@ _wrap_CMPIBroker_modifyInstance(int argc, VALUE *argv, VALUE self) {
|
|
12702
13141
|
int res3 = 0 ;
|
12703
13142
|
void *argp4 = 0 ;
|
12704
13143
|
int res4 = 0 ;
|
12705
|
-
void *argp5 = 0 ;
|
12706
|
-
int res5 = 0 ;
|
12707
13144
|
|
12708
13145
|
if ((argc < 4) || (argc > 4)) {
|
12709
13146
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
@@ -12728,11 +13165,27 @@ _wrap_CMPIBroker_modifyInstance(int argc, VALUE *argv, VALUE self) {
|
|
12728
13165
|
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "CMPIInstance const *","modifyInstance", 4, argv[2] ));
|
12729
13166
|
}
|
12730
13167
|
arg4 = (CMPIInstance *)(argp4);
|
12731
|
-
|
12732
|
-
|
12733
|
-
|
13168
|
+
{
|
13169
|
+
if (argv[3] == Qnil) {
|
13170
|
+
arg5 = NULL;
|
13171
|
+
}
|
13172
|
+
else {
|
13173
|
+
int count, i;
|
13174
|
+
rb_check_type(argv[3], T_ARRAY);
|
13175
|
+
count = RARRAY_LEN(argv[3]);
|
13176
|
+
arg5 = (char **)calloc(count + 1, sizeof(char **)); /* incl. trailing NULL */
|
13177
|
+
if (arg5 == NULL) {
|
13178
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
13179
|
+
}
|
13180
|
+
for (i = 0; i < count; i++) {
|
13181
|
+
arg5[i] = (char *)target_charptr(rb_ary_entry(argv[3], i));
|
13182
|
+
if (arg5[i] == NULL) {
|
13183
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
13184
|
+
}
|
13185
|
+
}
|
13186
|
+
arg5[i] = NULL;
|
13187
|
+
}
|
12734
13188
|
}
|
12735
|
-
arg5 = (char **)(argp5);
|
12736
13189
|
{
|
12737
13190
|
_clr_raised();
|
12738
13191
|
_CMPIBroker_modifyInstance(arg1,(struct _CMPIContext const *)arg2,(struct _CMPIObjectPath const *)arg3,(struct _CMPIInstance const *)arg4,(char const **)arg5);
|
@@ -12747,8 +13200,16 @@ _wrap_CMPIBroker_modifyInstance(int argc, VALUE *argv, VALUE self) {
|
|
12747
13200
|
SWIG_fail;
|
12748
13201
|
}
|
12749
13202
|
}
|
13203
|
+
{
|
13204
|
+
if (arg5)
|
13205
|
+
free(arg5);
|
13206
|
+
}
|
12750
13207
|
return Qnil;
|
12751
13208
|
fail:
|
13209
|
+
{
|
13210
|
+
if (arg5)
|
13211
|
+
free(arg5);
|
13212
|
+
}
|
12752
13213
|
return Qnil;
|
12753
13214
|
}
|
12754
13215
|
|
@@ -12937,8 +13398,6 @@ _wrap_CMPIBroker_associators(int argc, VALUE *argv, VALUE self) {
|
|
12937
13398
|
int res7 ;
|
12938
13399
|
char *buf7 = 0 ;
|
12939
13400
|
int alloc7 = 0 ;
|
12940
|
-
void *argp8 = 0 ;
|
12941
|
-
int res8 = 0 ;
|
12942
13401
|
CMPIEnumeration *result = 0 ;
|
12943
13402
|
VALUE vresult = Qnil;
|
12944
13403
|
|
@@ -12980,11 +13439,27 @@ _wrap_CMPIBroker_associators(int argc, VALUE *argv, VALUE self) {
|
|
12980
13439
|
SWIG_exception_fail(SWIG_ArgError(res7), Ruby_Format_TypeError( "", "char const *","associators", 7, argv[5] ));
|
12981
13440
|
}
|
12982
13441
|
arg7 = (char *)(buf7);
|
12983
|
-
|
12984
|
-
|
12985
|
-
|
13442
|
+
{
|
13443
|
+
if (argv[6] == Qnil) {
|
13444
|
+
arg8 = NULL;
|
13445
|
+
}
|
13446
|
+
else {
|
13447
|
+
int count, i;
|
13448
|
+
rb_check_type(argv[6], T_ARRAY);
|
13449
|
+
count = RARRAY_LEN(argv[6]);
|
13450
|
+
arg8 = (char **)calloc(count + 1, sizeof(char **)); /* incl. trailing NULL */
|
13451
|
+
if (arg8 == NULL) {
|
13452
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
13453
|
+
}
|
13454
|
+
for (i = 0; i < count; i++) {
|
13455
|
+
arg8[i] = (char *)target_charptr(rb_ary_entry(argv[6], i));
|
13456
|
+
if (arg8[i] == NULL) {
|
13457
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
13458
|
+
}
|
13459
|
+
}
|
13460
|
+
arg8[i] = NULL;
|
13461
|
+
}
|
12986
13462
|
}
|
12987
|
-
arg8 = (char **)(argp8);
|
12988
13463
|
{
|
12989
13464
|
_clr_raised();
|
12990
13465
|
result = (CMPIEnumeration *)_CMPIBroker_associators(arg1,(struct _CMPIContext const *)arg2,(struct _CMPIObjectPath const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const **)arg8);
|
@@ -13004,12 +13479,20 @@ _wrap_CMPIBroker_associators(int argc, VALUE *argv, VALUE self) {
|
|
13004
13479
|
if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
|
13005
13480
|
if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
|
13006
13481
|
if (alloc7 == SWIG_NEWOBJ) free((char*)buf7);
|
13482
|
+
{
|
13483
|
+
if (arg8)
|
13484
|
+
free(arg8);
|
13485
|
+
}
|
13007
13486
|
return vresult;
|
13008
13487
|
fail:
|
13009
13488
|
if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
|
13010
13489
|
if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
|
13011
13490
|
if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
|
13012
13491
|
if (alloc7 == SWIG_NEWOBJ) free((char*)buf7);
|
13492
|
+
{
|
13493
|
+
if (arg8)
|
13494
|
+
free(arg8);
|
13495
|
+
}
|
13013
13496
|
return Qnil;
|
13014
13497
|
}
|
13015
13498
|
|
@@ -13153,8 +13636,6 @@ _wrap_CMPIBroker_references(int argc, VALUE *argv, VALUE self) {
|
|
13153
13636
|
int res5 ;
|
13154
13637
|
char *buf5 = 0 ;
|
13155
13638
|
int alloc5 = 0 ;
|
13156
|
-
void *argp6 = 0 ;
|
13157
|
-
int res6 = 0 ;
|
13158
13639
|
CMPIEnumeration *result = 0 ;
|
13159
13640
|
VALUE vresult = Qnil;
|
13160
13641
|
|
@@ -13186,11 +13667,27 @@ _wrap_CMPIBroker_references(int argc, VALUE *argv, VALUE self) {
|
|
13186
13667
|
SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "char const *","references", 5, argv[3] ));
|
13187
13668
|
}
|
13188
13669
|
arg5 = (char *)(buf5);
|
13189
|
-
|
13190
|
-
|
13191
|
-
|
13670
|
+
{
|
13671
|
+
if (argv[4] == Qnil) {
|
13672
|
+
arg6 = NULL;
|
13673
|
+
}
|
13674
|
+
else {
|
13675
|
+
int count, i;
|
13676
|
+
rb_check_type(argv[4], T_ARRAY);
|
13677
|
+
count = RARRAY_LEN(argv[4]);
|
13678
|
+
arg6 = (char **)calloc(count + 1, sizeof(char **)); /* incl. trailing NULL */
|
13679
|
+
if (arg6 == NULL) {
|
13680
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
13681
|
+
}
|
13682
|
+
for (i = 0; i < count; i++) {
|
13683
|
+
arg6[i] = (char *)target_charptr(rb_ary_entry(argv[4], i));
|
13684
|
+
if (arg6[i] == NULL) {
|
13685
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
13686
|
+
}
|
13687
|
+
}
|
13688
|
+
arg6[i] = NULL;
|
13689
|
+
}
|
13192
13690
|
}
|
13193
|
-
arg6 = (char **)(argp6);
|
13194
13691
|
{
|
13195
13692
|
_clr_raised();
|
13196
13693
|
result = (CMPIEnumeration *)_CMPIBroker_references(arg1,(struct _CMPIContext const *)arg2,(struct _CMPIObjectPath const *)arg3,(char const *)arg4,(char const *)arg5,(char const **)arg6);
|
@@ -13208,10 +13705,18 @@ _wrap_CMPIBroker_references(int argc, VALUE *argv, VALUE self) {
|
|
13208
13705
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__CMPIEnumeration, 0 | 0 );
|
13209
13706
|
if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
|
13210
13707
|
if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
|
13708
|
+
{
|
13709
|
+
if (arg6)
|
13710
|
+
free(arg6);
|
13711
|
+
}
|
13211
13712
|
return vresult;
|
13212
13713
|
fail:
|
13213
13714
|
if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
|
13214
13715
|
if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
|
13716
|
+
{
|
13717
|
+
if (arg6)
|
13718
|
+
free(arg6);
|
13719
|
+
}
|
13215
13720
|
return Qnil;
|
13216
13721
|
}
|
13217
13722
|
|
@@ -14033,7 +14538,7 @@ fail:
|
|
14033
14538
|
Document-method: Cmpi::CMPIBroker.new_select_exp
|
14034
14539
|
|
14035
14540
|
call-seq:
|
14036
|
-
new_select_exp(char const * query, char const * lang,
|
14541
|
+
new_select_exp(char const * query, char const * lang, char ** projection) -> CMPISelectExp
|
14037
14542
|
|
14038
14543
|
An instance method.
|
14039
14544
|
|
@@ -14043,7 +14548,7 @@ _wrap_CMPIBroker_new_select_exp(int argc, VALUE *argv, VALUE self) {
|
|
14043
14548
|
struct _CMPIBroker *arg1 = (struct _CMPIBroker *) 0 ;
|
14044
14549
|
char *arg2 = (char *) 0 ;
|
14045
14550
|
char *arg3 = (char *) 0 ;
|
14046
|
-
|
14551
|
+
char **arg4 = (char **) 0 ;
|
14047
14552
|
void *argp1 = 0 ;
|
14048
14553
|
int res1 = 0 ;
|
14049
14554
|
int res2 ;
|
@@ -14052,8 +14557,6 @@ _wrap_CMPIBroker_new_select_exp(int argc, VALUE *argv, VALUE self) {
|
|
14052
14557
|
int res3 ;
|
14053
14558
|
char *buf3 = 0 ;
|
14054
14559
|
int alloc3 = 0 ;
|
14055
|
-
void *argp4 = 0 ;
|
14056
|
-
int res4 = 0 ;
|
14057
14560
|
CMPISelectExp *result = 0 ;
|
14058
14561
|
VALUE vresult = Qnil;
|
14059
14562
|
|
@@ -14075,11 +14578,27 @@ _wrap_CMPIBroker_new_select_exp(int argc, VALUE *argv, VALUE self) {
|
|
14075
14578
|
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","new_select_exp", 3, argv[1] ));
|
14076
14579
|
}
|
14077
14580
|
arg3 = (char *)(buf3);
|
14078
|
-
|
14079
|
-
|
14080
|
-
|
14581
|
+
{
|
14582
|
+
if (argv[2] == Qnil) {
|
14583
|
+
arg4 = NULL;
|
14584
|
+
}
|
14585
|
+
else {
|
14586
|
+
int count, i;
|
14587
|
+
rb_check_type(argv[2], T_ARRAY);
|
14588
|
+
count = RARRAY_LEN(argv[2]);
|
14589
|
+
arg4 = (char **)calloc(count + 1, sizeof(char **)); /* incl. trailing NULL */
|
14590
|
+
if (arg4 == NULL) {
|
14591
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
14592
|
+
}
|
14593
|
+
for (i = 0; i < count; i++) {
|
14594
|
+
arg4[i] = (char *)target_charptr(rb_ary_entry(argv[2], i));
|
14595
|
+
if (arg4[i] == NULL) {
|
14596
|
+
SWIG_exception(SWIG_MemoryError, "malloc failed");
|
14597
|
+
}
|
14598
|
+
}
|
14599
|
+
arg4[i] = NULL;
|
14600
|
+
}
|
14081
14601
|
}
|
14082
|
-
arg4 = (CMPIArray **)(argp4);
|
14083
14602
|
{
|
14084
14603
|
_clr_raised();
|
14085
14604
|
result = (CMPISelectExp *)_CMPIBroker_new_select_exp(arg1,(char const *)arg2,(char const *)arg3,arg4);
|
@@ -14097,10 +14616,18 @@ _wrap_CMPIBroker_new_select_exp(int argc, VALUE *argv, VALUE self) {
|
|
14097
14616
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__CMPISelectExp, SWIG_POINTER_OWN | 0 );
|
14098
14617
|
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
14099
14618
|
if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
|
14619
|
+
{
|
14620
|
+
if (arg4)
|
14621
|
+
free(arg4);
|
14622
|
+
}
|
14100
14623
|
return vresult;
|
14101
14624
|
fail:
|
14102
14625
|
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
14103
14626
|
if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
|
14627
|
+
{
|
14628
|
+
if (arg4)
|
14629
|
+
free(arg4);
|
14630
|
+
}
|
14104
14631
|
return Qnil;
|
14105
14632
|
}
|
14106
14633
|
|
@@ -14311,7 +14838,6 @@ static swig_type_info _swigt__p_f_p_q_const__char_p_void___CMPIData = {"_p_f_p_q
|
|
14311
14838
|
static swig_type_info _swigt__p_float = {"_p_float", "float *|CMPIReal32 *", 0, 0, (void*)0, 0};
|
14312
14839
|
static swig_type_info _swigt__p_int = {"_p_int", "int *|CMPISint32 *", 0, 0, (void*)0, 0};
|
14313
14840
|
static swig_type_info _swigt__p_long_long = {"_p_long_long", "CMPISint64 *|long long *", 0, 0, (void*)0, 0};
|
14314
|
-
static swig_type_info _swigt__p_p__CMPIArray = {"_p_p__CMPIArray", "struct _CMPIArray **|CMPIArray **", 0, 0, (void*)0, 0};
|
14315
14841
|
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
|
14316
14842
|
static swig_type_info _swigt__p_p_void = {"_p_p_void", "CMPIMsgFileHandle *|void **", 0, 0, (void*)0, 0};
|
14317
14843
|
static swig_type_info _swigt__p_short = {"_p_short", "CMPISint16 *|short *", 0, 0, (void*)0, 0};
|
@@ -14378,7 +14904,6 @@ static swig_type_info *swig_type_initial[] = {
|
|
14378
14904
|
&_swigt__p_float,
|
14379
14905
|
&_swigt__p_int,
|
14380
14906
|
&_swigt__p_long_long,
|
14381
|
-
&_swigt__p_p__CMPIArray,
|
14382
14907
|
&_swigt__p_p_char,
|
14383
14908
|
&_swigt__p_p_void,
|
14384
14909
|
&_swigt__p_short,
|
@@ -14445,7 +14970,6 @@ static swig_cast_info _swigc__p_f_p_q_const__char_p_void___CMPIData[] = { {&_sw
|
|
14445
14970
|
static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
|
14446
14971
|
static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
|
14447
14972
|
static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
|
14448
|
-
static swig_cast_info _swigc__p_p__CMPIArray[] = { {&_swigt__p_p__CMPIArray, 0, 0, 0},{0, 0, 0, 0}};
|
14449
14973
|
static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
|
14450
14974
|
static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
|
14451
14975
|
static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -14512,7 +15036,6 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
14512
15036
|
_swigc__p_float,
|
14513
15037
|
_swigc__p_int,
|
14514
15038
|
_swigc__p_long_long,
|
14515
|
-
_swigc__p_p__CMPIArray,
|
14516
15039
|
_swigc__p_p_char,
|
14517
15040
|
_swigc__p_p_void,
|
14518
15041
|
_swigc__p_short,
|
@@ -15318,7 +15841,10 @@ SWIGEXPORT void Init_cmpi(void) {
|
|
15318
15841
|
|
15319
15842
|
SwigClassCMPISelectExp.klass = rb_define_class_under(mCmpi, "CMPISelectExp", rb_cObject);
|
15320
15843
|
SWIG_TypeClientData(SWIGTYPE_p__CMPISelectExp, (void *) &SwigClassCMPISelectExp);
|
15321
|
-
|
15844
|
+
rb_define_alloc_func(SwigClassCMPISelectExp.klass, _wrap_CMPISelectExp_allocate);
|
15845
|
+
rb_define_method(SwigClassCMPISelectExp.klass, "initialize", _wrap_new_CMPISelectExp, -1);
|
15846
|
+
rb_define_method(SwigClassCMPISelectExp.klass, "match", _wrap_CMPISelectExp_match, -1);
|
15847
|
+
rb_define_method(SwigClassCMPISelectExp.klass, "filter", _wrap_CMPISelectExp_filter, -1);
|
15322
15848
|
rb_define_method(SwigClassCMPISelectExp.klass, "to_s", _wrap_CMPISelectExp_to_s, -1);
|
15323
15849
|
SwigClassCMPISelectExp.mark = 0;
|
15324
15850
|
SwigClassCMPISelectExp.destroy = (void (*)(void *)) free__CMPISelectExp;
|