From e321954cbd48a99863cb7322765c8761ee937694 Mon Sep 17 00:00:00 2001 From: HyungKyu Song Date: Fri, 15 Feb 2013 15:11:18 +0900 Subject: [PATCH] Tizen 2.0 Release --- LICENSE.Flora | 206 +++++++++++++++++++ NOTICE | 4 + description.xml | 11 + project/data/MyCard.data | 3 + project/inc/FormFactory.h | 31 +++ project/inc/MainForm.h | 66 ++++++ project/inc/MyCardForm.h | 67 +++++++ project/inc/MyCardManager.h | 36 ++++ project/inc/NfcController.h | 65 ++++++ project/inc/NfcP2pBump.h | 48 +++++ project/inc/VcardTranslator.h | 37 ++++ project/manifest.xml | 31 +++ project/res/eng-GB.xml | 5 + project/res/screen-size-normal/IDF_MAINFORM.xml | 47 +++++ project/res/screen-size-normal/IDF_MYCARDFORM.xml | 52 +++++ project/shared/data/nofile.dummy | 0 .../shared/res/screen-density-xhigh/mainmenu.png | Bin 0 -> 17581 bytes project/shared/trusted/nofile.dummy | 0 project/src/FormFactory.cpp | 60 ++++++ project/src/MainForm.cpp | 222 +++++++++++++++++++++ project/src/MyCardForm.cpp | 168 ++++++++++++++++ project/src/MyCardManager.cpp | 103 ++++++++++ project/src/NfcController.cpp | 200 +++++++++++++++++++ project/src/NfcP2pBump.cpp | 100 ++++++++++ project/src/NfcP2pBumpEntry.cpp | 56 ++++++ project/src/VcardTranslator.cpp | 129 ++++++++++++ sample.xml | 34 ++++ screenshot.png | Bin 0 -> 8873 bytes 28 files changed, 1781 insertions(+) create mode 100644 LICENSE.Flora create mode 100644 NOTICE create mode 100755 description.xml create mode 100644 project/data/MyCard.data create mode 100644 project/inc/FormFactory.h create mode 100644 project/inc/MainForm.h create mode 100644 project/inc/MyCardForm.h create mode 100644 project/inc/MyCardManager.h create mode 100644 project/inc/NfcController.h create mode 100644 project/inc/NfcP2pBump.h create mode 100644 project/inc/VcardTranslator.h create mode 100644 project/manifest.xml create mode 100644 project/res/eng-GB.xml create mode 100644 project/res/screen-size-normal/IDF_MAINFORM.xml create mode 100644 project/res/screen-size-normal/IDF_MYCARDFORM.xml create mode 100644 project/shared/data/nofile.dummy create mode 100644 project/shared/res/screen-density-xhigh/mainmenu.png create mode 100644 project/shared/trusted/nofile.dummy create mode 100644 project/src/FormFactory.cpp create mode 100644 project/src/MainForm.cpp create mode 100644 project/src/MyCardForm.cpp create mode 100644 project/src/MyCardManager.cpp create mode 100644 project/src/NfcController.cpp create mode 100644 project/src/NfcP2pBump.cpp create mode 100644 project/src/NfcP2pBumpEntry.cpp create mode 100644 project/src/VcardTranslator.cpp create mode 100755 sample.xml create mode 100644 screenshot.png diff --git a/LICENSE.Flora b/LICENSE.Flora new file mode 100644 index 0000000..9c95663 --- /dev/null +++ b/LICENSE.Flora @@ -0,0 +1,206 @@ +Flora License + +Version 1.0, May, 2012 + +http://floralicense.org/license/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and +all other entities that control, are controlled by, or are +under common control with that entity. For the purposes of +this definition, "control" means (i) the power, direct or indirect, +to cause the direction or management of such entity, +whether by contract or otherwise, or (ii) ownership of fifty percent (50%) +or more of the outstanding shares, or (iii) beneficial ownership of +such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided +in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, +as a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, +or merely link (or bind by name) to the interfaces of, the Work and +Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor +for inclusion in the Work by the copyright owner or by an individual or +Legal Entity authorized to submit on behalf of the copyright owner. +For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or +its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue +tracking systems that are managed by, or on behalf of, the Licensor +for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated +in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +"Tizen Certified Platform" shall mean a software platform that complies +with the standards set forth in the Compatibility Definition Document +and passes the Compatibility Test Suite as defined from time to time +by the Tizen Technical Steering Group and certified by the Tizen +Association or its designated agent. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work +solely as incorporated into a Tizen Certified Platform, where such +license applies only to those patent claims licensable by such +Contributor that are necessarily infringed by their Contribution(s) +alone or by combination of their Contribution(s) with the Work solely +as incorporated into a Tizen Certified Platform to which such +Contribution(s) was submitted. If You institute patent litigation +against any entity (including a cross-claim or counterclaim +in a lawsuit) alleging that the Work or a Contribution incorporated +within the Work constitutes direct or contributory patent infringement, +then any patent licenses granted to You under this License for that +Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof pursuant to the copyright license +above, in any medium, with or without modifications, and in Source or +Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works + a copy of this License; and + 2. You must cause any modified files to carry prominent notices stating + that You changed the files; and + 3. You must retain, in the Source form of any Derivative Works that + You distribute, all copyright, patent, trademark, and attribution + notices from the Source form of the Work, excluding those notices + that do not pertain to any part of the Derivative Works; and + 4. If the Work includes a "NOTICE" text file as part of its distribution, + then any Derivative Works that You distribute must include a readable + copy of the attribution notices contained within such NOTICE file, + excluding those notices that do not pertain to any part of + the Derivative Works, in at least one of the following places: + within a NOTICE text file distributed as part of the Derivative Works; + within the Source form or documentation, if provided along with the + Derivative Works; or, within a display generated by the Derivative Works, + if and wherever such third-party notices normally appear. + The contents of the NOTICE file are for informational purposes only + and do not modify the License. + +You may add Your own attribution notices within Derivative Works +that You distribute, alongside or as an addendum to the NOTICE text +from the Work, provided that such additional attribution notices +cannot be construed as modifying the License. You may add Your own +copyright statement to Your modifications and may provide additional or +different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works +as a whole, provided Your use, reproduction, and distribution of +the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Flora License to your work + +To apply the Flora License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets "[]" +replaced with your own identifying information. (Don't include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same "printed page" as the copyright notice for easier +identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Flora License, Version 1.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://floralicense.org/license/ + + 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. + diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..3997999 --- /dev/null +++ b/NOTICE @@ -0,0 +1,4 @@ +Copyright (c) Samsung Electronics Co., Ltd. All rights reserved. +Except as noted, this software is licensed under Flora License, Version 1. +Please, see the LICENSE file for Flora License terms and conditions. + diff --git a/description.xml b/description.xml new file mode 100755 index 0000000..201b94c --- /dev/null +++ b/description.xml @@ -0,0 +1,11 @@ + + + + + NfcP2pBump + 1.0 + screenshot.png + +This sample application demonstrates how you can use the Near Field Communication (NFC) P2P service. + + diff --git a/project/data/MyCard.data b/project/data/MyCard.data new file mode 100644 index 0000000..5657a08 --- /dev/null +++ b/project/data/MyCard.data @@ -0,0 +1,3 @@ +Unknown +Unknown +Unknown \ No newline at end of file diff --git a/project/inc/FormFactory.h b/project/inc/FormFactory.h new file mode 100644 index 0000000..294854a --- /dev/null +++ b/project/inc/FormFactory.h @@ -0,0 +1,31 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#ifndef FORMFACTORY_H_ +#define FORMFACTORY_H_ + +#include + +class FormFactory: public Tizen::Ui::Scenes::IFormFactory { +public: + FormFactory(); + virtual ~FormFactory(); + + virtual Tizen::Ui::Controls::Form* CreateFormN(const Tizen::Base::String &formId, const Tizen::Ui::Scenes::SceneId &sceneId); +}; + +#endif /* FORMFACTORY_H_ */ diff --git a/project/inc/MainForm.h b/project/inc/MainForm.h new file mode 100644 index 0000000..c5bfdee --- /dev/null +++ b/project/inc/MainForm.h @@ -0,0 +1,66 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#ifndef _MAIN_FORM_H_ +#define _MAIN_FORM_H_ + +#include +#include +#include +#include "MyCardForm.h" +#include "NfcController.h" + +class MainForm + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ + +public: + MainForm(void); + virtual ~MainForm(void); + bool Initialize(void); + +public: + // from Form + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // from IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + void ChangeActivationButton(bool isActivate); + void ShowNameCard(const Tizen::Base::String& name, const Tizen::Base::String& number, const Tizen::Base::String& address); + +protected: + static const int ID_ACTIVATE = 101; + static const int ID_MY_CARD = 102; + static const int ID_DELETE_CARD = 103; + static const int MSGBOX_TIMEOUT = 2000; + +private: + Tizen::Ui::Controls::FooterItem __leftFooterItem; + Tizen::Ui::Controls::FooterItem __rightFooterItem; + Tizen::Ui::Controls::Label* __pCardStatus; + Tizen::Ui::Controls::EditField* __pNameField; + Tizen::Ui::Controls::EditField* __pNumberField; + Tizen::Ui::Controls::EditField* __pAddressField; + Tizen::Ui::Controls::Button* __pDeleteNameCard; + + NfcController __nfcController; +}; + +#endif //_MAIN_FORM_H_ diff --git a/project/inc/MyCardForm.h b/project/inc/MyCardForm.h new file mode 100644 index 0000000..0217260 --- /dev/null +++ b/project/inc/MyCardForm.h @@ -0,0 +1,67 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#ifndef _WRITE_FORM_H_ +#define _WRITE_FORM_H_ + +#include +#include +#include "MyCardManager.h" +#include "NfcController.h" + +class MyCardForm + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Scenes::ISceneEventListener +{ + +public: + MyCardForm(void); + virtual ~MyCardForm(void); + + bool Initialize(void); + // from Form + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // from IActionEventListener + virtual void OnActionPerformed(const Control& source, int actionId); + + // from IFormBackEventListener + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + // from ISceneEventListener + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + +protected: + static const int ID_SAVE = 501; + static const int MSGBOX_TIMEOUT = 2000; + +private: + Tizen::Ui::Controls::EditField* __pNameField; + Tizen::Ui::Controls::EditField* __pPhoneNumberField; + Tizen::Ui::Controls::EditField* __pEmailAddressField; + Tizen::Ui::Controls::FooterItem __leftFooterItem; + + NfcController* __pNfcController; +}; + +#endif diff --git a/project/inc/MyCardManager.h b/project/inc/MyCardManager.h new file mode 100644 index 0000000..c0630d4 --- /dev/null +++ b/project/inc/MyCardManager.h @@ -0,0 +1,36 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#ifndef _MY_CARD_MANAGER_H_ +#define _MY_CARD_MANAGER_H_ + +#include + +class MyCardManager +{ +public: + static result ReadNameCardFromFile(Tizen::Base::String& name, Tizen::Base::String& number, + Tizen::Base::String& address); + static result WriteNameCardToFile(const Tizen::Base::String& name, const Tizen::Base::String& number, + const Tizen::Base::String& address); + +private: + MyCardManager(void); + ~MyCardManager(void); +}; + +#endif // _MY_CARD_MANAGER_H_ diff --git a/project/inc/NfcController.h b/project/inc/NfcController.h new file mode 100644 index 0000000..f7cb035 --- /dev/null +++ b/project/inc/NfcController.h @@ -0,0 +1,65 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#ifndef _NFC_CONTROLLER_H_ +#define _NFC_CONTROLLER_H_ + +#include +#include + +class MainForm; + +class NfcController + : public Tizen::Base::Object + , public Tizen::Net::Nfc::INfcManagerEventListener + , public Tizen::Net::Nfc::INdefMessageDiscoveryEventListener + , public Tizen::Net::Nfc::INdefPushManagerListener + , public Tizen::Net::Nfc::INfcDeviceDiscoveryEventListener +{ +public: + NfcController(MainForm* pMainForm); + ~NfcController(void); + + bool Initialize(void); + void ToggleNfcActivation(void); + void RegisterPushMessage(const Tizen::Base::String& name, const Tizen::Base::String& number, const Tizen::Base::String& address); + void UnregisterPushMessage(void); + bool IsNfcActivated(void); + + //from INfcManagerEventListener + virtual void OnNfcActivated(result r); + virtual void OnNfcDeactivated(result r); + + //from INdefMessageDiscoveryEventListener + virtual void OnNdefMessageDetectedN(Tizen::Net::Nfc::NdefMessage* pMessage); + + //from INdefPushManagerListener + virtual void OnNdefPushMessageSent(result r); + + //INfcDeviceDiscoveryEventListener + virtual void OnNfcDeviceDetected(void); + virtual void OnNfcDeviceLost(void); + +private: + MainForm* __pMainForm; + Tizen::Net::Nfc::NfcManager* __pNfcManager; + Tizen::Net::Nfc::NdefPushManager* __pNdefPushManager; + + MyCardManager* __pMyCardManager; +}; + +#endif // _NFC_CONTROLLER_H_ diff --git a/project/inc/NfcP2pBump.h b/project/inc/NfcP2pBump.h new file mode 100644 index 0000000..e2dc76d --- /dev/null +++ b/project/inc/NfcP2pBump.h @@ -0,0 +1,48 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#ifndef _NFC_P2P_BUMP_H_ +#define _NFC_P2P_BUMP_H_ + +#include +#include +#include +#include + +class NfcP2pBump + : public Tizen::App::Application + , public Tizen::System::IScreenEventListener +{ +public: + static Tizen::App::Application* CreateInstance(void); + +public: + NfcP2pBump(void); + ~NfcP2pBump(void); + +public: + virtual bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry); + virtual bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false); + virtual void OnForeground(void); + virtual void OnBackground(void); + virtual void OnLowMemory(void); + virtual void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel); + virtual void OnScreenOn(void); + virtual void OnScreenOff(void); +}; + +#endif diff --git a/project/inc/VcardTranslator.h b/project/inc/VcardTranslator.h new file mode 100644 index 0000000..6539ad1 --- /dev/null +++ b/project/inc/VcardTranslator.h @@ -0,0 +1,37 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#ifndef _VCARD_TRANSLATOR_H_ +#define _VCARD_TRANSLATOR_H_ + +#include +#include + +class VcardTranslator +{ +public: + static Tizen::Net::Nfc::NdefMessage* ConvertStringToVcardN(const Tizen::Base::String& name, const Tizen::Base::String& number, + const Tizen::Base::String& address); + static result ConvertVcardToString(const Tizen::Net::Nfc::NdefMessage* pMsg,Tizen::Base::String& name, Tizen::Base::String& number, + Tizen::Base::String& address); + +private: + VcardTranslator(); + ~VcardTranslator(); +}; + +#endif // _VCARD_TRANSLATOR_H_ diff --git a/project/manifest.xml b/project/manifest.xml new file mode 100644 index 0000000..54b851b --- /dev/null +++ b/project/manifest.xml @@ -0,0 +1,31 @@ + + + $(manifestAppId) + 2.0.0 + C++App + + + + + 2.0 + + http://tizen.org/privilege/nfc.tag + http://tizen.org/privilege/nfc.common + http://tizen.org/privilege/nfc.p2p + http://tizen.org/privilege/nfc.admin + + + + + + $(projectName) + + + mainmenu.png + + + + + + + diff --git a/project/res/eng-GB.xml b/project/res/eng-GB.xml new file mode 100644 index 0000000..8a33d58 --- /dev/null +++ b/project/res/eng-GB.xml @@ -0,0 +1,5 @@ + + + diff --git a/project/res/screen-size-normal/IDF_MAINFORM.xml b/project/res/screen-size-normal/IDF_MAINFORM.xml new file mode 100644 index 0000000..046d5d5 --- /dev/null +++ b/project/res/screen-size-normal/IDF_MAINFORM.xml @@ -0,0 +1,47 @@ + + + + + + 480 +
+ + + + +
+ + +
+
+ + +
+ + + + + + + + + + + + + + + + + +
diff --git a/project/res/screen-size-normal/IDF_MYCARDFORM.xml b/project/res/screen-size-normal/IDF_MYCARDFORM.xml new file mode 100644 index 0000000..2f45ecd --- /dev/null +++ b/project/res/screen-size-normal/IDF_MYCARDFORM.xml @@ -0,0 +1,52 @@ + + + + + + 480 +
+ + + + +
+ + +
+
+ + +
+ + + + + + + + + + + + + + + + + + +
diff --git a/project/shared/data/nofile.dummy b/project/shared/data/nofile.dummy new file mode 100644 index 0000000..e69de29 diff --git a/project/shared/res/screen-density-xhigh/mainmenu.png b/project/shared/res/screen-density-xhigh/mainmenu.png new file mode 100644 index 0000000000000000000000000000000000000000..983c883493a0ae561b9592d54ea8204042b4b6fb GIT binary patch literal 17581 zcmWh!1yCGI6g=ErgFA=2yL<2e!JP!R;O-JMxI=K4;O-JEK!D(SxV!%SRdZ|=vb!_$ zrr+!CN0iz}IW%MGn)_u zLRS4EC8efjQ%n4@*V{mUuKj5+*J#Fcwdp88sSt31OGAFfODhGJ5=Z z%cscpZ|D8~saqJr4fBf}U#us$G@QEF;WP-q4S zSN2Lr_>!px6T%3rR7Qhv8;yWWkUk=dGlGr|D;ao7fq)5@*A&_`Q=GNmE8_!a5I4r= z^=}X;KM@a@?e(kY6nf3n6mMKJx-rX95Bxionc2?U-gKptI0&@m=0E$!%+^R0CHoEnDM)BrUf$c?T~ZvB)Hfa1@q4rGH}2JW zwR`jze!0Kh?B1pc;xr7BgMHZS|9zueOfsE>6l%7*A20XPg7W@CI!86AVAiI~h`XbX z?Hnha8GFrHOcf=W#4tqr=iOp^gZUXobb|*}_f-_iCy}Mh&>ZGYi5^qet#|t#1iI>Q z?3)K8!UWocY)yN-pNqZ9<j{#e|_MSP~pQSx3rf!Zt5X%H6AO6Q1mZ&f2ftiZ0@W z@nnja+XwCpLV}eTMZ__s{1*vj7OhJihe(hS_CVPu4~rc`LopVKt4^hq$Rp385v@g` zEl+wS;sPxYVIbR{C^QP<41Njkl;ijj)SxahkNQiht&EQ-RJIUh#=?ywGaf%bYsRIC zNFh*?gj&stUDon5gbk6--Cet@(7l z2P}4wOfM2ItcN6pDVc=4uCngOCHXQ65*lu-e@J{tFrn)G^i;`ZN=Dv;Z73zO#{lWet`^Q0p`jELii(8(EI(h7$g>3_Z zzz=2$rqQt7oZW$4u3h3?$}4^395Zp}pAVYbV2$ywiXZkc_qg}qEz>zAw2Lw|*2)UB zuz2D>OI8;&Yt*Vol;Lo@X9`S);43HoP|zv7i2WuTk)N1Ih!cQa{!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ace Tizen::Ui::Scenes; + +FormFactory::FormFactory() +{ + +} + +FormFactory::~FormFactory() +{ + +} + +Form* +FormFactory::CreateFormN(const Tizen::Base::String &formId, const Tizen::Ui::Scenes::SceneId &sceneId) +{ + Form* pNewForm = null; + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + + if (formId == L"MainForm") + { + MainForm* pForm = new (std::nothrow) MainForm(); + pForm->Initialize(); + pNewForm = pForm; + } + else if (formId == L"MyCardForm") + { + MyCardForm* pForm = new (std::nothrow) MyCardForm(); + pForm->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pForm); + pNewForm = pForm; + } + + return pNewForm; +} + + diff --git a/project/src/MainForm.cpp b/project/src/MainForm.cpp new file mode 100644 index 0000000..c43efd0 --- /dev/null +++ b/project/src/MainForm.cpp @@ -0,0 +1,222 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#include +#include +#include +#include "NfcP2pBump.h" +#include "MainForm.h" +#include "MyCardManager.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; +using namespace Tizen::App; +using namespace Tizen::Net::Nfc; +using namespace Tizen::Graphics; + +MainForm::MainForm(void) + : __leftFooterItem() + , __rightFooterItem() + , __pCardStatus(null) + , __pNameField(null) + , __pNumberField(null) + , __pAddressField(null) + , __pDeleteNameCard(null) + , __nfcController(this) +{ + +} + +MainForm::~MainForm(void) +{ + +} + +bool +MainForm::Initialize(void) +{ + bool result = false; + + Construct(L"IDF_MAINFORM"); + + result = __nfcController.Initialize(); + TryReturn(result == true, false, "Nfc resources are not available."); + + return true; +} + +result +MainForm::OnInitializing(void) +{ + result r = E_SUCCESS; + + __pCardStatus = static_cast< Label* >(GetControl(L"IDC_CARD_STATUS")); + __pCardStatus->SetTextConfig(30, LABEL_TEXT_STYLE_BOLD); + __pCardStatus->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pCardStatus->SetTextColor(Tizen::Graphics::Color::GetColor(COLOR_ID_BLACK)); + __pCardStatus->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pCardStatus->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + __pCardStatus->SetText(L"Bump to share name card"); + + __pNameField = static_cast< EditField* >(GetControl(L"IDC_NAME_FIELD")); + __pNameField->SetShowState(false); + __pNumberField = static_cast< EditField* >(GetControl(L"IDC_NUMBER_FIELD")); + __pNumberField->SetShowState(false); + __pAddressField = static_cast< EditField* >(GetControl(L"IDC_ADDRESS_FIELD")); + __pAddressField->SetShowState(false); + + __pDeleteNameCard = static_cast< Button* >(GetControl(L"IDC_BUTTON1")); + __pDeleteNameCard->SetText(L"Delete"); + __pDeleteNameCard->SetActionId(ID_DELETE_CARD); + __pDeleteNameCard->SetTextColor(Tizen::Graphics::Color::GetColor(COLOR_ID_RED)); + __pDeleteNameCard->SetShowState(false); + __pDeleteNameCard->AddActionEventListener(*this); + + Footer* pFooter = GetFooter(); + if (pFooter != null) + { + pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT); + r = __leftFooterItem.Construct(ID_ACTIVATE); + + //Find whether NFC is active or not. + if (__nfcController.IsNfcActivated() == true) + { + r = __leftFooterItem.SetText("Deactivate"); + } + else + { + r = __leftFooterItem.SetText("Activate"); + } + r = pFooter->AddItem(__leftFooterItem); + r = __rightFooterItem.Construct(ID_MY_CARD); + r = __rightFooterItem.SetText("My Card"); + r = pFooter->AddItem(__rightFooterItem); + pFooter->AddActionEventListener(*this); + } + //Disables the launch popup message by Conditional NFC App Launch. + NfcManager::SetLaunchPopupEnabled(false); + + return r; +} + +result +MainForm::OnTerminating(void) +{ + result r = E_SUCCESS; + + return r; +} +void +MainForm::ShowNameCard(const Tizen::Base::String& name, const Tizen::Base::String& number, const Tizen::Base::String& address) +{ + __pCardStatus->SetShowState(false); + + __pNameField->SetTitleText("Name"); + __pNameField->SetText(name); + __pNameField->SetShowState(true); + + __pNumberField->SetTitleText("Phone number"); + __pNumberField->SetText(number); + __pNumberField->SetShowState(true); + + __pAddressField->SetTitleText("e-mail address"); + __pAddressField->SetText(address); + __pAddressField->SetShowState(true); + + __pDeleteNameCard->SetShowState(true); + + RequestRedraw(); +} + +void +MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) +{ + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + ArrayList* pParams = null; + pParams = new (std::nothrow) ArrayList(); + + switch (actionId) + { + case ID_ACTIVATE: + __nfcController.ToggleNfcActivation(); + break; + + case ID_MY_CARD: + //Go to MyCard scene + AppLog("MyCard Button Clicked"); + pParams->Add(__nfcController); + pSceneManager->GoForward(ForwardSceneTransition(L"MyCardScene"), pParams); + + break; + + case ID_DELETE_CARD: + AppLog("Delete Button Clicked"); + __pCardStatus->SetShowState(true); + __pNameField->SetShowState(false); + __pNumberField->SetShowState(false); + __pAddressField->SetShowState(false); + __pDeleteNameCard->SetShowState(false); + + RequestRedraw(); + break; + + default: + break; + } +} +void +MainForm::ChangeActivationButton(bool isActivate) +{ + Footer* pFooter = GetFooter(); + MessageBox messageBox; + int modalResult = 0; + + //Change the text of left footer item when NFC state is changed. + if (isActivate) + { + AppLog("NFC Activated"); + __leftFooterItem.SetText("Deactivate"); + if (pFooter != null) + { + pFooter->RemoveItemAt(0); + pFooter->InsertItemAt(0, __leftFooterItem); + RequestRedraw(); + } + messageBox.Construct(L"NFC Activate", L"NFC Successfully\n Activated.", MSGBOX_STYLE_NONE, MSGBOX_TIMEOUT); + // Call ShowAndWait - draw, show itself and process events + messageBox.ShowAndWait(modalResult); + } + else + { + AppLog("NFC Deactivated"); + __leftFooterItem.SetText("Activate"); + if (pFooter != null) + { + pFooter->RemoveItemAt(0); + pFooter->InsertItemAt(0, __leftFooterItem); + RequestRedraw(); + } + messageBox.Construct(L"NFC Deactivate", L"NFC Successfully\n Deactivated.", MSGBOX_STYLE_NONE, MSGBOX_TIMEOUT); + // Call ShowAndWait - draw, show itself and process events + messageBox.ShowAndWait(modalResult); + } +} diff --git a/project/src/MyCardForm.cpp b/project/src/MyCardForm.cpp new file mode 100644 index 0000000..acd23ef --- /dev/null +++ b/project/src/MyCardForm.cpp @@ -0,0 +1,168 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#include +#include "MyCardForm.h" +#include "MyCardManager.h" +#include +#include +#include + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; +using namespace Tizen::App; +using namespace Tizen::Graphics; +using namespace Tizen::Text; + +MyCardForm::MyCardForm(void) + : __pNameField(null) + , __pPhoneNumberField(null) + , __pEmailAddressField(null) + , __leftFooterItem() + , __pNfcController(null) +{ + +} + +MyCardForm::~MyCardForm(void) +{ + +} + +bool +MyCardForm::Initialize(void) +{ + Form::Construct(L"IDF_MYCARDFORM"); + + return true; +} + +result +MyCardForm::OnInitializing(void) +{ + String myName; + String myPhoneNumber; + String myEmailAddress; + result r = E_SUCCESS; + + SetName(L"MyCardForm"); + + r = MyCardManager::ReadNameCardFromFile(myName, myPhoneNumber, myEmailAddress); + TryReturn(r == E_SUCCESS, r, "[%s] Failed to read namecard from file.", GetErrorMessage(r)); + + //Get handle of edit field, and set text by name of user. + __pNameField = static_cast(GetControl(L"IDC_EDITFIELD1")); + TryReturn(__pNameField != null, r = E_FAILURE, "getting handle to edit filed __pNameField failed by %s.", GetErrorMessage(r)); + __pNameField->SetText(myName); + + //Get handle of edit field, and set text by phone number of user. + __pPhoneNumberField = static_cast(GetControl(L"IDC_EDITFIELD2")); + TryReturn(__pPhoneNumberField != null, r = E_FAILURE, "getting handle to edit filed __pPhoneNumberField failed by %s.", GetErrorMessage(r)); + __pPhoneNumberField->SetText(myPhoneNumber); + + //Get handle of edit field, and set text by e-mail address of user. + __pEmailAddressField = static_cast(GetControl(L"IDC_EDITFIELD3")); + TryReturn(__pEmailAddressField != null, r = E_FAILURE, "getting handle to edit filed __pEmailAddressField failed by %s.", GetErrorMessage(r)); + __pEmailAddressField->SetText(myEmailAddress); + + Footer* pFooter = GetFooter(); + if (pFooter != null) + { + pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT); + r = __leftFooterItem.Construct(ID_SAVE); + r = __leftFooterItem.SetText("Save"); + r = pFooter->AddItem(__leftFooterItem); + + pFooter->SetBackButton(); + SetFormBackEventListener(this); + pFooter->AddActionEventListener(*this); + } + + return r; +} + +result +MyCardForm::OnTerminating(void) +{ + result r = E_SUCCESS; + + // TODO: Add your termination code here + + return r; +} + +void +MyCardForm::OnActionPerformed(const Control& source, int actionId) +{ + MessageBox messageBox; + result r = E_SUCCESS; + int modalResult = 0; + + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + ArrayList* pParams = null; + pParams = new (std::nothrow) ArrayList(); + + switch (actionId) + { + case ID_SAVE: + AppLog("Save Button Pressed"); + r = MyCardManager::WriteNameCardToFile(__pNameField->GetText(), __pPhoneNumberField->GetText(), __pEmailAddressField->GetText()); + TryReturnVoid(r == E_SUCCESS, "[%s] Failed to write namecard to file.",GetErrorMessage(r)); + + messageBox.Construct(L"My Card", L"Save success", MSGBOX_STYLE_NONE, MSGBOX_TIMEOUT); + messageBox.ShowAndWait(modalResult); + + //Register push message when save button is pressed + __pNfcController->RegisterPushMessage(__pNameField->GetText(), __pPhoneNumberField->GetText(), __pEmailAddressField->GetText()); + pSceneManager->GoBackward(BackwardSceneTransition()); + break; + + default: + break; + } +} + +void +MyCardForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs) +{ + if(pArgs) + { + __pNfcController = (NfcController*)pArgs->GetAt(0); + + delete pArgs; + } +} + +void +MyCardForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId) +{ + +} + +void +MyCardForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source) +{ + //Go to Main scene when back button is clicked + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoBackward(BackwardSceneTransition()); +} diff --git a/project/src/MyCardManager.cpp b/project/src/MyCardManager.cpp new file mode 100644 index 0000000..2b4ed65 --- /dev/null +++ b/project/src/MyCardManager.cpp @@ -0,0 +1,103 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#include +#include +#include +#include "MyCardManager.h" + +using namespace Tizen::Base; +using namespace Tizen::App; +using namespace Tizen::Io; + +const wchar_t* NFC_BUMP_MY_CARD_INFO_PATH = L"data/MyCard.data"; + +MyCardManager::MyCardManager(void) + +{ + +} + +MyCardManager::~MyCardManager(void) +{ + +} + +result +MyCardManager::ReadNameCardFromFile(Tizen::Base::String& name, Tizen::Base::String& number, Tizen::Base::String& address) +{ + File file; + String buffer; + int length; + result r = E_SUCCESS; + + r = file.Construct(App::GetInstance()->GetAppRootPath() + NFC_BUMP_MY_CARD_INFO_PATH, "r", false); + TryReturn(r == E_SUCCESS, r, "Failed to open the file."); + + r = file.Seek(FILESEEKPOSITION_BEGIN, 0); + TryReturn(r == E_SUCCESS, r, "Failed to repositions the file pointer."); + + //read user's name from data file + r = file.Read(buffer); + TryReturn(r == E_SUCCESS, r, "Failed to read my name from file."); + + length = buffer.GetLength(); + buffer.SubString(0, length - 1, name); + buffer.Clear(); + + //read user's phone number from data file + r = file.Read(buffer); + TryReturn(r == E_SUCCESS, r, "Failed to read my phone number from file."); + + length = buffer.GetLength(); + buffer.SubString(0, length - 1, number); + buffer.Clear(); + + //read user's e-mail address from data file + r = file.Read(buffer); + TryReturn(r == E_SUCCESS, r, "Failed to read my e-mail address from file."); + + length = buffer.GetLength(); + buffer.SubString(0, length, address); + + return r; +} + +result +MyCardManager::WriteNameCardToFile(const Tizen::Base::String& name, const Tizen::Base::String& number, + const Tizen::Base::String& address) +{ + File file; + result r = E_SUCCESS; + + r = file.Construct(App::GetInstance()->GetAppRootPath() + NFC_BUMP_MY_CARD_INFO_PATH, "w", false); + TryReturn(r == E_SUCCESS, r, "Failed to open the file."); + + r = file.Seek(FILESEEKPOSITION_BEGIN, 0); + TryReturn(r == E_SUCCESS, r, "Failed to repositions the file pointer."); + + r = file.Write(name + "\n"); + TryReturn(r == E_SUCCESS, r, "Failed to write my name to file."); + + r = file.Write(number + "\n"); + TryReturn(r == E_SUCCESS, r, "Failed to write my phone number to file."); + + r = file.Write(address); + TryReturn(r == E_SUCCESS, r, "Failed to write my e-mail address to file."); + + return r; +} diff --git a/project/src/NfcController.cpp b/project/src/NfcController.cpp new file mode 100644 index 0000000..b9e3e2e --- /dev/null +++ b/project/src/NfcController.cpp @@ -0,0 +1,200 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#include +#include "MainForm.h" +#include "NfcController.h" +#include "MyCardManager.h" +#include "VcardTranslator.h" +#include + +using namespace Tizen::Base; +using namespace Tizen::App; +using namespace Tizen::Net::Nfc; + +NfcController::NfcController(MainForm* pMainForm) + : __pMainForm(pMainForm) + , __pNfcManager(null) + , __pNdefPushManager(null) +{ + +} + +NfcController::~NfcController(void) +{ + delete __pNfcManager; + delete __pNdefPushManager; +} + +bool +NfcController::Initialize(void) +{ + result r = E_SUCCESS; + + //initialize the instance of NfcManager class and add listener. + __pNfcManager = new (std::nothrow) NfcManager(); + r = __pNfcManager->Construct(*this); + TryReturn(r == E_SUCCESS, false, "NfcManager::Construct() failed"); + + r = __pNfcManager->AddNdefMessageDiscoveryEventListener(*this, NdefRecordType(NDEF_TNF_ALL)); + TryReturn(r == E_SUCCESS, false, "NfcManager::AddNdefMessageDiscoveryEventListener() has failed."); + + r = __pNfcManager->AddDeviceDiscoveryEventListener(*this); + TryReturn(r == E_SUCCESS, false, "NfcManager::AddDeviceDiscoveryEventListener() has failed."); + + //initialize the instance of NfcPushManager class and set listener. + __pNdefPushManager = new (std::nothrow) NdefPushManager(); + r = __pNdefPushManager->SetNdefPushManagerListener(this); + TryReturn(r == E_SUCCESS, false, "NdefPushManager::SetNdefPushManagerListener() has failed."); + + return true; +} + +void +NfcController::ToggleNfcActivation(void) +{ + result r = E_SUCCESS; + + //check whether NFC is active or not. + if (__pNfcManager->IsActivated() == true) + { + AppLog("Deactivate Button is clicked!!"); + + //deactivate NFC when current state is activate. + r = __pNfcManager->Deactivate(); + TryReturnVoid(r == E_SUCCESS, "Failed to deactivate NFC %s", GetErrorMessage(r)); + } + else + { + AppLog("Activate Button is clicked!!"); + + //activate NFC when current state is deactivate. + r = __pNfcManager->Activate(); + TryReturnVoid(r == E_SUCCESS, "Failed to activate NFC %s", GetErrorMessage(r)); + } +} + +void +NfcController::RegisterPushMessage(const Tizen::Base::String& name, const Tizen::Base::String& number, + const Tizen::Base::String& address) +{ + NdefMessage* pMsg = VcardTranslator::ConvertStringToVcardN(name, number, address); + + //register the NDEF message and set message description + __pNdefPushManager->RegisterNdefPushMessage(*pMsg, "My Namecard"); + + pMsg->RemoveAllRecords(true); + delete pMsg; +} + +void +NfcController::UnregisterPushMessage(void) +{ + //unregister the NDEF message + __pNdefPushManager->UnregisterNdefPushMessage(); +} + +bool +NfcController::IsNfcActivated(void) +{ + //return the current NFC state. + return __pNfcManager->IsActivated(); +} + +void +NfcController::OnNdefMessageDetectedN(Tizen::Net::Nfc::NdefMessage* pMessage) +{ + String name; + String number; + String address; + result r = E_SUCCESS; + + //convert from NDEF message(contains V-Card format) to string items when NDEF message is detected. + AppLog("NDEF message detected"); + r = VcardTranslator::ConvertVcardToString(pMessage, name, number, address); + TryLog(!IsFailed(r), "Failed to translate V-card to String format."); + + if(!IsFailed(r)) + { + //show opponent's namecard information in Main scene. + __pMainForm->ShowNameCard(name, number, address); + } + pMessage->RemoveAllRecords(true); + delete pMessage; +} + +void +NfcController::OnNdefPushMessageSent(result r) +{ + AppLog("Push NDEF message was sent"); +} + +void +NfcController::OnNfcDeviceDetected(void) +{ + //convert from string items to NDEF message(contains V-Card format) when other P2P device is detected. + String name; + String number; + String address; + result r = E_SUCCESS; + + AppLog("Device detected"); + + r = MyCardManager::ReadNameCardFromFile(name, number, address); + TryReturnVoid(r == E_SUCCESS, "Failed to read namecard from file."); + + NdefMessage* pMsg = VcardTranslator::ConvertStringToVcardN(name, number, address); + + //push NDEF message to other device. + __pNdefPushManager->Push(*pMsg); + + pMsg->RemoveAllRecords(true); + delete pMsg; +} + +void +NfcController::OnNfcDeviceLost(void) +{ + AppLog("Device lost"); +} + +void +NfcController::OnNfcActivated(result r) +{ + if (IsFailed(r)) + { + AppLog("NFC Activation failed"); + } + else + { + __pMainForm->ChangeActivationButton(true); + } +} + +void +NfcController::OnNfcDeactivated(result r) +{ + if (IsFailed(r)) + { + AppLog("NFC Deactivation failed"); + } + else + { + __pMainForm->ChangeActivationButton(false); + } +} + diff --git a/project/src/NfcP2pBump.cpp b/project/src/NfcP2pBump.cpp new file mode 100644 index 0000000..1f372eb --- /dev/null +++ b/project/src/NfcP2pBump.cpp @@ -0,0 +1,100 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#include +#include "NfcP2pBump.h" +#include "MainForm.h" +#include "FormFactory.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +NfcP2pBump::NfcP2pBump() +{ +} + +NfcP2pBump::~NfcP2pBump() +{ +} + +Application* +NfcP2pBump::CreateInstance(void) +{ + return new (std::nothrow) NfcP2pBump(); +} + +bool +NfcP2pBump::OnAppInitializing(AppRegistry& appRegistry) +{ + Frame* pFrame = new Frame(); + pFrame->Construct(); + pFrame->SetName(L"NfcP2pBump"); + AddFrame(*pFrame); + + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + static FormFactory formFactory; + pSceneManager->RegisterFormFactory(formFactory); + pSceneManager->RegisterScene(L"MainScene", L"MainForm", L""); + pSceneManager->RegisterScene(L"MyCardScene", L"MyCardForm", L""); + + if (pSceneManager->GoForward(ForwardSceneTransition(L"MainScene")) != E_SUCCESS) + { + return false; + } + return true; +} + +bool +NfcP2pBump::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination) +{ + return true; +} + +void +NfcP2pBump::OnForeground(void) +{ +} + +void +NfcP2pBump::OnBackground(void) +{ +} + +void +NfcP2pBump::OnLowMemory(void) +{ +} + +void +NfcP2pBump::OnBatteryLevelChanged(BatteryLevel batteryLevel) +{ +} + +void +NfcP2pBump::OnScreenOn(void) +{ +} + +void +NfcP2pBump::OnScreenOff(void) +{ +} diff --git a/project/src/NfcP2pBumpEntry.cpp b/project/src/NfcP2pBumpEntry.cpp new file mode 100644 index 0000000..c164db8 --- /dev/null +++ b/project/src/NfcP2pBumpEntry.cpp @@ -0,0 +1,56 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#include "NfcP2pBump.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +_EXPORT_ int OspMain(int argc, char *pArgv[]); + +/** + * The entry function of Tizen application called by the operating system. + */ +int +OspMain(int argc, char* pArgv[]) +{ + result r = E_SUCCESS; + + AppLog("Application started."); + ArrayList args; + args.Construct(); + for (int i = 0; i < argc; i++) + { + args.Add(*(new (std::nothrow) String(pArgv[i]))); + } + + r = Tizen::App::Application::Execute(NfcP2pBump::CreateInstance, &args); + TryLog(!IsFailed(r), "Application execution failed-[%s].", GetErrorMessage(r)); + + args.RemoveAll(true); + AppLog("Application finished."); + + return static_cast< int >(r); +} +#ifdef __cplusplus +} +#endif // __cplusplus diff --git a/project/src/VcardTranslator.cpp b/project/src/VcardTranslator.cpp new file mode 100644 index 0000000..ec2e36c --- /dev/null +++ b/project/src/VcardTranslator.cpp @@ -0,0 +1,129 @@ +// +// Tizen Native SDK +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.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://floralicense.org/license/ +// +// 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. +// + +#include +#include "VcardTranslator.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::App; +using namespace Tizen::Net::Nfc; + +VcardTranslator::VcardTranslator(void) +{ +} + +VcardTranslator::~VcardTranslator(void) +{ +} + +NdefMessage* +VcardTranslator::ConvertStringToVcardN(const Tizen::Base::String& name, const Tizen::Base::String& number, + const Tizen::Base::String& address) +{ + String strPayload; + + strPayload += L"BEGIN:VCARD\nVERSION:2.1\nFN:" + name + "\nTEL;CELL:" + number + "\nEMAIL;PREF;INTERNET:" + + address + "\nEND:VCARD\n"; + + ByteBuffer* pPayload = Tizen::Base::Utility::StringUtil::StringToUtf8N(strPayload); + + NdefMessage* pMsg = new (std::nothrow) NdefMessage(); + NdefRecordType recordType(NDEF_TNF_MIME_MEDIA); + recordType.SetName(L"text/x-vCard"); + NdefRecord* pRecord = new (std::nothrow) NdefRecord(recordType); + pRecord->SetRecordType(recordType); + pRecord->SetPayload(*pPayload); + pMsg->AppendRecord(*pRecord); + delete pPayload; + + return pMsg; +} + +result +VcardTranslator::ConvertVcardToString(const NdefMessage* pMsg, Tizen::Base::String& name, Tizen::Base::String& number, + Tizen::Base::String& address) +{ + String textPayload; + ByteBuffer* pPayloadData = null; + char* pDataString = null; + + String myName; + String myNumber; + String myAddress; + + String vCardNameStart(L"FN:"); + String vCardNumberStart(L"TEL;CELL:"); + String vCardAddressStart(L"EMAIL;PREF;INTERNET:"); + + int lastIndex = 0; + int startIndexOfName = 0; + int endIndexOfName = 0; + + int startIndexOfNumber = 0; + int endIndexOfNumber = 0; + + int startIndexOfEmail = 0; + int endIndexOfEmail = 0; + + NdefRecord* pRecord = pMsg->GetRecordAt(0); + + pPayloadData = pRecord->GetPayload(); + TryReturn(pPayloadData != null, E_INVALID_FORMAT, "Payload is empty."); + + lastIndex = pPayloadData->GetRemaining(); + pDataString = new char[lastIndex + 1]; + + memcpy(pDataString, pPayloadData->GetPointer(), lastIndex); + pDataString[lastIndex] = '\0'; + StringUtil::Utf8ToString(pDataString, textPayload); + + delete[] pDataString; + + if(textPayload.StartsWith("BEGIN:VCARD\n",0)) + { + AppLog("This NDEF message contains Vcard format..."); + + textPayload.IndexOf(vCardNameStart, 0, startIndexOfName); + textPayload.IndexOf("\n", startIndexOfName, endIndexOfName); + textPayload.SubString(startIndexOfName + vCardNameStart.GetLength(), + endIndexOfName - startIndexOfName - vCardNameStart.GetLength(), myName); + + textPayload.IndexOf(vCardNumberStart, 0, startIndexOfNumber); + textPayload.IndexOf("\n", startIndexOfNumber, endIndexOfNumber); + textPayload.SubString(startIndexOfNumber + vCardNumberStart.GetLength(), + endIndexOfNumber - startIndexOfNumber - vCardNumberStart.GetLength(), myNumber); + + textPayload.IndexOf(vCardAddressStart, 0, startIndexOfEmail); + textPayload.IndexOf("\n", startIndexOfEmail, endIndexOfEmail); + textPayload.SubString(startIndexOfEmail + vCardAddressStart.GetLength(), + endIndexOfEmail - startIndexOfEmail - vCardAddressStart.GetLength(), myAddress); + + name = myName; + number = myNumber; + address = myAddress; + + return E_SUCCESS; + } + else + { + AppLog("This NDEF message not contains V-card format..."); + + return E_INVALID_FORMAT; + } + +} diff --git a/sample.xml b/sample.xml new file mode 100755 index 0000000..6c3fb46 --- /dev/null +++ b/sample.xml @@ -0,0 +1,34 @@ + + diff --git a/screenshot.png b/screenshot.png new file mode 100644 index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