blob: 842ca1d327c82e804e618b127ed5943e728929ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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_ */
|