upload tizen1.0 source
[pkgs/o/oma-ds-service.git] / include / ServiceAdapter / SA_Command_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_Command_Internal.h
39  *   @version                                                                   0.1
40  *   @brief                                                                             This file is the header file that structure which is available in SA is defined
41  *                                                                                                      Command (Alert, Results, Sync, Put, Get, Map, Add, Replace, Delete)
42  *                                                                                                      Status
43  */
44
45 #ifndef SA_COMMAND_INTERNAL_H_
46 #define SA_COMMAND_INTERNAL_H_
47
48 #include "ServiceAdapter/SA_Define.h"
49 #include "Common/Common_Define.h"
50
51 typedef struct CommandAlertPrivate {
52         AlertType type;
53         Anchor *anchor;
54         char *contentType;
55         unsigned int maxObjSize;
56 } CommandAlertPrivate;
57
58 typedef struct CommandSyncPrivate {
59         unsigned int numChanged;
60         int maxObjSize;
61         int hasNumChanged;
62 } CommandSyncPrivate;
63
64 typedef struct CommandAccessPrivate {
65         char *type;
66         Item *item;
67 } CommandAccessPrivate;
68
69 typedef struct CommandChangePrivate {
70         GList *items;
71         ChangeType type;
72 } CommandChangePrivate;
73
74 typedef struct CommandMapPrivate {
75         GList *items;
76 } CommandMapPrivate;
77
78 typedef struct CommandResultsPrivate {
79         unsigned int msgRef;
80         unsigned int cmdRef;
81         Location *targetRef;
82         char *type;
83         Item *item;
84 } CommandResultsPrivate;
85
86 typedef union CommandPrivate {
87         CommandAlertPrivate alert;
88         CommandSyncPrivate sync;
89         CommandAccessPrivate access;            /*put or get*/
90         CommandChangePrivate change;
91         CommandMapPrivate map;
92         CommandResultsPrivate results;
93 } CommandPrivate;
94
95 struct  Command {
96         int refCount;
97         CommandType type;
98         unsigned int cmdID;
99         unsigned int msgID;
100         CommandPrivate private;
101         Location *source;
102         Location *target;
103         Cred *cred;
104         int noResp;
105 } ;
106
107 struct Status {
108         unsigned int cmdID;
109         unsigned int msgRef;
110         unsigned int cmdRef;
111         CommandType type;
112         char *data;
113         Location *sourceRef;
114         Location *targetRef;
115         Cred *cred;
116         Chal *chal;
117         Item *item;
118 };
119
120 #endif /* SA_COMMAND_INTERNAL_H_ */