4 * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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.
25 #include "extended-sd-main.h"
27 #define DBUS_REPLY_TIMEOUT (-1)
29 #define STORAGED_BUS_NAME "org.tizen.system.storage"
30 #define STORAGED_OBJECT_PATH "/Org/Tizen/System/Storage"
31 #define STORAGED_INTERFACE_NAME STORAGED_BUS_NAME
33 #define STORAGED_PATH_BLOCK STORAGED_OBJECT_PATH"/Block"
34 #define STORAGED_PATH_BLOCK_MANAGER STORAGED_PATH_BLOCK"/Manager"
35 #define STORAGED_INTERFACE_BLOCK_MANAGER STORAGED_INTERFACE_NAME".BlockManager"
37 #define VIEWTYPE_KEY "viewtype"
38 #define DEVPATH_KEY "dev_path"
39 #define MAPPING_NODE_KEY "mapping_node"
40 #define SDCARD_SETUP_TYPE "_SDCARD_SETUP_TYPE_"
47 int dbus_method_sync(const char *dest, const char *path,
48 const char *interface, const char *method,
49 const char *sig, char *param[]);
50 int dbus_method_sync_with_reply(const char *dest,
51 const char *path, const char *interface,
52 const char *method, const char *sig,
53 char *param[], GVariant **info);
55 typedef void (*dbus_pending_cb)(void *data, GVariant *result, GError *err);
57 int dbus_method_async_with_reply(const char *dest, const char *path,
58 const char *interface, const char *method,
59 const char *sig, char *param[], dbus_pending_cb cb, int timeout, void *data);
62 * If result is NULL, err is set.
63 * Do not invoke g_variant_unref() with result.