Tizen 2.0 Release tizen_2.0 submit/tizen_2.0/20130215.192303
authorHyungKyu Song <hk76.song@samsung.com>
Fri, 15 Feb 2013 15:56:45 +0000 (00:56 +0900)
committerHyungKyu Song <hk76.song@samsung.com>
Fri, 15 Feb 2013 15:56:45 +0000 (00:56 +0900)
21 files changed:
LICENSE [new file with mode: 0644]
NOTICE [new file with mode: 0644]
description.xml [new file with mode: 0644]
project/data/nofile.dummy [new file with mode: 0644]
project/inc/SampleServiceProxy.h [new file with mode: 0644]
project/inc/SampleType.h [new file with mode: 0644]
project/inc/SampleUiApp.h [new file with mode: 0644]
project/inc/SampleUiAppFrame.h [new file with mode: 0644]
project/inc/SampleUiAppMainForm.h [new file with mode: 0644]
project/manifest.xml [new file with mode: 0644]
project/res/screen-size-normal/IDF_FORM.xml [new file with mode: 0644]
project/shared/data/nofile.dummy [new file with mode: 0644]
project/shared/res/screen-density-xhigh/mainmenu.png [new file with mode: 0644]
project/shared/trusted/nofile.dummy [new file with mode: 0644]
project/src/SampleServiceProxy.cpp [new file with mode: 0644]
project/src/SampleUiApp.cpp [new file with mode: 0644]
project/src/SampleUiAppEntry.cpp [new file with mode: 0644]
project/src/SampleUiAppFrame.cpp [new file with mode: 0644]
project/src/SampleUiAppMainForm.cpp [new file with mode: 0644]
sample.xml [new file with mode: 0644]
screenshot.png [new file with mode: 0644]

diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..9c95663
--- /dev/null
+++ b/LICENSE
@@ -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 (file)
index 0000000..fdb699a
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,4 @@
+Copyright (c) 2012 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 100644 (file)
index 0000000..14ef337
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<?xml-stylesheet type="text/xsl" href="../../../../description.xsl"?>
+
+<Overview version="0.17.1">
+  <SampleName>MultiProcUiApp</SampleName>
+  <SampleVersion>1.0</SampleVersion>
+  <Preview>screenshot.png</Preview>
+  <Description>
+The MultiProcUiApp sample application demonstrates how you can communicate with the ServiceApp within the same package.
+  </Description>
+</Overview>
diff --git a/project/data/nofile.dummy b/project/data/nofile.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/project/inc/SampleServiceProxy.h b/project/inc/SampleServiceProxy.h
new file mode 100644 (file)
index 0000000..cbf886a
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012 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://www.tizenopensource.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 _SAMPLE_SERVICE_PROXY_H_
+#define _SAMPLE_SERVICE_PROXY_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FIo.h>
+
+class SampleServiceProxy
+       : public Tizen::Io::IMessagePortListener
+{
+public:
+       SampleServiceProxy(void);
+
+       ~SampleServiceProxy(void);
+
+       result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& remotePortName);
+
+       result SendMessage(const Tizen::Base::Collection::IMap* pMessage);
+
+       virtual void OnMessageReceivedN(Tizen::Io::RemoteMessagePort* pRemoteMessagePort, Tizen::Base::Collection::IMap* pMessage);
+
+private:
+       Tizen::Io::LocalMessagePort* __pLocalMessagePort;
+       Tizen::Io::RemoteMessagePort* __pRemoteMessagePort;
+       Tizen::App::AppId __appId;
+};
+
+#endif // _SAMPLE_SERVICE_PROXY_H_
diff --git a/project/inc/SampleType.h b/project/inc/SampleType.h
new file mode 100644 (file)
index 0000000..c50dfbb
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012 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://www.tizenopensource.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 _SAMPLE_TYPE_H_
+#define _SAMPLE_TYPE_H_
+
+#include <FBase.h>
+
+static const RequestId STATE_INIT = 0;
+static const RequestId STATE_READY = 1;
+static const RequestId STATE_CONNECT_REQUEST = 2;
+static const RequestId STATE_CONNECTED = 3;
+static const RequestId STATE_TIMER_START_REQUEST = 4;
+static const RequestId STATE_TIMER_STARTED = 5;
+static const RequestId STATE_TIMER_EXPIRED = 6;
+static const RequestId STATE_TIMER_STOP_REQUEST = 7;
+static const RequestId STATE_TIMER_STOPPED = 8;
+static const RequestId STATE_EXIT = 9;
+static const RequestId STATE_FAIL = 10;
+
+#endif // _SAMPLE_TYPE_H_
diff --git a/project/inc/SampleUiApp.h b/project/inc/SampleUiApp.h
new file mode 100644 (file)
index 0000000..6f905d0
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012 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://www.tizenopensource.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 _SAMPLE_UI_APP_H_
+#define _SAMPLE_UI_APP_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FSystem.h>
+#include <FUi.h>
+
+#include "SampleServiceProxy.h"
+
+/**
+ * SampleUiApp must inherit from UiApp class
+ * which provides basic features necessary to define an UiApp.
+ */
+class SampleUiApp
+       : public Tizen::App::UiApp
+       , public Tizen::System::IScreenEventListener
+{
+public:
+       /**
+        * UiApp must have a factory method that creates an instance of itself.
+        */
+       static Tizen::App::UiApp* CreateInstance(void);
+
+       SampleUiApp(void);
+
+       virtual ~SampleUiApp(void);
+
+       virtual bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
+
+       virtual bool OnAppInitialized(void); 
+
+       virtual bool OnAppWillTerminate(void); 
+
+       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);
+
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+private:
+       SampleServiceProxy* __pService;
+
+       Tizen::Ui::Controls::Form* __pForm;
+
+       bool __isReady;
+};
+
+#endif // _SAMPLE_UI_APP_H_
diff --git a/project/inc/SampleUiAppFrame.h b/project/inc/SampleUiAppFrame.h
new file mode 100644 (file)
index 0000000..910a5b9
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012 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://www.tizenopensource.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 _SAMPLE_UI_APP_FRAME_H_
+#define _SAMPLE_UI_APP_FRAME_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class SampleUiAppFrame
+       : public Tizen::Ui::Controls::Frame
+{
+public:
+       SampleUiAppFrame(void);
+
+       virtual ~SampleUiAppFrame(void);
+
+       virtual result OnInitializing(void);
+
+       virtual result OnTerminating(void);
+};
+
+#endif // _SAMPLE_UI_APP_FRAME_H_
diff --git a/project/inc/SampleUiAppMainForm.h b/project/inc/SampleUiAppMainForm.h
new file mode 100644 (file)
index 0000000..05ac7d8
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012 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://www.tizenopensource.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 _SAMPLE_UI_APP_MAIN_FORM_H_
+#define _SAMPLE_UI_APP_MAIN_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include <FUiScenes.h>
+
+class SampleUiAppMainForm
+       : public Tizen::Ui::Controls::Form
+       , public Tizen::Ui::IActionEventListener
+       , public Tizen::Ui::Controls::IFormBackEventListener
+       , public Tizen::Ui::Scenes::ISceneEventListener
+{
+public:
+       SampleUiAppMainForm(void);
+
+       virtual ~SampleUiAppMainForm(void);
+
+       bool Initialize(void);
+
+       virtual result OnInitializing(void);
+
+       virtual result OnTerminating(void);
+
+       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
+       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);
+
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+protected:
+       static const int ID_BUTTON_OK = 101;
+
+private:
+       RequestId __current;
+};
+
+#endif //_SAMPLE_UI_APP_MAIN_FORM_H_
diff --git a/project/manifest.xml b/project/manifest.xml
new file mode 100644 (file)
index 0000000..fb7a31c
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Manifest xmlns="http://schemas.tizen.org/2012/12/manifest">
+    <Id>$(manifestAppId)</Id>
+    <Version>1.0.0</Version>
+    <Type>C++App</Type>
+    <Author/>
+    <Descriptions>
+        <Description Locale="eng-GB"/>
+    </Descriptions>
+    <Requirements>
+        <Feature Name="http://tizen.org/feature/platform.core.cpu.arch">x86</Feature>
+        <Feature Name="http://tizen.org/feature/platform.core.fpu.arch">vfpv3</Feature>
+    </Requirements>
+    <Apps>
+        <ApiVersion>2.0</ApiVersion>
+        <Privileges>
+            <Privilege>http://tizen.org/privilege/application.launch</Privilege>
+        </Privileges>
+        <UiApp Main="True" MenuIconVisible="True" Name="$(projectName)">
+            <UiScalability BaseScreenSize="Normal" CoordinateSystem="Logical" LogicalCoordinate="720"/>
+            <UiTheme SystemTheme="White"/>
+            <DisplayNames>
+                <DisplayName Locale="eng-GB">$(projectName)</DisplayName>
+            </DisplayNames>
+            <Icons>
+                <Icon Section="MainMenu" Type="Xhigh">mainmenu.png</Icon>
+            </Icons>
+            <LaunchConditions/>
+            <Notifications>
+                <Notification Name="Ticker">On</Notification>
+                <Notification Name="Sound">On</Notification>
+                <Notification Name="Contents">Off</Notification>
+                <Notification Name="Badge">On</Notification>
+            </Notifications>
+        </UiApp>
+    </Apps>
+</Manifest>
+
diff --git a/project/res/screen-size-normal/IDF_FORM.xml b/project/res/screen-size-normal/IDF_FORM.xml
new file mode 100644 (file)
index 0000000..3a3db22
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="3.0.0.v20120705" Dversion="20120315">
+    <LogicalCoordinate>720</LogicalCoordinate>
+    <Form id="IDF_FORM">
+        <property backgroundColor="" backgroundColorOpacity="100" orientation="Automatic" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+        <layout mode="Portrait" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
+        <layout mode="Landscape" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
+    </Form>
+    <Footer>
+        <property backgroundBitmapPath="" color="" colorOpacity="0" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" showBackButton="true"/>
+        <itemSet/>
+    </Footer>
+    <Header>
+        <property backgroundBitmapPath="" color="" colorOpacity="0" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" titleIconPath="" titleText="MULTI-PROCESS UIAPP" titleTextColor=""/>
+        <itemSet/>
+    </Header>
+    <Button id="IDC_BUTTON_OK" parent="IDF_FORM">
+        <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="0" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="0" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="0" pressedTextColor="" text="Connect" textSize="50" verticalAlign="ALIGN_MIDDLE"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="135" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="420" x="150" y="602"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="true" height="102" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="400" x="0" y="0"/>
+    </Button>
+    <Label id="IDC_LABEL1" parent="IDF_FORM">
+        <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" text="Initializing ..." textColor="" textSize="50" textStyle="LABEL_TEXT_STYLE_NORMAL" verticalAlign="ALIGN_MIDDLE"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="136" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="423" x="148" y="211"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="52" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="533" x="492" y="32"/>
+    </Label>
+</Scene>
diff --git a/project/shared/data/nofile.dummy b/project/shared/data/nofile.dummy
new file mode 100644 (file)
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 (file)
index 0000000..983c883
Binary files /dev/null and b/project/shared/res/screen-density-xhigh/mainmenu.png differ
diff --git a/project/shared/trusted/nofile.dummy b/project/shared/trusted/nofile.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/project/src/SampleServiceProxy.cpp b/project/src/SampleServiceProxy.cpp
new file mode 100644 (file)
index 0000000..535a062
--- /dev/null
@@ -0,0 +1,140 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012 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://www.tizenopensource.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 "SampleType.h"
+#include "SampleServiceProxy.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Io;
+
+static const int CHECK_INTERVAL = 1000; // Checking interval in sec.
+
+static const wchar_t* LOCAL_MESSAGE_PORT_NAME = L"UI_PORT";
+
+SampleServiceProxy::SampleServiceProxy(void)
+       : __pLocalMessagePort(null)
+       , __pRemoteMessagePort(null)
+{
+}
+
+SampleServiceProxy::~SampleServiceProxy(void)
+{
+}
+
+result
+SampleServiceProxy::Construct(const AppId& appId, const String& remotePortName)
+{
+       result r = E_FAILURE;
+
+       __appId = appId;
+
+       AppManager* pAppManager = AppManager::GetInstance();
+       TryReturn(pAppManager != null, E_FAILURE, "SampleUiApp : Fail to get AppManager instance.");
+
+       AppLog("SampleUiApp : Checking service status for time out 5 sec...");
+
+       for (int i=0; i < 5; ++i)
+       {
+               if (pAppManager->IsRunning(__appId))
+               {
+                       AppLog("SampleUiApp : Service is ready !!!");
+                       break;
+               }
+               else
+               {
+                       AppLog("SampleUiApp : Service is not ready !!! try to launch !!! ");
+                       r = pAppManager->LaunchApplication(__appId, null);
+                       TryReturn(!IsFailed(r), r, "SampleUiApp : [%s]", GetErrorMessage(r));
+                       Thread::Sleep(CHECK_INTERVAL);
+               }
+       }
+
+       TryReturn(pAppManager->IsRunning(__appId), E_FAILURE, "SampleUiApp : The service is not working..");
+
+       __pLocalMessagePort = MessagePortManager::RequestLocalMessagePort(LOCAL_MESSAGE_PORT_NAME);
+       TryReturn(__pLocalMessagePort != null, E_FAILURE, "[E_FAILURE] Failed to get LocalMessagePort instance.");
+
+       __pLocalMessagePort->AddMessagePortListener(*this);
+
+       __pRemoteMessagePort = MessagePortManager::RequestRemoteMessagePort(appId, remotePortName);
+       TryReturn(__pLocalMessagePort != null, E_FAILURE, "[E_FAILURE] Failed to get LocalMessagePort instance.");
+
+
+       AppLog("LocalMessagePort(\"%ls\") is ready !!!", __pLocalMessagePort->GetName().GetPointer());
+
+       return E_SUCCESS;
+}
+
+result
+SampleServiceProxy::SendMessage(const IMap* pMessage)
+{
+       result r = E_SUCCESS;
+       AppLog("SendMessage is called.");
+
+       if (__pRemoteMessagePort != null)
+       {
+               r = __pRemoteMessagePort->SendMessage(__pLocalMessagePort, pMessage);
+       }
+       else
+       {
+               r = E_FAILURE;
+       }
+
+       return r;
+}
+
+void
+SampleServiceProxy::OnMessageReceivedN(RemoteMessagePort* pRemoteMessagePort, IMap* pMessage)
+{
+       AppLog("SampleUiApp : A response message is Received.");
+
+       String key(L"ServiceApp");
+       String* pData = static_cast<String*>(pMessage->GetValue(key));
+
+       App* pApp = App::GetInstance();
+
+       if (pData != null && pApp != null)
+       {
+               AppLog("SampleUiApp : Received data : %ls", pData->GetPointer());
+
+               if (pData->CompareTo(L"ready") == 0)
+               {
+                       pApp->SendUserEvent(STATE_CONNECTED, null);
+               }
+               else if (pData->CompareTo(L"started") == 0)
+               {
+                       pApp->SendUserEvent(STATE_TIMER_STARTED, null);
+               }
+               else if (pData->CompareTo(L"timer expired") == 0)
+               {
+                       pApp->SendUserEvent(STATE_TIMER_EXPIRED, null);
+               }
+               else if (pData->CompareTo(L"stopped") == 0)
+               {
+                       pApp->SendUserEvent(STATE_TIMER_STOPPED, null);
+               }
+               else if (pData->CompareTo(L"exit") == 0)
+               {
+                       pApp->SendUserEvent(STATE_EXIT, null);
+               }
+       }
+
+       delete pMessage;
+}
diff --git a/project/src/SampleUiApp.cpp b/project/src/SampleUiApp.cpp
new file mode 100644 (file)
index 0000000..5c968f9
--- /dev/null
@@ -0,0 +1,245 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012 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://www.tizenopensource.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 <FUiScenes.h>
+
+#include "SampleType.h"
+#include "SampleUiApp.h"
+#include "SampleUiAppFrame.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+#define MULTI 1
+
+static const wchar_t* REMOTE_PORT_NAME = L"SERVICE_PORT";
+
+SampleUiApp::SampleUiApp(void)
+       : __pService(null)
+       , __pForm(null)
+       , __isReady(false)
+{
+}
+
+SampleUiApp::~SampleUiApp(void)
+{
+       delete __pService;
+}
+
+UiApp*
+SampleUiApp::CreateInstance(void)
+{
+       // Create the instance through the constructor.
+       return new (std::nothrow) SampleUiApp();
+}
+
+bool
+SampleUiApp::OnAppInitializing(AppRegistry& appRegistry)
+{
+       AppLog("SampleUiApp : OnAppInitializing is called.");
+
+       return true;
+}
+
+bool
+SampleUiApp::OnAppInitialized(void)
+{
+       AppLog("SampleUiApp : OnAppInitialized is called.");
+
+       // Create a Frame
+       SampleUiAppFrame* pSampleUiAppFrame = new (std::nothrow) SampleUiAppFrame();
+       pSampleUiAppFrame->Construct();
+       pSampleUiAppFrame->SetName(L"SampleUiApp");
+       AddFrame(*pSampleUiAppFrame);
+
+       __pForm = pSampleUiAppFrame->GetCurrentForm();
+       AppAssert(__pForm != null);
+       __pForm->SendUserEvent(STATE_READY, null);
+
+       String serviceName(L".MultiProcServiceApp");
+       String repAppId(15);
+
+#if MULTI
+       GetAppId().SubString(0, 10, repAppId);
+#else
+       repAppId = L"hmmql7top4";
+#endif
+
+       AppId serviceId(repAppId+serviceName);
+
+       AppLog("SampleUiApp : Service Id is %ls", serviceId.GetPointer());
+
+       // Initialize ServiceProxy.
+       result r = E_SUCCESS;
+       __pService = new (std::nothrow) SampleServiceProxy();
+       TryReturn(__pService != null, false, "SampleUiApp : [%s] SeviceProxy creation is failed.", GetErrorMessage(r));
+       r = __pService->Construct(serviceId, REMOTE_PORT_NAME);
+       if (IsFailed(r))
+       {
+               AppLog("SampleUiApp : [%s] SeviceProxy creation is failed.", GetErrorMessage(r));
+               __pForm->SendUserEvent(STATE_FAIL, null);
+       }
+       else
+       {
+               __isReady = true;
+       }
+
+       return true;
+}
+
+bool
+SampleUiApp::OnAppWillTerminate(void)
+{
+       return true;
+}
+
+bool
+SampleUiApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
+{
+       if (__isReady)
+       {
+               HashMap *pMap = new HashMap(SingleObjectDeleter);
+               pMap->Construct();
+               pMap->Add(new String(L"UiApp"), new String(L"exit"));
+
+               __pService->SendMessage(pMap);
+
+               delete pMap;
+       }
+
+       __isReady = false;
+
+       return true;
+}
+
+void
+SampleUiApp::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
+{
+       AppLog("SampleUiApp : OnUserEventReceivedN is called. requestId is %d", requestId);
+
+       result r = E_SUCCESS;
+
+       switch (requestId)
+       {
+       case STATE_CONNECT_REQUEST :
+               if (__isReady)
+               {
+                       HashMap *pMap = new HashMap(SingleObjectDeleter);
+                       pMap->Construct();
+                       pMap->Add(new String(L"UiApp"), new String(L"connect"));
+
+                       r = __pService->SendMessage(pMap);
+
+                       delete pMap;
+
+                       TryReturnVoid(!IsFailed(r), "SampleUiApp : [%s] MessagePort Operation is Failed", GetErrorMessage(r));
+               }
+               break;
+       case STATE_CONNECTED :
+               if (__isReady)
+               {
+                       __pForm->SendUserEvent(STATE_CONNECTED, null);
+               }
+               break;
+       case STATE_TIMER_START_REQUEST :
+               if (__isReady)
+               {
+                       HashMap *pMap = new HashMap(SingleObjectDeleter);
+                       pMap->Construct();
+                       pMap->Add(new String(L"UiApp"), new String(L"start"));
+
+                       r = __pService->SendMessage(pMap);
+
+                       delete pMap;
+
+                       TryReturnVoid(!IsFailed(r), "SampleUiApp : [%s] MessagePort Operation is Failed", GetErrorMessage(r));
+               }
+               break;
+       case STATE_TIMER_STARTED :
+               if (__isReady)
+               {
+                       __pForm->SendUserEvent(STATE_TIMER_STARTED, null);
+               }
+               break;
+       case STATE_TIMER_EXPIRED :
+               if (__isReady)
+               {
+                       __pForm->SendUserEvent(STATE_TIMER_EXPIRED, null);
+               }
+               break;
+       case STATE_TIMER_STOP_REQUEST :
+               if (__isReady)
+               {
+                       HashMap *pMap = new HashMap(SingleObjectDeleter);
+                       pMap->Construct();
+                       pMap->Add(new String(L"UiApp"), new String(L"stop"));
+
+                       r = __pService->SendMessage(pMap);
+
+                       delete pMap;
+
+                       TryReturnVoid(!IsFailed(r), "SampleUiApp : [%s] MessagePort Operation is Failed", GetErrorMessage(r));
+               }
+               break;
+       case STATE_TIMER_STOPPED :
+               if (__isReady)
+               {
+                       __pForm->SendUserEvent(STATE_TIMER_STOPPED, null);
+               }
+               break;
+       case STATE_EXIT :
+               Terminate();
+               break;
+       default:
+               break;
+       }
+}
+
+void
+SampleUiApp::OnForeground(void)
+{
+}
+
+void
+SampleUiApp::OnBackground(void)
+{
+}
+
+void
+SampleUiApp::OnLowMemory(void)
+{
+}
+
+void
+SampleUiApp::OnBatteryLevelChanged(BatteryLevel batteryLevel)
+{
+}
+
+void
+SampleUiApp::OnScreenOn(void)
+{
+}
+
+void
+SampleUiApp::OnScreenOff(void)
+{
+}
diff --git a/project/src/SampleUiAppEntry.cpp b/project/src/SampleUiAppEntry.cpp
new file mode 100644 (file)
index 0000000..d0fdb29
--- /dev/null
@@ -0,0 +1,58 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012 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://www.tizenopensource.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.
+//
+
+/**
+ * This file contains the Tizen application entry point.
+ */
+
+#include "SampleUiApp.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[])
+{
+       AppLog("SampleUiApp : Application started.");
+       ArrayList args;
+       args.Construct();
+       for (int i = 0; i < argc; i++)
+       {
+               args.Add(*(new (std::nothrow) String(pArgv[i])));
+       }
+
+       result r = Tizen::App::UiApp::Execute(SampleUiApp::CreateInstance, &args);
+       TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
+
+       args.RemoveAll(true);
+       AppLog("SampleUiApp : Application finished.");
+
+       return static_cast<int>(r);
+}
+#ifdef __cplusplus
+}
+#endif // __cplusplus
diff --git a/project/src/SampleUiAppFrame.cpp b/project/src/SampleUiAppFrame.cpp
new file mode 100644 (file)
index 0000000..02cceb4
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012 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://www.tizenopensource.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 "SampleUiAppFrame.h"
+#include "SampleUiAppMainForm.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+SampleUiAppFrame::SampleUiAppFrame(void)
+{
+}
+
+SampleUiAppFrame::~SampleUiAppFrame(void)
+{
+}
+
+result
+SampleUiAppFrame::OnInitializing(void)
+{
+       result r = E_SUCCESS;
+
+       // Create a form
+       SampleUiAppMainForm* pForm = new (std::nothrow) SampleUiAppMainForm();
+       pForm->Initialize();
+
+       // Add the form to the frame
+       AddControl(*pForm);
+
+       // Set the current form
+       SetCurrentForm(*pForm);
+
+       // Draw the form
+       pForm->Invalidate(true);
+
+       return r;
+}
+
+result
+SampleUiAppFrame::OnTerminating(void)
+{
+       result r = E_SUCCESS;
+
+       return r;
+}
diff --git a/project/src/SampleUiAppMainForm.cpp b/project/src/SampleUiAppMainForm.cpp
new file mode 100644 (file)
index 0000000..2a6e003
--- /dev/null
@@ -0,0 +1,216 @@
+//
+// Tizen Native SDK
+// Copyright (c) 2012 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://www.tizenopensource.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 <FApp.h>
+
+#include "SampleType.h"
+#include "SampleUiAppMainForm.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+
+SampleUiAppMainForm::SampleUiAppMainForm(void)
+       : __current(STATE_INIT)
+{
+}
+
+SampleUiAppMainForm::~SampleUiAppMainForm(void)
+{
+}
+
+bool
+SampleUiAppMainForm::Initialize(void)
+{
+       Construct(L"IDF_FORM");
+
+       return true;
+}
+
+result
+SampleUiAppMainForm::OnInitializing(void)
+{
+       result r = E_SUCCESS;
+
+       // Setup back event listener
+       SetFormBackEventListener(this);
+
+       // Get a button via resource ID
+       Button *pButtonOk = static_cast<Button*>(GetControl(L"IDC_BUTTON_OK"));
+       if (pButtonOk != null)
+       {
+               pButtonOk->SetActionId(ID_BUTTON_OK);
+               pButtonOk->AddActionEventListener(*this);
+               pButtonOk->SetEnabled(false);
+       }
+
+       // The following code are automatically generated by UiBuilder -  do not modify by hand
+       return r;
+}
+
+result
+SampleUiAppMainForm::OnTerminating(void)
+{
+       result r = E_SUCCESS;
+
+       return r;
+}
+
+void
+SampleUiAppMainForm::OnActionPerformed(const Control& source, int actionId)
+{
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       AppAssert(pSceneManager != null);
+       App* pApp = App::GetInstance();
+
+       switch(actionId)
+       {
+       case ID_BUTTON_OK:
+               AppLog("SampleUiApp : Button Clicked !!");
+               if (pApp != null)
+               {
+                       switch (__current)
+                       {
+                       case STATE_READY :
+                               pApp->SendUserEvent(STATE_CONNECT_REQUEST, null);
+                               break;
+                       case STATE_CONNECTED :
+                               pApp->SendUserEvent(STATE_TIMER_START_REQUEST, null);
+                               break;
+                       case STATE_TIMER_STARTED :
+                               pApp->SendUserEvent(STATE_TIMER_STOP_REQUEST, null);
+                               break;
+                       case STATE_TIMER_STOPPED :
+                               pApp->SendUserEvent(STATE_EXIT, null);
+                               break;
+                       default:
+                               pApp->SendUserEvent(STATE_TIMER_STOP_REQUEST, null);
+                               break;
+                       }
+               }
+               break;
+       default:
+               break;
+       }
+}
+
+void
+SampleUiAppMainForm::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
+{
+       static int timerCount = 0;
+
+       AppLog("SampleUiApp : OnUserEventReceivedN is called. requestId is %d", requestId);
+
+       Label* pLabel = dynamic_cast<Label*>(GetControl(L"IDC_LABEL1"));
+       Button* pButton = dynamic_cast<Button*>(GetControl(L"IDC_BUTTON_OK"));
+
+       switch (requestId)
+       {
+       case STATE_READY :
+               if (pLabel != null && pButton != null)
+               {
+                       pLabel->SetText("Ready !!");
+                       pLabel->Draw(true);
+                       pButton->SetEnabled(true);
+                       __current = STATE_READY;
+               }
+               break;
+       case STATE_CONNECTED :
+               if (pLabel != null && pButton != null)
+               {
+                       pLabel->SetText("Connected !!");
+                       pLabel->Draw(true);
+                       pButton->SetText("Start Timer");
+                       pButton->Draw(true);
+                       __current = STATE_CONNECTED;
+               }
+               break;
+       case STATE_TIMER_STARTED :
+               if (pLabel != null && pButton != null)
+               {
+                       pLabel->SetText("Timer Start !!");
+                       pLabel->Draw(true);
+                       pButton->SetText("Stop Timer");
+                       pButton->Draw(true);
+                       __current = STATE_TIMER_STARTED;
+               }
+               break;
+       case STATE_TIMER_EXPIRED :
+               if (pLabel != null && pButton != null)
+               {
+                       String msg;
+                       timerCount++;
+                       msg.Format(30, L"Timer Expired %d", timerCount);
+                       pLabel->SetText(msg);
+                       pLabel->Draw(true);
+                       pButton->SetText("Stop Timer");
+                       pButton->Draw(true);
+               }
+               break;
+       case STATE_TIMER_STOPPED :
+               if (pLabel != null && pButton != null)
+               {
+                       pLabel->SetText("Timer Stopped !!");
+                       pLabel->Draw(true);
+                       pButton->SetText("Exit");
+                       pButton->Draw(true);
+                       __current = STATE_TIMER_STOPPED;
+                       timerCount = 0;
+               }
+               break;
+       case STATE_FAIL :
+               if (pLabel != null && pButton != null)
+               {
+                       pLabel->SetText("Server Not Found !!");
+                       pLabel->Draw(true);
+                       pButton->SetText("Exit");
+                       pButton->Draw(true);
+                       __current = STATE_TIMER_STOPPED;
+                       timerCount = 0;
+               }
+               break;
+       default:
+               break;
+       }
+}
+
+void
+SampleUiAppMainForm::OnFormBackRequested(Form& source)
+{
+       App* pApp = App::GetInstance();
+       AppAssert(pApp);
+       pApp->Terminate();
+}
+
+void
+SampleUiAppMainForm::OnSceneActivatedN(const SceneId& previousSceneId,
+                                                                                 const SceneId& currentSceneId, IList* pArgs)
+{
+       AppLog("SampleUiApp : OnSceneActivatedN");
+}
+
+void
+SampleUiAppMainForm::OnSceneDeactivated(const SceneId& currentSceneId,
+                                                                                  const SceneId& nextSceneId)
+{
+       AppLog("SampleUiApp : OnSceneDeactivated");
+}
+
diff --git a/sample.xml b/sample.xml
new file mode 100644 (file)
index 0000000..5b740e6
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template>
+                
+       <slp-property>
+               <property-group>
+                       <sample-name>MultiProcUiApp</sample-name>
+                       <category>Sample</category>
+                       <sdk-version>1.00</sdk-version>
+                       <project-type>org.tizen.nativecpp.buildArtefactType.app</project-type>                  
+                       <sample-description>description.xml</sample-description>
+               </property-group>
+       </slp-property>
+       
+       <process type="org.tizen.nativeappcommon.TizenCopyFolder">
+               <simple name="projectName" value="$(projectName)"/>
+               <simple name="folderPath" value="project"/>
+               <complex-array name="replaceableFiles">
+                 <element>
+                               <simple name="sourcePath" value="manifest.xml"/>
+                               <simple name="targetPath" value="manifest.xml"/>
+                               <simple name="replaceable" value = "true"/>
+                       </element>
+               </complex-array>
+       </process>
+       <process type="org.tizen.nativecpp.SetDefaultFrameworks">
+               <simple name="projectName" value="$(projectName)"/>
+               <complex-array name="frameworkList">
+                       <element>
+                               <simple name="framework" value="osp"/>
+                       </element>
+               </complex-array>
+       </process>
+       
+</template>
diff --git a/screenshot.png b/screenshot.png
new file mode 100644 (file)
index 0000000..c9247a7
Binary files /dev/null and b/screenshot.png differ