Develop and Download Open Source Software

Browse CVS Repository

Diff of /xoonips/AL/xnpal.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.54 by aga4096, Mon Aug 29 02:05:34 2005 UTC revision 1.55 by aga4096, Tue Aug 30 09:39:31 2005 UTC
# Line 157  ZEND_FUNCTION(xnp_get_events_for_rss); Line 157  ZEND_FUNCTION(xnp_get_events_for_rss);
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    
# Line 280  zend_function_entry xnpalmod_functions[] Line 281  zend_function_entry xnpalmod_functions[]
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    
# Line 3990  ZEND_FUNCTION(xnp_selective_harvesting) Line 3992  ZEND_FUNCTION(xnp_selective_harvesting)
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    

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26