4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.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://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_PTDB_H__
21 #define __PRINT_PTDB_H__
27 PT_SEARCH_MODEL = 0, /** search ppd file by ModelName field */
28 PT_SEARCH_PROD, /** search ppd file by Product field */
29 PT_SEARCH_ALL /** search ppd file by PT_SEARCH_MODEL or PT_SEARCH_PROD */
44 pt_dbconfig *dbconfig;
49 * Create in-core representation of print-service database.
50 * This database is used for searching, extracting ppd files.
51 * @return If success, returns pointer to in-core database representation ,
53 * @param[in] absolute or relative path to the database file
55 pt_db *pt_create_db(const char *path);
59 * @return If success, returns string with ppdc output,
61 * @param[in] database pointer to the database
62 * @param[in] search key used for searching ppd file
63 * @param[in] type which type of searching will be performed
65 char* pt_extract_ppd(pt_db *database, const char *search, pt_search type);
68 * Free memory and other resources used by in-core database representation.
69 * @return If success, returns pointer to in-core database representation ,
71 * @param[in] database pointer to the database
73 void pt_free_db(pt_db *database);
75 #endif /* __PRINT_PTDB_H__ */