Initialize Tizen 2.3
[framework/system/oma-dm-agent.git] / include / serviceadapter / sa_session_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_SESSION_INTERNAL_H_
19 #define SA_SESSION_INTERNAL_H_
20
21 /*dm-agent*/
22 #include "common/dm_common_def.h"
23 #include "serviceadapter/sa_define.h"
24
25 struct Session {
26         ProtocolVersion protocolVersion;
27         ProtocolType protocolType;
28
29         char *sessionID;
30         unsigned int msgID;
31         unsigned int lastRecievedMsgID;
32         unsigned int cmdID;
33         int isSendingfinal;
34         int isReceivingFinal;
35
36         GList *status;          //status to return to server
37         GList *tempStatus;      //temp status for sync add, replace, delete command(it does not have data element value)
38
39         Location *target;
40         Location *source;
41         Location *orgTarget;
42
43         unsigned int sourceMaxMsgSize;
44         unsigned int sourceMaxObjSize;
45
46         unsigned int targetMaxMsgSize;
47         unsigned int targetMaxObjSize;
48
49         int accountId;
50
51         char *pServer_id;       //server id
52         ENGINE_ID service_engine_id;    //service engine id
53
54         Cred *cred;             //account info
55         Chal *res_chal;         //res_chal from server to client
56         Chal *req_chal;         //req_chal from clinet to server
57
58         int isHMAC;             //using HMAC authentication
59         Hmac *reqhmacinfo;      //hmac info for http header
60         Hmac *resphmacinfo;     //hmac info for http header
61
62         char *jsessionid;       //lawmo jsession
63         char *other_cookie;
64         GList *pendingStatus;   //containing pendingStatus structure ->msgid and cmd id that sent to server
65
66         Command *pLargeObjCmd;  //for incomming large Command
67         GList *alertCommand;    //containing alert command that have to send to server
68         GList *resultsCommand;  //containing results command
69
70 };
71
72 struct PendingStatus {
73         unsigned int cmdID;
74         unsigned int msgID;
75         // callback;
76         //userdata;
77 };
78 #endif                          /* SA_SESSION_INTERNAL_H_ */