4 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
6 * Contact: Taeyoung Kim <ty317.kim@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #ifndef __SYSPOPUP_APP_H__
23 #define __SYSPOPUP_APP_H__
31 #include <sys/types.h>
32 #include <sys/socket.h>
35 #define SOCK_PATH "/tmp/usb_server_sock"
36 #define SOCK_STR_LEN 1542
37 #define ACC_ELEMENT_LEN 256
38 #define PKG_NAME_LEN 64
39 #define ACC_INFO_NUM 6
40 #define MAX_NUM_OF_MATCHED_APPS 256
43 #define PACKAGE "usb_syspopup"
47 #define USB_LOG_VERBOSE LOG_VERBOSE
48 #define USB_LOG_DEBUG LOG_DEBUG
49 #define USB_LOG_INFO LOG_INFO
50 #define USB_LOG_WARN LOG_WARN
51 #define USB_LOG_ERROR LOG_ERROR
52 #define USB_LOG_FATAL LOG_FATAL
54 #define USB_TAG "USB_SYSPOPUP"
55 #define USB_LOG(log_level, format, args...)\
56 LOG(log_level, USB_TAG, "[%s][Ln: %d] " format,__FILE__, __LINE__, ##args)
57 #define __USB_FUNC_ENTER__\
58 USB_LOG(USB_LOG_DEBUG, "Entering: %s()\n", __func__)
59 #define __USB_FUNC_EXIT__\
60 USB_LOG(USB_LOG_DEBUG, "Exit: %s()\n", __func__)
64 MAX_NUM_SYSPOPUP_PARAM
65 /* When we need to deliver other parameters to USB-syspopup
66 * add the types of parameters */
71 SELECT_PKG_FOR_ACC_POPUP,
75 /* When we need to add other system popup,
76 * Write here the type of popup */
90 ERROR_POPUP_OK_BTN = 0,
94 LAUNCH_APP_FOR_ACC = 20,
97 REQ_ACC_PERM_NOTI_YES_BTN,
98 REQ_ACC_PERM_NOTI_NO_BTN,
100 } REQUEST_TO_USB_MANGER;
102 typedef struct _usbAccessory {
103 char manufacturer[ACC_ELEMENT_LEN];
104 char model[ACC_ELEMENT_LEN];
105 char description[ACC_ELEMENT_LEN];
106 char version[ACC_ELEMENT_LEN];
107 char uri[ACC_ELEMENT_LEN];
108 char serial[ACC_ELEMENT_LEN];
121 UsbAccessory *usbAcc;
122 char selPkg[PKG_NAME_LEN];
124 /* add more variables here */
127 static void load_connection_failed_popup_ok_response_cb(void *data, Evas_Object * obj, void *event_info);
128 static void request_perm_popup_yes_response_cb(void *data, Evas_Object * obj, void *event_info);
129 static void request_perm_popup_no_response_cb(void *data, Evas_Object * obj, void *event_info);
131 #endif /* __SYSPOPUP_APP_H__ */