4 * Copyright (c) 2013-2014 Intel Corporation.
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.
28 OBEX_TARGET_UNKNOWN = 0,
42 OBEX_SESSION_CREATED = 0,
47 OBEX_SESSION_NO_SERVICE
51 OBEX_TRANSFER_UNKNOWN = 0,
54 OBEX_TRANSFER_COMPLETE,
55 OBEX_TRANSFER_CANCELED,
59 int obex_lib_init(void);
60 void obex_lib_deinit(void);
62 typedef void (*agent_cb_t)(
63 enum bluez_error_type type,
65 void obex_agent_register_agent(
66 const char *agent_path,
69 void obex_agent_unregister_agent(
70 const char *agent_path,
74 typedef void (*obex_agent_added_cb_t)(
76 void obex_agent_set_agent_added(
77 obex_agent_added_cb_t cb,
79 void obex_agent_unset_agent_added(void);
81 typedef void (*obex_session_state_cb)(
82 const char *session_id,
84 enum session_state state,
88 int obex_create_session(const char *destination,
89 enum obex_target target,
90 obex_session_state_cb cb,
93 void obex_session_remove_session(const char *object_path);
95 typedef void (*obex_transfer_state_cb)(
96 const char *transfer_path,
97 enum transfer_state state,
104 void obex_session_opp_send_file(const char *session,
106 obex_transfer_state_cb cb,
109 /* Returned Glist should not be freed and modified */
111 void obex_transfer_cancel(const char *path);
113 /* notify specific transfer */
114 int obex_transfer_set_notify(
116 obex_transfer_state_cb cb, void *data);
118 void obex_transfer_clear_notify(char *transfer_path);
120 enum transfer_state obex_transfer_get_property_state(const char *path);
122 enum transfer_state obex_transfer_get_property_state(const char *path);
124 char *obex_transfer_get_property_source(const char *path);
126 char *obex_transfer_get_property_destination(const char *path);
128 char *obex_transfer_get_property_file_name(const char *path);
130 char *obex_transfer_get_property_name(const char *path);
132 int obex_transfer_get_property_size(const char *path, guint64 *size);
134 int obex_get_transfer_id(const char *transfer_path,
135 enum obex_role role);
137 int obex_agent_get_agent(void);