2 * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "mtp_gdbus_objectinfo.h"
19 mtpgdbuslibObjectinfo *objectinfo_proxy = NULL;
21 void mtp_gdbus_objectinfo_proxy_init(void)
23 objectinfo_proxy = mtp_gdbuslib_objectinfo_proxy_new_for_bus_sync(
25 G_DBUS_PROXY_FLAGS_NONE,
27 MTP_DBUS_OBJECTINFO_PATH,
32 void mtp_gdbus_objectinfo_proxy_deinit(void)
34 objectinfo_proxy = NULL;
38 int mtp_gdbus_objectinfo_get_property(int mtp_device,
39 int object_handle, int property, int *property_value)
41 mtp_error_e result = MTP_ERROR_NONE;
44 if (objectinfo_proxy == NULL)
45 return MTP_ERROR_NOT_COMM_INITIALIZED;
47 if (mtp_gdbuslib_objectinfo_call_get_property_sync(
56 result = MTP_ERROR_COMM_ERROR;
63 int mtp_gdbus_objectinfo_get_property_string(int mtp_device,
64 int object_handle, int property, char **property_value)
66 mtp_error_e result = MTP_ERROR_NONE;
69 if (objectinfo_proxy == NULL)
70 return MTP_ERROR_NOT_COMM_INITIALIZED;
72 if (mtp_gdbuslib_objectinfo_call_get_property_string_sync(
81 result = MTP_ERROR_COMM_ERROR;