📄 hwapi.cpp
字号:
} return(in);}static HW_API_parents_In *make_HW_API_parents_In(zval *arg1) { int count, i; HashTable *lht; HW_API_parents_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_parents_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "objectIdentifier")) in->setObjectIdentifier((*keydata)->value.str.val); else if(!strcmp(key, "objectQuery")) in->setObjectQuery((*keydata)->value.str.val); break; case IS_ARRAY: { HW_API_StringArray *sarr; if(!strcmp(key, "attributeSelector")) { sarr = make_HW_API_StringArray((*keydata)->value.ht); in->setAttributeSelector(*sarr); /* FIXME: sarr can be propperly by freed now */ } break; } } zend_hash_move_forward(lht); } return(in);}static HW_API_find_In *make_HW_API_find_In(zval *arg1) { int count, i; HashTable *lht; HW_API_find_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_find_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "keyQuery")) in->setKeyQuery((*keydata)->value.str.val); else if(!strcmp(key, "objectQuery")) in->setObjectQuery((*keydata)->value.str.val); else if(!strcmp(key, "fullTextQuery")) in->setFullTextQuery((*keydata)->value.str.val); break; case IS_LONG: if(!strcmp(key, "startIndex")) in->setStartIndex((*keydata)->value.lval); else if(!strcmp(key, "numberOfObjectsToGet")) in->setNumberOfObjectsToGet((*keydata)->value.lval); else if(!strcmp(key, "exactMatchLimit")) in->setExactMatchLimit((*keydata)->value.lval); break; case IS_ARRAY: { HW_API_StringArray *sarr; if(!strcmp(key, "attributeSelector")) { sarr = make_HW_API_StringArray((*keydata)->value.ht); in->setAttributeSelector(*sarr); /* FIXME: sarr can be propperly by freed now */ } else if(!strcmp(key, "languages")) { sarr = make_HW_API_StringArray((*keydata)->value.ht); in->setLanguages(*sarr); /* FIXME: sarr can be propperly by freed now */ } else if(!strcmp(key, "scope")) { sarr = make_HW_API_StringArray((*keydata)->value.ht); in->setScope(*sarr); /* FIXME: sarr can be propperly by freed now */ } break; } } zend_hash_move_forward(lht); } return(in);}static HW_API_identify_In *make_HW_API_identify_In(zval *arg1) { int count, i; HashTable *lht; HW_API_identify_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_identify_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "username")) in->setUsername((*keydata)->value.str.val); else if(!strcmp(key, "password")) in->setPassword((*keydata)->value.str.val); break; } zend_hash_move_forward(lht); } return(in);}static HW_API_remove_In *make_HW_API_remove_In(zval *arg1) { int count, i; HashTable *lht; HW_API_remove_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_remove_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "parentIdentifier")) in->setParentIdentifier((*keydata)->value.str.val); else if(!strcmp(key, "objectIdentifier")) in->setObjectIdentifier((*keydata)->value.str.val); else if(!strcmp(key, "objectQuery")) in->setObjectQuery((*keydata)->value.str.val); break; case IS_LONG: if(!strcmp(key, "mode")) in->setMode((*keydata)->value.lval); break; } zend_hash_move_forward(lht); } return(in);}static HW_API_content_In *make_HW_API_content_In(zval *arg1) { int count, i; HashTable *lht; HW_API_content_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_content_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "objectIdentifier")) in->setObjectIdentifier((*keydata)->value.str.val); break; case IS_LONG: if(!strcmp(key, "mode")) in->setMode((*keydata)->value.lval); break; } zend_hash_move_forward(lht); } return(in);}static HW_API_copy_In *make_HW_API_copy_In(zval *arg1) { int count, i; HashTable *lht; HW_API_copy_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_copy_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "destinationParentIdentifier")) in->setDestinationParentIdentifier((*keydata)->value.str.val); else if(!strcmp(key, "objectIdentifier")) in->setObjectIdentifier((*keydata)->value.str.val); break; case IS_ARRAY: { HW_API_StringArray *sarr; if(!strcmp(key, "attributeSelector")) { sarr = make_HW_API_StringArray((*keydata)->value.ht); in->setAttributeSelector(*sarr); /* FIXME: sarr can be propperly by freed now */ } break; } } zend_hash_move_forward(lht); } return(in);}static HW_API_link_In *make_HW_API_link_In(zval *arg1) { int count, i; HashTable *lht; HW_API_link_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_link_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "destinationParentIdentifier")) in->setDestinationParentIdentifier((*keydata)->value.str.val); else if(!strcmp(key, "objectIdentifier")) in->setObjectIdentifier((*keydata)->value.str.val); break; } zend_hash_move_forward(lht); } return(in);}static HW_API_move_In *make_HW_API_move_In(zval *arg1) { int count, i; HashTable *lht; HW_API_move_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_move_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "destinationParentIdentifier")) in->setDestinationParentIdentifier((*keydata)->value.str.val); else if(!strcmp(key, "sourceParentIdentifier")) in->setSourceParentIdentifier((*keydata)->value.str.val); else if(!strcmp(key, "objectIdentifier")) in->setObjectIdentifier((*keydata)->value.str.val); break; } zend_hash_move_forward(lht); } return(in);}static HW_API_lock_In *make_HW_API_lock_In(zval *arg1) { int count, i; HashTable *lht; HW_API_lock_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_lock_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "objectQuery")) in->setObjectQuery((*keydata)->value.str.val); else if(!strcmp(key, "objectIdentifier")) in->setObjectIdentifier((*keydata)->value.str.val); break; case IS_LONG: if(!strcmp(key, "mode")) in->setMode((*keydata)->value.lval); break; } zend_hash_move_forward(lht); } return(in);}static HW_API_unlock_In *make_HW_API_unlock_In(zval *arg1) { int count, i; HashTable *lht; HW_API_unlock_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_unlock_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "objectQuery")) in->setObjectQuery((*keydata)->value.str.val); else if(!strcmp(key, "objectIdentifier")) in->setObjectIdentifier((*keydata)->value.str.val); break; case IS_LONG: if(!strcmp(key, "mode")) in->setMode((*keydata)->value.lval); break; } zend_hash_move_forward(lht); } return(in);}static HW_API_replace_In *make_HW_API_replace_In(zval *arg1) { int count, i; HashTable *lht; HW_API_replace_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_replace_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_STRING: if(!strcmp(key, "objectIdentifier")) in->setObjectIdentifier((*keydata)->value.str.val); break; case IS_OBJECT: if(!strcmp(key, "object")) { if(!strcmp((*keydata)->value.obj.ce->name, "hw_api_object")) { HW_API_Object *obj; obj = (HW_API_Object *) php_hwapi_get_object(*keydata, le_hwapi_objectp); in->setObject(*obj); } } else if(!strcmp(key, "parameters")) { if(!strcmp((*keydata)->value.obj.ce->name, "hw_api_object")) { HW_API_Object *obj; obj = (HW_API_Object *) php_hwapi_get_object(*keydata, le_hwapi_objectp); in->setParameters(*obj); } } else if(!strcmp(key, "content")) { if(!strcmp((*keydata)->value.obj.ce->name, "hw_api_content")) { HW_API_Content *obj; obj = (HW_API_Content *) php_hwapi_get_object(*keydata, le_hwapi_contentp); in->setContent(*obj); } } /* FIXME: HW_API_Object and HW_API_Content needs to be handelt */ break; case IS_ARRAY: { HW_API_StringArray *sarr; if(!strcmp(key, "attributeSelector")) { sarr = make_HW_API_StringArray((*keydata)->value.ht); in->setAttributeSelector(*sarr); /* FIXME: sarr can be propperly by freed now */ } break; } case IS_LONG: if(!strcmp(key, "mode")) in->setMode((*keydata)->value.lval); break; } zend_hash_move_forward(lht); } return(in);}static HW_API_insert_In *make_HW_API_insert_In(zval *arg1) { int count, i; HashTable *lht; HW_API_insert_In *in; lht = arg1->value.ht; if(0 == (count = zend_hash_num_elements(lht))) { return NULL; } in = new HW_API_insert_In(); zend_hash_internal_pointer_reset(lht); for(i=0; i<count; i++) { ulong ind; char *key; zval **keydata; zend_hash_get_current_data(lht, (void **) &keydata); zend_hash_get_current_key(lht, &key, &ind, 0); switch((*keydata)->type) { case IS_OBJECT: if(!strcmp(key, "object")) { if(!strcmp((*keydata)->value.obj.ce->name, "hw_api_object")) { HW_API_Object *obj;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -