4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 __PRINT_SERVICE_H__
21 #define __PRINT_SERVICE_H__
23 #include <cups/cups.h>
28 #define MAX_URI_SIZE (512)
31 char product_ui_name[PT_MAX_LENGTH]; /* product display name in UI */
32 char device_info[PT_MAX_LENGTH]; /* printer info used as key of hashtable*/
33 char device_uri[PT_MAX_LENGTH]; /* url */
34 char model_name[PT_MAX_LENGTH]; /* mdl name */
35 char manufacturer[PT_MAX_LENGTH]; /* mfg name */
36 char ppd_file_path[PT_MAX_LENGTH]; /** ppd file name (with full path) */
37 // int color; /* 0-F, 1-T, 2-U */
38 // int duplex; /* 0-F, 1-T, 2-U */
43 pt_printer_info_t *printer_info;
44 pt_printer_status_t *printer_status;
48 } pt_printer_status_t;
51 pts_printing_data_t *data;
53 pt_notification_t *notification_plugin;
54 pt_print_option_t *option;
67 int priority; /** priority (1-100) */
71 pt_job_state_e status; /** job status */
72 char title[PT_MAX_LENGTH]; /** title/job name */
73 char user[PT_MAX_LENGTH]; /** reserved, username who submitted the job */
74 pt_printer_mgr_t *printer; /** the pointer to the associated printer object */
79 Eina_List *pt_local_list;
80 pt_response_data_t response_data;
81 get_printers_cb user_cb;
86 PT_SEARCH_IN_PROGRESS,
89 } pt_searching_state_e;
100 } pt_printing_state_e;
105 Ecore_Thread *printing_thd_hdl;
106 pt_job_info_t *job; /** job info */
107 pt_printing_state_e printing_state;
108 Ecore_Timer *job_noti_timer;
113 pt_connection_type_e connect_type; /** assigned connection type */
114 pt_printer_mgr_t *active_printer; /** active printer info */
115 pt_search_data_t *search;
117 cups_option_t *job_options;
118 int num_options; /** print job option */
120 int ueventsocket; /* hotplug event socket */
121 int avahi_pid; /* avahi pid */
122 int cups_pid; /* cups pid */
124 Ecore_Timer *cups_checking_timer;
125 Ecore_Thread *searching_thd_hdl;
126 pt_searching_state_e searching_state;
127 Eina_List *printing_thd_list;
133 extern pt_info_t *g_pt_info; /** print info maintained globally */
134 extern ppd_file_t *ppd;
136 #endif /* __PRINT_SERVICE_H__ */