// // Open Service Platform // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /** * @file FNetBt_BluetoothOppClientEvent.h * @brief This is the header file for the _BluetoothOppClientEvent class. * * This header file contains the declarations of the _BluetoothOppClientEvent class. * The _BluetoothOppClientEvent class can call a method of a listener (IBluetoothOppClientEventListener object). * So, when a device event is occurred, listener instances can handle it appropriately. */ #ifndef _FNET_BT_INTERNAL_BLUETOOTH_OPP_CLIENT_EVENT_H_ #define _FNET_BT_INTERNAL_BLUETOOTH_OPP_CLIENT_EVENT_H_ #include #include #include // Forward declaration namespace Tizen { namespace Base { namespace Runtime { class IEventListener; class IEventArg; } } } namespace Tizen { namespace Net { namespace Bluetooth { // // @class _BluetoothOppClientEvent // @brief This class handles Bluetooth OPP Client events. // // When a Bluetooth device event occurs, the _BluetoothOppClientEvent object finds a IBluetoothOppClientEventListener // object and calls an appropriate method of the listener. // class _BluetoothOppClientEvent : public Tizen::Base::Runtime::_Event { public: _BluetoothOppClientEvent(void); virtual ~_BluetoothOppClientEvent(void); result Construct(void); protected: /** * Checks the argument and finds out the type of event. After that, this method calls appropriate pListener's method. * * @return A result code. * @param[in] pListener An event listener related to this Bluetooth OPP Client event. * @param[in] arg An event argument including information to be passed to the event listeners * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The argument passed to a method contains invalid values. * @exception E_SYSTEM A system error occurred. */ virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); private: _BluetoothOppClientEvent(const _BluetoothOppClientEvent& value); _BluetoothOppClientEvent& operator =(const _BluetoothOppClientEvent& rhs); private: bool __isServerEvent; }; // _BluetoothOppClientEvent } } } #endif // _FNET_BT_INTERNAL_BLUETOOTH_OPP_CLIENT_EVENT_H_