Initialize Tizen 2.3
[framework/system/oma-dm-agent.git] / include / serviceadapter / sa_command_internal.h
1 /*
2  * oma-dm-agent
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 #ifndef SA_COMMAND_INTERNAL_H_
19 #define SA_COMMAND_INTERNAL_H_
20
21 /*dm-agent*/
22 #include "serviceadapter/sa_define.h"
23
24 typedef struct CommandAlertPrivate {
25         AlertType type;
26         unsigned int maxObjSize;
27         /*Item *item; */
28         GList *items;
29         char *Correlator;
30 } CommandAlertPrivate;
31
32 typedef struct CommandAccessPrivate {
33         char *type;
34         GList *items;
35 } CommandAccessPrivate;
36
37 typedef struct CommandChangePrivate {
38         GList *items;
39         ChangeType type;
40 } CommandChangePrivate;
41
42 typedef struct CommandResultsPrivate {
43         unsigned int msgRef;
44         unsigned int cmdRef;
45         Location *targetRef;
46         char *type;
47         GList *items;
48 } CommandResultsPrivate;
49
50 typedef struct CommandExecPrivate {
51         char *correlator;
52         Item *item;
53 } CommandExecPrivate;
54
55 typedef struct CommandSequence_AtomicPrivate {
56         GList *commands;
57 } CommandSequence_AtomicPrivate;
58
59 typedef union CommandPrivate {
60         CommandAlertPrivate alert;
61         CommandAccessPrivate access;    /*get */
62         CommandChangePrivate change;    /*add, delete, replace */
63         CommandResultsPrivate results;
64         CommandExecPrivate exec;
65         CommandSequence_AtomicPrivate sequence_atomic;
66
67 } CommandPrivate;
68
69 struct Command {
70         int refCount;
71         CommandType type;
72         unsigned int cmdID;
73         unsigned int msgID;
74         CommandPrivate private;
75         Location *source;
76         Location *target;
77         int noResp;
78 };
79
80 struct Status {
81         unsigned int cmdID;
82         unsigned int msgRef;
83         unsigned int cmdRef;
84         CommandType type;
85         char *data;
86         Location *sourceRef;
87         Location *targetRef;
88         Cred *cred;
89         Chal *chal;
90         GList *items;
91         //Item *item;
92 };
93
94 #endif                          /* SA_COMMAND_INTERNAL_H_ */