2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #ifndef WRTPLUGINS_API_NFC_EVENT_NFC_CHANGED_H_
19 #define WRTPLUGINS_API_NFC_EVENT_NFC_CHANGED_H_
22 #include <dpl/shared_ptr.h>
23 #include <Commons/ListenerEvent.h>
24 #include <Commons/ListenerEventEmitter.h>
45 class EventNFCChanged : public WrtDeviceApis::Commons::ListenerEvent<EventNFCChanged>
50 EventNFCStatus m_status;
52 void *getNFCProperties() { return m_props; }
53 void setNFCProperties(void *props) { m_props = props; }
54 EventNFCType getNFCType() const {return m_type;}
55 void setNFCType(const EventNFCType type) {m_type = type;}
56 EventNFCStatus getNFCStatus() const {return m_status;}
57 void setNFCStatus(const EventNFCStatus type) {m_status = type;}
60 class EventNFCChangedSetPowered : public EventNFCTemplate<EventNFCChangedSetPowered>
65 bool getState() {return powerState;}
66 EventNFCChangedSetPowered(bool state): powerState(state) { }
69 class EventNFCSetCardEmulation : public EventNFCTemplate<EventNFCSetCardEmulation>
72 EventNFCSEType seType;
74 EventNFCSEType getSEType() {return seType;}
75 EventNFCSetCardEmulation(EventNFCSEType type): seType(type) { }
78 class EventNFCChangedCardEmulation : public WrtDeviceApis::Commons::ListenerEvent<EventNFCChangedCardEmulation>
81 EventNFCSEType seType;
83 EventNFCSEType getSEType() {return seType;}
84 void setSEType(EventNFCSEType type) {seType = type;}
85 EventNFCChangedCardEmulation():seType(NFC_SE_NONE) { }
88 typedef DPL::SharedPtr<EventNFCChanged> EventNFCChangedPtr;
89 typedef WrtDeviceApis::Commons::ListenerEventEmitter<EventNFCChanged> EventNFCChangedEmitter;
90 typedef DPL::SharedPtr<EventNFCChangedEmitter> EventNFCChangedEmitterPtr;
91 typedef DPL::SharedPtr<EventNFCChangedSetPowered> EventNFCChangedSetPoweredPtr;
92 typedef DPL::SharedPtr<EventNFCSetCardEmulation> EventNFCSetCardEmulationPtr;
93 typedef DPL::SharedPtr<EventNFCChangedCardEmulation> EventNFCChangedCardEmulationPtr;
94 typedef WrtDeviceApis::Commons::ListenerEventEmitter<EventNFCChangedCardEmulation> EventNFCChangedCardEmulationEmitter;
95 typedef DPL::SharedPtr<EventNFCChangedCardEmulationEmitter> EventNFCChangedCardEmulationEmitterPtr;
99 #endif //WRTPLUGINS_API_NFC_EVENT_NFC_CHANGED_H_