Tizen 2.0 Release
[pkgs/o/oma-ds-service.git] / include / service-adapter / sa_session_internal.h
1 /*
2  * oma-ds-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 /**
19  *   @SA_Session_Internal.h
20  *   @version                                                                   0.1
21  *   @brief                                                                             This file is the header file of session structure is defined
22  *                                                                                                      Session, PendingStatus
23  */
24
25 #ifndef SA_SESSION_INTERNAL_H_
26 #define SA_SESSION_INTERNAL_H_
27
28 #include "service-adapter/sa_define.h"
29
30 struct session {
31         protocol_version_e protocol_version;
32         protocol_type_e protocol_type;
33
34         char *session_id;
35         unsigned int msg_id;
36         unsigned int last_recieved_msg_id;
37         unsigned int cmd_id;
38         int is_sending_final;
39         int is_receiving_final;
40
41         GList *status;          /*status to return to server */
42         GList *temp_status;     /*temp status for sync add, replace, delete command(it doesnot have data element value) */
43         GList *suspend_status;  /* for suspend */
44         location_s *target;
45         location_s *source;
46         location_s *org_target;
47
48         unsigned int source_max_msg_size;
49         unsigned int source_max_obj_size;
50
51         unsigned int target_max_msg_size;
52         unsigned int target_max_obj_size;
53
54         cred_s *cred;           /*account info */
55         chal_s *chal;           /*chal from server */
56
57         devinf_s *devinf;       /*client devinf */
58         devinf_s *remote_devinf;        /*server devinf */
59
60         pkg_status_e pkg_status;        /*for status */
61
62         command_s *large_obj_cmd;       /*for incomming large Command */
63
64         GList *map_command;     /*containing map command that has sent to server(this is used to for delete map item from mapping table) */
65
66         GList *alert_command;   /*containing alert command that have to send to server */
67
68         GList *results_command; /*containing results command */
69
70         command_status_s *large_obj;    /*for outgoing large command */
71
72         int has_opend;
73         unsigned int naci_session_id;
74
75         int account_id;
76         char *jsession_id;
77 };
78
79 struct command_status {
80         unsigned int cmd_id;
81         unsigned int msg_id;
82 };
83 #endif                          /* SA_SESSION_INTERNAL_H_ */