/* * oma-ds-agent * Copyright (c) 2012 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @SA_Command_Internal.h * @version 0.1 * @brief This file is the header file that structure which is available in SA is defined * Command (Alert, Results, Sync, Put, Get, Map, Add, Replace, Delete) * Status */ #ifndef SA_COMMAND_INTERNAL_H_ #define SA_COMMAND_INTERNAL_H_ #include "service-adapter/sa_define.h" #include "common/common_define.h" typedef struct { alert_type_e type; anchor_s *anchor; char *content_type; unsigned int max_obj_size; } command_alert_private_s; typedef struct { unsigned int num_changed; int max_obj_size; int has_num_changed; mem_s *mem; } command_sync_private_s; typedef struct { char *type; item_s *item; } command_access_private_s; typedef struct { GList *items; change_type_e type; } command_change_private_s; typedef struct { GList *items; } command_map_private_s; typedef struct { unsigned int msg_ref; unsigned int cmd_ref; location_s *target_ref; char *type; item_s *item; } command_results_private_s; typedef union { command_alert_private_s alert; command_sync_private_s sync; command_access_private_s access; /*put or get */ command_change_private_s change; command_map_private_s map; command_results_private_s results; } command_private_u; struct command { int ref_count; command_type_e type; unsigned int cmd_id; unsigned int msg_id; command_private_u private; location_s *source; location_s *target; cred_s *cred; int no_resp; }; struct status { unsigned int cmd_id; unsigned int msg_ref; unsigned int cmd_ref; command_type_e type; char *data; location_s *source_ref; location_s *target_ref; cred_s *cred; chal_s *chal; item_s *item; }; #endif /* SA_COMMAND_INTERNAL_H_ */