upload tizen1.0 source
[pkgs/o/oma-ds-service.git] / include / ServiceAdapter / SA_Elements_Internal.h
1 /*
2  * oma-ds-service
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: JuHak Park <juhaki.park@samsung.com>,
7  *          JuneHyuk Lee <junhyuk7.lee@samsung.com>,
8  *          SunBong Ha <sunbong.ha@samsung.com>
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */
23
24
25
26
27
28 /*
29  * For any sort of issue you concern as to this software,
30  * you may use following point of contact.
31  * All resources contributed on this software
32  * are orinigally written by S-Core Inc., a member of Samsung Group.
33  *
34  * SeongWon Shim <seongwon.shim@samsung.com>
35  */
36
37 /**
38  *   @SA_Elements_Internal.h
39  *   @version                                                                   0.1
40  *   @brief                                                                             This file is the header file that structure which is available in SA is defined
41  *                                                                                                      SyncHdr, SyncML, Cred, Chal, Item, Anchor, Location
42  */
43
44 #ifndef SA_ELEMENTS_INTERNAL_H_
45 #define SA_ELEMENTS_INTERNAL_H_
46
47 #include "ServiceAdapter/SA_Define.h"
48
49 typedef union ItemData {
50         char *data;
51         DevInf *devInf;
52 } ItemData;
53
54 struct  Chal {
55         FormatType format;
56         AuthType type;
57         char *nonce_plain;
58         unsigned int nonce_length;
59         char *nonce_b64;
60 };
61
62 struct  Item {
63         ItemDataType dataType;
64         ItemData private;
65         Location *source;
66         Location *target;
67         Anchor *anchor;
68
69         unsigned int size;              /* for data*/
70         char *contenttype;              /* for data*/
71         int moreData;                           /* for moredata*/
72 };
73
74 struct Anchor {
75         char *lastAnchor;                       /**< Last Anchor*/
76         char *nextAnchor;                       /**< Next Anchor*/
77 };
78
79 struct Location {
80         char *locURI;
81         char *locName;
82 } ;
83
84 struct  Cred {
85         FormatType format;
86         AuthType type;
87         char *data;
88         char *username;
89         char *password;
90 } ;
91
92 struct  SyncHdr {
93         char *sessionID;
94         ProtocolVersion version;
95         ProtocolType protocol;
96         Location *source;
97         Location *target;
98         Cred *cred;
99         char *responseURI;
100         int noResponse;
101         unsigned int messageID;
102
103         /*in meta element*/
104         unsigned int maxmsgsize;
105         unsigned int maxobjsize;
106 } ;
107
108 struct  SyncML {
109          SyncHdr *hdr;
110          GList *status;                 /**< containing  Status struct */
111          GList *commands;               /**< containing  Command struct */
112          int final;
113 };
114
115
116 #endif /* SA_ELEMENTS_INTERNAL_H_ */