Lines Matching refs:proxy
52 php_com_saproxy *proxy; member
86 php_com_saproxy *proxy = (php_com_saproxy*) object; in saproxy_read_dimension() local
94 if (V_VT(&proxy->obj->v) == VT_DISPATCH) { in saproxy_read_dimension()
101 args = safe_emalloc(proxy->dimensions + 1, sizeof(zval), 0); in saproxy_read_dimension()
103 for (i = 1; i < (UINT) proxy->dimensions; i++) { in saproxy_read_dimension()
104 args[i-1] = proxy->indices[i]; in saproxy_read_dimension()
108 if (!try_convert_to_string(&proxy->indices[0])) { in saproxy_read_dimension()
114 res = php_com_do_invoke(proxy->obj, Z_STRVAL(proxy->indices[0]), in saproxy_read_dimension()
115 Z_STRLEN(proxy->indices[0]), DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, in saproxy_read_dimension()
116 proxy->dimensions, args, 0); in saproxy_read_dimension()
121 php_com_zval_from_variant(rv, &v, proxy->obj->code_page); in saproxy_read_dimension()
130 } else if (!V_ISARRAY(&proxy->obj->v)) { in saproxy_read_dimension()
140 sa = V_ARRAY(&proxy->obj->v); in saproxy_read_dimension()
143 if ((UINT) proxy->dimensions >= dims) { in saproxy_read_dimension()
150 SafeArrayGetLBound(sa, proxy->dimensions, &lbound); in saproxy_read_dimension()
151 SafeArrayGetUBound(sa, proxy->dimensions, &ubound); in saproxy_read_dimension()
158 if (dims - 1 == proxy->dimensions) { in saproxy_read_dimension()
170 convert_to_long(&proxy->indices[i]); in saproxy_read_dimension()
171 indices[i] = (LONG)Z_LVAL(proxy->indices[i]); in saproxy_read_dimension()
179 vt = V_VT(&proxy->obj->v) & ~VT_ARRAY; in saproxy_read_dimension()
192 php_com_wrap_variant(rv, &v, proxy->obj->code_page); in saproxy_read_dimension()
209 php_com_saproxy *proxy = (php_com_saproxy*) object; in saproxy_write_dimension() local
214 if (V_VT(&proxy->obj->v) == VT_DISPATCH) { in saproxy_write_dimension()
218 zval *args = safe_emalloc(proxy->dimensions + 2, sizeof(zval), 0); in saproxy_write_dimension()
220 for (i = 1; i < (UINT) proxy->dimensions; i++) { in saproxy_write_dimension()
221 ZVAL_COPY_VALUE(&args[i-1], &proxy->indices[i]); in saproxy_write_dimension()
226 if (!try_convert_to_string(&proxy->indices[0])) { in saproxy_write_dimension()
231 if (SUCCESS == php_com_do_invoke(proxy->obj, Z_STRVAL(proxy->indices[0]), in saproxy_write_dimension()
232 Z_STRLEN(proxy->indices[0]), DISPATCH_PROPERTYPUT, &v, proxy->dimensions + 1, in saproxy_write_dimension()
239 } else if (V_ISARRAY(&proxy->obj->v)) { in saproxy_write_dimension()
243 dims = SafeArrayGetDim(V_ARRAY(&proxy->obj->v)); in saproxy_write_dimension()
247 convert_to_long(&proxy->indices[i]); in saproxy_write_dimension()
248 indices[i] = (LONG)Z_LVAL(proxy->indices[i]); in saproxy_write_dimension()
255 if (FAILED(SafeArrayGetVartype(V_ARRAY(&proxy->obj->v), &vt)) || vt == VT_EMPTY) { in saproxy_write_dimension()
256 vt = V_VT(&proxy->obj->v) & ~VT_ARRAY; in saproxy_write_dimension()
260 php_com_variant_from_zval(&v, value, proxy->obj->code_page); in saproxy_write_dimension()
267 res = SafeArrayPutElement(V_ARRAY(&proxy->obj->v), indices, &v); in saproxy_write_dimension()
269 res = SafeArrayPutElement(V_ARRAY(&proxy->obj->v), indices, &v.lVal); in saproxy_write_dimension()
342 php_com_saproxy *proxy = (php_com_saproxy*) object; in saproxy_count_elements() local
345 if (!V_ISARRAY(&proxy->obj->v)) { in saproxy_count_elements()
349 SafeArrayGetLBound(V_ARRAY(&proxy->obj->v), proxy->dimensions, &lbound); in saproxy_count_elements()
350 SafeArrayGetUBound(V_ARRAY(&proxy->obj->v), proxy->dimensions, &ubound); in saproxy_count_elements()
359 php_com_saproxy *proxy = (php_com_saproxy *)object; in saproxy_free_storage() local
368 OBJ_RELEASE(&proxy->obj->zo); in saproxy_free_storage()
372 efree(proxy->indices); in saproxy_free_storage()
377 php_com_saproxy *proxy = (php_com_saproxy *) object; in saproxy_clone() local
381 memcpy(cloneproxy, proxy, sizeof(*cloneproxy)); in saproxy_clone()
385 clone_indices(cloneproxy, proxy, proxy->dimensions); in saproxy_clone()
420 php_com_saproxy *proxy, *rel = NULL; in php_com_saproxy_create() local
422 proxy = ecalloc(1, sizeof(*proxy)); in php_com_saproxy_create()
423 proxy->dimensions = 1; in php_com_saproxy_create()
427 proxy->obj = rel->obj; in php_com_saproxy_create()
428 proxy->dimensions += rel->dimensions; in php_com_saproxy_create()
430 proxy->obj = (php_com_dotnet_object*) com_object; in php_com_saproxy_create()
433 GC_ADDREF(&proxy->obj->zo); in php_com_saproxy_create()
434 proxy->indices = safe_emalloc(proxy->dimensions, sizeof(zval), 0); in php_com_saproxy_create()
437 clone_indices(proxy, rel, rel->dimensions); in php_com_saproxy_create()
440 ZVAL_DUP(&proxy->indices[proxy->dimensions-1], index); in php_com_saproxy_create()
442 zend_object_std_init(&proxy->std, php_com_saproxy_class_entry); in php_com_saproxy_create()
443 proxy->std.handlers = &php_com_saproxy_handlers; in php_com_saproxy_create()
444 ZVAL_OBJ(proxy_out, &proxy->std); in php_com_saproxy_create()
475 I->indices[I->proxy->dimensions-1] = I->key; in saproxy_iter_get_data()
477 sa = V_ARRAY(&I->proxy->obj->v); in saproxy_iter_get_data()
480 vt = V_VT(&I->proxy->obj->v) & ~VT_ARRAY; in saproxy_iter_get_data()
492 php_com_wrap_variant(&I->data, &v, I->proxy->obj->code_page); in saproxy_iter_get_data()
531 php_com_saproxy *proxy = SA_FETCH(object); in php_com_saproxy_iter_get() local
544 I->proxy = proxy; in php_com_saproxy_iter_get()
548 I->indices = safe_emalloc(proxy->dimensions + 1, sizeof(LONG), 0); in php_com_saproxy_iter_get()
549 for (i = 0; i < proxy->dimensions; i++) { in php_com_saproxy_iter_get()
550 convert_to_long(&proxy->indices[i]); in php_com_saproxy_iter_get()
551 I->indices[i] = (LONG)Z_LVAL(proxy->indices[i]); in php_com_saproxy_iter_get()
554 SafeArrayGetLBound(V_ARRAY(&proxy->obj->v), proxy->dimensions, &I->imin); in php_com_saproxy_iter_get()
555 SafeArrayGetUBound(V_ARRAY(&proxy->obj->v), proxy->dimensions, &I->imax); in php_com_saproxy_iter_get()