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.
19 #ifndef _NFCADAPTER_H_
20 #define _NFCADAPTER_H_
22 #include <dpl/shared_ptr.h>
23 #include <Commons/Emitters.h>
25 #include <API/NFC/INFCAdapter.h>
26 #include <API/NFC/NFCFactory.h>
27 #include <API/NFC/EventNFCChanged.h>
28 #include <API/NFC/TagFilter.h>
30 using namespace TizenApis::Api::NFC;
35 class NFCAdapter : public INFCAdapter
37 friend class NFCFactory;
40 virtual ~NFCAdapter();
46 virtual int setTagListener(const EventNFCChangedEmitterPtr& emitter, TagFilterPtr filter, void *managerPriv);
47 virtual int setPeerListener(const EventNFCChangedEmitterPtr& emitter, void *managerPriv);
51 virtual void unsetTagListener();
52 virtual void unsetPeerListener();
54 void NFCHasDetected(void *props, EventNFCType type);
56 virtual void *getCachedMessage();
57 virtual bool isValidHandle(void * handle);
58 void updateCurrentHandle(void *handle);
61 virtual bool getPowerState();
62 virtual void setPowered(const EventNFCChangedSetPoweredPtr& event);
63 void setPoweredManualAnswer(int error);
65 virtual void deinitialze();
72 EventNFCChangedEmitterPtr m_NFCTagEmitterPtr;
73 EventNFCChangedEmitterPtr m_NFCTargetEmitterPtr;
74 EventNFCChangedSetPoweredPtr m_EventNFCChangedSetPoweredPtr;
75 TagFilterPtr m_tagFilter;
79 virtual void OnRequestReceived(const EventNFCChangedSetPoweredPtr& event);
85 #endif /* _NFCADAPTER_H_ */