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_TEST_H__
21 #define __PRINT_TEST_H__
23 #include <cups/cups.h>
28 #define TEST_MAX_GROUPS 10
29 #define ITER_MAX_VAL_IN_GROUP 100
33 struct _option_list *next;
34 struct _option_list *prev;
35 struct _option_list *first;
36 struct _option_list *last;
39 typedef struct _option_list option_list;
48 typedef struct _state state;
58 typedef struct _counter counter;
60 /* Open ppd file which additional checks */
61 ppd_file_t *open_ppd_file(const char *filename);
63 /* Save current state of choices */
66 /* Print state on STDOUT */
67 void print_state(state st);
69 /* Compare old state with current state */
70 void check_state(counter *array, int count);
72 /* Revert choice of selected option to previous state */
73 void restore_state(state st, counter *option);
78 /* Check that every option has selected choice */
79 void check_selected_choice();
81 /* Check that at least one selected choice is enabled */
82 void check_selected_choice_is_enabled();
84 /* Check that at all choices in option are disabled */
85 bool check_all_choices_disabled();
87 /* Check that at all choices in option papersize are disabled */
88 int check_all_choices_disabled_papersize();
90 /* Check that at all choices in option grayscale are disabled */
91 int check_all_choices_disabled_grayscale();
93 /* Check that at all choices in option quality are disabled */
94 int check_all_choices_disabled_quality();
96 /* Check that at all choices in option paper are disabled */
97 int check_all_choices_disabled_paper();
99 void set_custom_choice(int qual, int paper, int gr_scale, int paper_size);
101 /* Reliable way to set choice */
102 bool reliable_set_choice(int id, int choice);
104 /* Get current selected choices of OptionMapping */
105 state get_current_state();
107 /* Print groups after current */
108 void print_groups_after(int num);
110 /* Print groups before current */
111 void print_groups_before(int num);
113 #endif /* __PRINT_TEST_H__ */