- {
- char *string = NULL;
- unsigned length = 0;
- if (dp_db_get_property_string(client->dbhandle, ipc_info->id, DP_TABLE_NOTIFICATION, DP_DB_COL_NOTI_SUBJECT, (unsigned char **)&string, &length, &errorcode) < 0) {
- TRACE_ERROR("failed to get %s", dp_print_property(ipc_info->property));
- errorcode = DP_ERROR_NO_DATA;
- }
- int result = __dp_request_feedback_string(client->channel, ipc_info, string, length, errorcode);
- if (result == DP_ERROR_IO_ERROR) {
- errorcode = DP_ERROR_IO_ERROR;
- TRACE_ERROR("check ipc sock:%d", client->channel);
- }
- free(string);
- break;
- }
- case DP_PROP_NOTIFICATION_DESCRIPTION:
- {
- char *string = NULL;
- unsigned length = 0;
- if (dp_db_get_property_string(client->dbhandle, ipc_info->id, DP_TABLE_NOTIFICATION, DP_DB_COL_NOTI_DESCRIPTION, (unsigned char **)&string, &length, &errorcode) < 0) {
- TRACE_ERROR("failed to get %s", dp_print_property(ipc_info->property));
- errorcode = DP_ERROR_NO_DATA;
- }
- int result = __dp_request_feedback_string(client->channel, ipc_info, string, length, errorcode);
- if (result == DP_ERROR_IO_ERROR) {
- errorcode = DP_ERROR_IO_ERROR;
- TRACE_ERROR("check ipc sock:%d", client->channel);
- }
- free(string);
- break;
- }
- case DP_PROP_NOTIFICATION_RAW: // read type, send raw binary for type
- {
- int bundle_type = -1;
- errorcode = __dp_request_read_int(client->channel, ipc_info, &bundle_type);
- TRACE_DEBUG("read %s type:%d", dp_print_property(ipc_info->property), bundle_type);
- char *raw_column = NULL;
- if (bundle_type == DP_NOTIFICATION_BUNDLE_TYPE_ONGOING)
- raw_column = DP_DB_COL_NOTI_RAW_ONGOING;
- else if (bundle_type == DP_NOTIFICATION_BUNDLE_TYPE_COMPLETE)
- raw_column = DP_DB_COL_NOTI_RAW_COMPLETE;
- else if (bundle_type == DP_NOTIFICATION_BUNDLE_TYPE_FAILED)
- raw_column = DP_DB_COL_NOTI_RAW_FAIL;
-
- if (raw_column == NULL) {
- errorcode = DP_ERROR_INVALID_PARAMETER;
- TRACE_ERROR("invalid type %s type:%d", dp_print_property(ipc_info->property), bundle_type);
- if (dp_ipc_query(client->channel, ipc_info->id, ipc_info->section, ipc_info->property, errorcode, 0) < 0) {
+ {
+ char *string = NULL;
+ unsigned length = 0;
+ if (dp_db_get_property_string(client->dbhandle, ipc_info->id, DP_TABLE_NOTIFICATION, DP_DB_COL_NOTI_SUBJECT, (unsigned char **)&string, &length, &errorcode) < 0) {
+ TRACE_ERROR("failed to get %s", dp_print_property(ipc_info->property));
+ errorcode = DP_ERROR_NO_DATA;
+ }
+ int result = __dp_request_feedback_string(client->channel, ipc_info, string, length, errorcode);
+ if (result == DP_ERROR_IO_ERROR) {