tizen 2.3.1 release
[framework/appfw/pkgmgr-info.git] / parser / pkgmgr_parser_plugin.h
1 /*
2  * pkgmgr-info
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7  * Jaeho Lee <jaeho81.lee@samsung.com>, Shobhit Srivastava <shobhit.s@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */
22 #ifndef __PKGMGR_PARSER_PLUGIN_H_
23 #define __PKGMGR_PARSER_PLUGIN_H_
24
25 #include "pkgmgr_parser.h"
26
27 #ifdef __cplusplus
28          extern "C" {
29 #endif                          /* __cplusplus */
30
31 typedef void* pkgmgr_parser_plugin_h;
32
33 /* plugin process_type */
34 typedef enum {
35         PLUGIN_PRE_PROCESS = 0,
36         PLUGIN_POST_PROCESS
37 } PLUGIN_PROCESS_TYPE;
38
39 #define PKGMGR_PARSER_PLUGIN_TAG                "tag"
40 #define PKGMGR_PARSER_PLUGIN_METADATA   "metadata"
41 #define PKGMGR_PARSER_PLUGIN_CATEGORY   "category"
42
43 int __ps_run_parser(xmlDocPtr docPtr, const char *tag, ACTION_TYPE action, const char *pkgid);
44
45 int _pkgmgr_parser_plugin_open_db();
46 void _pkgmgr_parser_plugin_close_db();
47 void _pkgmgr_parser_plugin_process_plugin(manifest_x *mfx, const char *filename, ACTION_TYPE action);
48 void _pkgmgr_parser_plugin_uninstall_plugin(const char *plugin_type, const char *pkgid, const char *appid);
49
50 #ifdef __cplusplus
51 }
52 #endif                          /* __cplusplus */
53 #endif                          /* __PKGMGR_PARSER_PLUGIN_H_ */