summaryrefslogtreecommitdiff
path: root/include/serviceadapter/sa_session_internal.h
blob: 69022a91be6e962a7dc1b04ba8d2962d99a14f0b (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
/*
 * oma-dm-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.
 */

#ifndef SA_SESSION_INTERNAL_H_
#define SA_SESSION_INTERNAL_H_

/*dm-agent*/
#include "common/dm_common_def.h"
#include "serviceadapter/sa_define.h"

struct Session {
	ProtocolVersion protocolVersion;
	ProtocolType protocolType;

	char *sessionID;
	unsigned int msgID;
	unsigned int lastRecievedMsgID;
	unsigned int cmdID;
	int isSendingfinal;
	int isReceivingFinal;

	GList *status;		//status to return to server
	GList *tempStatus;	//temp status for sync add, replace, delete command(it does not have data element value)

	Location *target;
	Location *source;
	Location *orgTarget;

	unsigned int sourceMaxMsgSize;
	unsigned int sourceMaxObjSize;

	unsigned int targetMaxMsgSize;
	unsigned int targetMaxObjSize;

	int accountId;

	char *pServer_id;	//server id
	ENGINE_ID service_engine_id;	//service engine id

	Cred *cred;		//account info
	Chal *res_chal;		//res_chal from server to client
	Chal *req_chal;		//req_chal from clinet to server

	int isHMAC;		//using HMAC authentication
	Hmac *reqhmacinfo;	//hmac info for http header
	Hmac *resphmacinfo;	//hmac info for http header

	char *jsessionid;	//lawmo jsession
	char *other_cookie;
	GList *pendingStatus;	//containing pendingStatus structure ->msgid and cmd id that sent to server

	Command *pLargeObjCmd;	//for incomming large Command
	GList *alertCommand;	//containing alert command that have to send to server
	GList *resultsCommand;	//containing results command

};

struct PendingStatus {
	unsigned int cmdID;
	unsigned int msgID;
	// callback;
	//userdata;
};
#endif				/* SA_SESSION_INTERNAL_H_ */