4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
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>
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 #ifndef __PKGMGR_CLIENT_INTERNAL_H__
24 #define __PKGMGR_CLIENT_INTERNAL_H__
32 #include "package-manager-plugin.h"
33 #include "package-manager.h"
41 pkgmgr_handler event_cb;
42 pkgmgr_app_handler app_event_cb;
43 pkgmgr_pkg_size_info_receive_cb size_info_cb;
44 pkgmgr_res_handler res_event_cb;
45 pkgmgr_pkg_upgrade_handler upgrade_event_cb;
47 struct pkgmgr_client_t *client;
51 struct pkgmgr_client_t {
52 pkgmgr_client_type pc_type;
54 GDBusConnection *conn;
56 GVariantBuilder *res_copy_builder;
57 GVariantBuilder *res_remove_builder;
58 GVariantBuilder *res_create_dir_builder;
62 bool skip_optimization;
65 struct manifest_and_type {
70 int pkgmgr_client_connection_connect(struct pkgmgr_client_t *pc);
71 void pkgmgr_client_connection_disconnect(struct pkgmgr_client_t *pc);
72 int pkgmgr_client_connection_set_callback(struct pkgmgr_client_t *pc,
73 struct cb_info *cb_info);
74 void pkgmgr_client_connection_unset_callback(struct pkgmgr_client_t *pc,
75 struct cb_info *cb_info);
76 int pkgmgr_client_connection_send_request(struct pkgmgr_client_t *pc,
77 const char *method, GVariant *params, GVariant **result);
79 pkg_plugin_set *_pkg_plugin_load_library(const char *pkg_type,
80 const char *library_path);
82 int _pkg_plugin_get_library_path(const char *pkg_type, char *library_path);
84 pkg_plugin_set *_package_manager_load_library(const char *pkg_type);
86 #define PKG_BACKENDLIB "backendlib:"
87 #define PKG_CONF_PATH "/etc/package-manager/pkg_path.conf"
89 void _app_str_trim(char *input);
91 #endif /* __PKGMGR_CLIENT_INTERNAL_H__ */