2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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.
18 #ifndef __BT_SERVICE_OBEX_AGENT_H
19 #define __BT_SERVICE_OBEX_AGENT_H
21 #include <glib-object.h>
28 BT_OBEX_AGENT_ERROR_REJECT,
29 BT_OBEX_AGENT_ERROR_CANCEL,
30 BT_OBEX_AGENT_ERROR_TIMEOUT,
39 GObjectClass parent_class;
42 GType bt_obex_agent_get_type(void);
44 #define BT_OBEX_TYPE_AGENT (bt_obex_agent_get_type())
45 #define BT_OBEX_AGENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), BT_OBEX_TYPE_AGENT, BtObexAgent))
46 #define BT_OBEX_AGENT_CLASS(agent_class) (G_TYPE_CHECK_CLASS_CAST((agent_class), BT_OBEX_TYPE_AGENT, BtObexAgentClass))
47 #define BT_OBEX_GET_AGENT_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), BT_OBEX_TYPE_AGENT, BtObexAgentClass))
49 typedef gboolean(*bt_obex_authorize_cb)(GDBusMethodInvocation *context,
53 typedef gboolean(*bt_obex_request_cb)(GDBusMethodInvocation *context,
57 typedef gboolean(*bt_obex_progress_cb)(GDBusMethodInvocation *context,
62 typedef gboolean(*bt_obex_error_cb)(GDBusMethodInvocation *context,
67 typedef gboolean(*bt_obex_complete_cb)(GDBusMethodInvocation *context,
71 typedef gboolean(*bt_obex_release_cb)(GDBusMethodInvocation *context,
76 void _bt_obex_set_authorize_cb(char *object_path,
77 bt_obex_authorize_cb func,
80 void _bt_obex_set_request_cb(char *object_path,
81 bt_obex_request_cb func,
84 void _bt_obex_set_progress_cb(char *object_path,
85 bt_obex_progress_cb func,
88 void _bt_obex_set_error_cb(char *object_path,
89 bt_obex_error_cb func,
92 void _bt_obex_set_complete_cb(char *object_path,
93 bt_obex_complete_cb func,
96 void _bt_obex_set_release_cb(char *object_path,
97 bt_obex_release_cb func,
100 void _bt_obex_agent_new(char *path);
102 void _bt_obex_agent_destroy(char *path);
104 gboolean _bt_obex_setup(const char *path);
108 #endif /* __cplusplus */
110 #endif /* __BT_SERVICE_OBEX_AGENT_H */