1. Changed license copyright year
[apps/core/preloaded/print-service.git] / include / pt_optionmapping.h
1 /*
2 *       Printservice
3 *
4 * Copyright 2012-2013  Samsung Electronics Co., Ltd
5
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
9
10 * http://floralicense.org/license/
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 PT_OPTIONMAPPING_H
21 #define PT_OPTIONMAPPING_H
22
23 #include "pt_debug.h"
24 #include "pt_common.h"
25
26 typedef struct {
27         const char *keyword;
28         int quality;
29         int papertype;
30         int grayscale;
31         int duplex;
32 } pt_choice_keyword;
33
34 typedef struct {
35         const char *key;
36         void (*fn)(ppd_option_t *op);
37         const pt_choice_keyword *keywords;
38 } KeyActions;
39
40 typedef enum _pt_resolution_t {
41         PT_RESOLUTION_LOWEST,
42         PT_RESOLUTION_LOW,
43         PT_RESOLUTION_STANDARD,
44         PT_RESOLUTION_HIGH,
45         PT_RESOLUTION_MAX
46 } pt_resolution_t;
47
48 typedef struct {
49         const char *keyword;
50         pt_resolution_t weight;
51 } pt_resolution_keyword;
52
53 #undef PT_OPTIONCUBE_TEST_PRINT
54 #define PT_USER_OPTION_CONFIG_FILE "/opt/etc/cups/ppd/settings.cfg"
55
56 ppd_choice_t *pt_selected_choice(int op, pt_orientation_e p);
57 void pt_parse_options(ppd_file_t *ppd);
58 void pt_save_user_choice(void);
59
60 #endif // PT_OPTIONMAPPING_H