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.
17 * @author Zbigniew Kostrzewa <z.kostrzewa@samsung.com>
20 #ifndef WRTDEVICEAPIS_RADIO_ISOURCE_H_
21 #define WRTDEVICEAPIS_RADIO_ISOURCE_H_
24 #include "EventSourceTypeChange.h"
26 namespace WrtDeviceApis {
32 virtual ~ISource() = 0;
35 * Gets whether device is connected to some signal source.
36 * @return True if connected, false otherwise.
37 * @throw PlatformException If error in platform occurs.
39 virtual bool isConnected() const = 0;
42 * Gets type of the signal source.
43 * @return Type of the source.
44 * @throw UnsupportedException If platform doesn't support it.
45 * @throw PlatformException If error in platform occurs.
47 virtual SourceType getType() const = 0;
50 * Adds on type change emitter.
51 * @param emitter On type change event emitter.
52 * @throw UnsupportedException If platform doesn't support it.
53 * @throw PlatformException If error in platform occurs.
55 virtual void addOnTypeChange(const EventSourceTypeChangeEmitterPtr& emitter)
59 * Removes on type change emitter.
60 * @param id Id of an event emitter.
61 * @throw UnsupportedException If platform doesn't support it.
62 * @throw PlatformException If error in platform occurs.
64 virtual void removeOnTypeChange(EventSourceTypeChangeEmitter::IdType id) =
71 #endif // WRTDEVICEAPIS_RADIO_ISOURCE_H_