Rearrange contacts-service.service from default.target to delayed.target
[platform/core/pim/contacts-service.git] / common / ctsvc_socket.h
1 /*
2  * Contacts Service
3  *
4  * Copyright (c) 2010 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef __CTSVC_SOCKET_H__
21 #define __CTSVC_SOCKET_H__
22
23 #include "contacts.h"
24
25 #define CTSVC_SOCKET_FILE ".contacts-svc.sock"
26 #define CTSVC_SOCKET_MSG_SIZE 1024
27
28 /* for use current contacts-svc-helper daemon */
29 /* Message type */
30 enum {
31         CTSVC_SOCKET_MSG_TYPE_REQUEST_RETURN_VALUE,
32         CTSVC_SOCKET_MSG_TYPE_REQUEST_IMPORT_SIM,
33         CTSVC_SOCKET_MSG_TYPE_REQUEST_SIM_INIT_COMPLETE,
34         CTSVC_SOCKET_MSG_TYPE_REQUEST_INVOKE_CB,
35         CTSVC_SOCKET_MSG_TYPE_CANCEL_IMPORT_SIM,
36 };
37
38 #define CTSVC_SOCKET_MSG_REQUEST_MAX_ATTACH 5
39
40 typedef struct {
41         int type;
42         int val;
43         int data;
44         int attach_num;
45         int attach_sizes[CTSVC_SOCKET_MSG_REQUEST_MAX_ATTACH];
46 } ctsvc_socket_msg_s;
47
48 int ctsvc_request_sim_import(int sim_slot_no,
49                 contacts_sim_import_progress_cb callback, void *user_data);
50 int ctsvc_request_sim_get_initialization_status(int sim_slot_no, bool *completed);
51 int ctsvc_socket_init(void);
52 void ctsvc_socket_final(void);
53
54 #endif /* __CTSVC_SOCKET_H__ */
55