Data Delivery C API Library Reference
1.2
|
Functions | |
int | ddca_admin_register_event_cb (int(*admin_event_cb)(const char *op_id, const ddca_admin_event_t *event)) |
register the event callback function | |
int | ddca_admin_request_download (const char *op_id, const char *url, const char *download_path, const ddca_int32_t timeout) |
request to download the file | |
int | ddca_admin_request_upload (const char *op_id, const char *url, const char *upload_file, const char *method) |
request to upload the file | |
int | ddca_admin_respond (const char *op_id, const ddca_bool_t success) |
send status against the action by the data delivery core | |
int | ddca_admin_request_execute (const char *op_id, const char *command, const char *options) |
int | ddca_admin_emit (const char *op_id, const ddca_event_t *event) |
emit given event data to Data Delivery Core | |
int | ddca_admin_emit_with_data_type (const char *op_id, const ddca_event_t *event) |
emit given event data with data type to Data Delivery Core |
int ddca_admin_emit | ( | const char * | op_id, |
const ddca_event_t * | event | ||
) |
emit given event data to Data Delivery Core
This function emits the given event data to Data Delivery Core. The op_id argument can be NULL if the event argument is not related to the event.
[in] | *op_id | operation id related to the argument event data |
[in] | *event | data to be emitted |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_admin_emit_with_data_type | ( | const char * | op_id, |
const ddca_event_t * | event | ||
) |
emit given event data with data type to Data Delivery Core
This function emits the given event data with data type to Data Delivery Core. The op_id argument can be NULL if the event argument is not related to the event.
[in] | *op_id | operation id related to the argument event data |
[in] | *event | data to be emitted |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_admin_register_event_cb | ( | int(*)(const char *op_id, const ddca_admin_event_t *event) | admin_event_cb | ) |
register the event callback function
This function marks the given function as the event callback function. This event callback function will be called when the new event is notified to this Admin Agent application.
[in] | *admin_event_cb | function pointer to be marked as the event callback function |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_admin_request_download | ( | const char * | op_id, |
const char * | url, | ||
const char * | download_path, | ||
const ddca_int32_t | timeout | ||
) |
request to download the file
This function sends the request to download the uploaded file to the data delivery core. op_id and url parameters will be delivered by the event callback of the file upload notification, and only after it is delivered this API will work successfully. If timeout is 0, wait time for download is default value of data delivery core.
[in] | *op_id | operation id |
[in] | *url | url to the uploaded file |
[in] | *download_path | path which save a download file |
[in] | timeout | time to wait for download (millisecond) |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_admin_request_upload | ( | const char * | op_id, |
const char * | url, | ||
const char * | upload_file, | ||
const char * | method | ||
) |
request to upload the file
This function sends the request to upload the local file to the data delivery core. op_id and url parameters will be delivered by the event callback of the file upload notification, and only after it is delivered this API will work successfully.
[in] | *op_id | operation id |
[in] | *url | url to upload file |
[in] | *upload_file | file which is uploaded |
[in] | *method | method to upload file |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_admin_respond | ( | const char * | op_id, |
const ddca_bool_t | success | ||
) |
send status against the action by the data delivery core
This function reply the result status of the request from the data delivery core. This functoin can be called only once by an operation.
[in] | *op_id | operation id from the data delivery core |
[in] | success | result status to send |
DDCA_SUCCESS | operation success |
others | operation failure |