| 157 |
ZEND_FUNCTION(xnp_update_item_status ); |
ZEND_FUNCTION(xnp_update_item_status ); |
| 158 |
ZEND_FUNCTION(xnp_refresh_item_status ); |
ZEND_FUNCTION(xnp_refresh_item_status ); |
| 159 |
ZEND_FUNCTION(xnp_selective_harvesting ); |
ZEND_FUNCTION(xnp_selective_harvesting ); |
| 160 |
|
ZEND_FUNCTION(xnp_get_item_status ); |
| 161 |
}; |
}; |
| 162 |
|
|
| 163 |
|
|
| 281 |
ZEND_FE(xnp_update_item_status ,NULL) |
ZEND_FE(xnp_update_item_status ,NULL) |
| 282 |
ZEND_FE(xnp_refresh_item_status ,NULL) |
ZEND_FE(xnp_refresh_item_status ,NULL) |
| 283 |
ZEND_FE(xnp_selective_harvesting ,NULL) |
ZEND_FE(xnp_selective_harvesting ,NULL) |
| 284 |
|
ZEND_FE(xnp_get_item_status ,NULL) |
| 285 |
{NULL, NULL, NULL} |
{NULL, NULL, NULL} |
| 286 |
}; |
}; |
| 287 |
|
|
| 3992 |
} |
} |
| 3993 |
|
|
| 3994 |
RETURN_LONG( result ); |
RETURN_LONG( result ); |
| 3995 |
|
} |
| 3996 |
|
|
| 3997 |
|
/** |
| 3998 |
|
* item_statusを得る |
| 3999 |
|
* |
| 4000 |
|
* int xnp_get_item_status( int iid, array status ) |
| 4001 |
|
* @param iid item ID |
| 4002 |
|
* @param status 状態を受け取る連想配列。以下のキーを含む。 created_timestamp, modified_timestamp, deleted_timestamp, is_deleted |
| 4003 |
|
* @return RES_OK |
| 4004 |
|
* @return RES_NO_SUCH_ITEM |
| 4005 |
|
* |
| 4006 |
|
*/ |
| 4007 |
|
ZEND_FUNCTION(xnp_get_item_status) |
| 4008 |
|
{ |
| 4009 |
|
long iid; |
| 4010 |
|
zval *zstatus; |
| 4011 |
|
result_t result = RES_ERROR; |
| 4012 |
|
|
| 4013 |
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "la", |
| 4014 |
|
&iid, &zstatus) == FAILURE) { |
| 4015 |
|
fprintf( stderr, "error occured " ); |
| 4016 |
|
return; |
| 4017 |
|
} |
| 4018 |
|
|
| 4019 |
|
itemstatus_t status; |
| 4020 |
|
result = getMetadataEvent( iid, &status ); |
| 4021 |
|
if ( result == RES_OK ){ |
| 4022 |
|
zend_hash_clean( zstatus -> value.ht ); |
| 4023 |
|
add_assoc_long( zstatus, "created_timestamp" , status.createdTimestamp ); |
| 4024 |
|
add_assoc_long( zstatus, "modified_timestamp" , status.modifiedTimestamp ); |
| 4025 |
|
add_assoc_long( zstatus, "deleted_timestamp" , status.deletedTimestamp ); |
| 4026 |
|
add_assoc_long( zstatus, "is_deleted" , status.isDeleted ); |
| 4027 |
|
} |
| 4028 |
|
|
| 4029 |
|
RETURN_LONG( result ); |
| 4030 |
} |
} |
| 4031 |
|
|
| 4032 |
|
|