Remove security-server dependency
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-scmst.c
1 /*
2  * Bluetooth-frwk
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:  Hocheol Seo <hocheol.seo@samsung.com>
7  *               Girishashok Joshi <girish.joshi@samsung.com>
8  *               Chanyeol Park <chanyeol.park@samsung.com>
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  *              http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */
23
24 #include <glib.h>
25 #include <dbus/dbus.h>
26 #include <dbus/dbus-glib.h>
27 #include <dbus/dbus-glib-lowlevel.h>
28
29 #include "bt-common.h"
30 #include "bt-internal-types.h"
31 #include "bt-request-sender.h"
32 #include "bluetooth-scmst-api.h"
33
34 BT_EXPORT_API int bluetooth_a2dp_set_content_protection(gboolean status)
35 {
36         int result;
37
38         BT_CHECK_ENABLED(return);
39
40         BT_INIT_PARAMS();
41         BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
42
43         g_array_append_vals(in_param1, &status, sizeof(gboolean));
44
45         result = _bt_send_request(BT_BLUEZ_SERVICE, BT_SET_CONTENT_PROTECT,
46                 in_param1, in_param2, in_param3, in_param4, &out_param);
47
48         BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
49
50         return result;
51 }