diff options
Diffstat (limited to 'include/service-adapter/sa_elements_internal.h')
-rwxr-xr-x | include/service-adapter/sa_elements_internal.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/include/service-adapter/sa_elements_internal.h b/include/service-adapter/sa_elements_internal.h new file mode 100755 index 0000000..842ca1d --- /dev/null +++ b/include/service-adapter/sa_elements_internal.h @@ -0,0 +1,102 @@ +/* + * 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_Elements_Internal.h + * @version 0.1 + * @brief This file is the header file that structure which is available in SA is defined + * SyncHdr, SyncML, Cred, Chal, Item, Anchor, Location + */ + +#ifndef SA_ELEMENTS_INTERNAL_H_ +#define SA_ELEMENTS_INTERNAL_H_ + +#include "service-adapter/sa_define.h" + +typedef union { + char *data; + devinf_s *devinf; +} item_data_u; + +struct mem { + int sharedmem; + unsigned int free_mem; + unsigned int free_id; +}; + +struct chal { + format_type_e format; + auth_type_e type; + char *nonce_plain; + unsigned int nonce_length; + char *nonce_b64; +}; + +struct item { + item_data_type_e data_type; + item_data_u private; + location_s *source; + location_s *target; + anchor_s *anchor; + + unsigned int size; /* for data */ + char *content_type; /* for data */ + int more_data; /* for moredata */ +}; + +struct anchor { + char *last_anchor; /**< Last Anchor*/ + char *next_anchor; /**< Next Anchor*/ +}; + +struct location { + char *loc_uri; + char *loc_name; +}; + +struct cred { + format_type_e format; + auth_type_e type; + char *data; + char *user_name; + char *password; +}; + +struct sync_hdr { + char *session_id; + protocol_version_e version; + protocol_type_e protocol; + location_s *source; + location_s *target; + cred_s *cred; + char *response_uri; + int no_response; + unsigned int message_id; + + /*in meta element */ + unsigned int max_msg_size; + unsigned int max_obj_size; +}; + +struct syncml { + sync_hdr_s *hdr; + GList *status; /**< containing Status struct */ + GList *commands; /**< containing Command struct */ + int final; +}; + +#endif /* SA_ELEMENTS_INTERNAL_H_ */ |