2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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.
19 #include "receiver_internal.h"
21 typedef struct __receiver_h {
22 receiver_type_e receiver_type;
26 static receiver_h *ghandle = NULL;
28 int receiver_init(receiver_type_e type)
33 _E("receiver is already initialized");
37 ghandle = (receiver_h *)malloc(sizeof(receiver_h));
39 _E("failed to malloc handle");
44 case RECEIVER_TYPE_UDP:
45 ghandle->receiver_type = type;
46 ret = receiver_udp_start();
50 case RECEIVER_TYPE_BLUETOOTH:
62 void receiver_fini(void)
65 switch (ghandle->receiver_type) {
66 case RECEIVER_TYPE_UDP:
69 case RECEIVER_TYPE_BLUETOOTH: