d4dd3c5825f3f3499990625f2c7688987b0ddf89
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-adaptation / services / obex / include / bt-service-obex-server.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *              http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18
19 #ifndef _BT_SERVICE_OBEX_SERVER_H_
20 #define _BT_SERVICE_OBEX_SERVER_H_
21
22 #include <glib.h>
23 #include <sys/types.h>
24 #include "bluetooth-api.h"
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 int _bt_register_obex_server(void);
31
32 int _bt_unregister_obex_server(void);
33
34 int _bt_obex_server_allocate(char *sender, const char *dest_path, int app_pid,
35                                 gboolean is_native);
36
37 int _bt_obex_server_deallocate(int app_pid, gboolean is_native);
38
39 int _bt_obex_server_accept_authorize(const char *filename, gboolean is_native);
40
41 int _bt_obex_server_reject_authorize(void);
42
43 int _bt_obex_server_set_destination_path(const char *dest_path,
44                                                 gboolean is_native);
45
46 int _bt_obex_server_set_root(const char *root);
47
48 int _bt_obex_server_cancel_transfer(int transfer_id);
49
50 int _bt_obex_server_cancel_all_transfers(void);
51
52 int _bt_obex_server_is_activated(gboolean *activated);
53
54 int _bt_obex_server_check_allocation(gboolean *allocation);
55
56 int _bt_obex_server_check_termination(char *sender);
57
58 int _bt_obex_server_accept_connection(int request_id);
59
60 int _bt_obex_server_reject_connection(void);
61
62 int _bt_opp_get_server_progress(int transfer_id, guint8 *progress);
63
64 int _bt_obex_server_is_receiving(gboolean *receiving);
65
66
67 void _bt_obex_transfer_progress(const char *transfer_path,
68                                         guint64 transferred);
69 void _bt_obex_transfer_completed(const char *transfer_path, gboolean success);
70
71 void _bt_obex_transfer_started(const char *transfer_path);
72
73 void _bt_obex_check_pending_transfer(const char *address);
74
75 void _bt_obex_transfer_connected(const char *obj_path);
76
77 void _bt_obex_transfer_disconnected(char *address);
78
79 int _bt_obex_get_native_pid(void);
80
81 void _bt_obex_server_reply_accept(void);
82
83 void _bt_obex_server_set_pending_conn_auth_device_addr(const char *address);
84
85 gboolean _bt_obex_server_is_custom(void);
86
87 #ifdef __cplusplus
88 }
89 #endif /* __cplusplus */
90 #endif /*_BT_SERVICE_OBEX_SERVER_H_*/
91