4 * Copyright (c) 2010 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #ifndef __CTSVC_SOCKET_H__
21 #define __CTSVC_SOCKET_H__
25 #define CTSVC_SOCKET_FILE ".contacts-svc.sock"
26 #define CTSVC_SOCKET_MSG_SIZE 1024
28 /* for use current contacts-svc-helper daemon */
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,
38 #define CTSVC_SOCKET_MSG_REQUEST_MAX_ATTACH 5
45 int attach_sizes[CTSVC_SOCKET_MSG_REQUEST_MAX_ATTACH];
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);
54 #endif /* __CTSVC_SOCKET_H__ */