Tizen 2.1 base
[sdk/ide/native-sample.git] / samples / native / partner / cpp / Sample / Tizen C++ / CipherMessage / CipherMessage / project / inc / Alice.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.tizenopensource.org/license
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 #ifndef _FORM1_H_
19 #define _FORM1_H_
20
21 #include <FBase.h>
22 #include <FUi.h>
23 #include <FSecurity.h>
24 #include "WaitPopup.h"
25
26 class Alice :
27         public Osp::Ui::Controls::Form,
28         public Osp::Ui::IActionEventListener,
29         public Osp::Base::Runtime::IRunnable
30 {
31
32 // Construction
33 public:
34         Alice(void);
35         virtual ~Alice(void);
36         bool Initialize(void);
37
38 // Implementation
39 protected:
40         static const int ID_BUTTON_GEN_KEY = 101;
41         static const int ID_BUTTON_AES = 102;
42         static const int ID_BUTTON_RSA = 103;
43         static const int ID_BUTTON_HASH = 104;
44         static const int ID_BUTTON_SIGN = 105;
45         static const int ID_BUTTON_VIEW_CERT = 106;
46         static const int ID_BUTTON_SETTINGS = 107;
47
48 // Call-back functions
49 public:
50         virtual result OnInitializing(void);
51         virtual result OnTerminating(void);
52         virtual void OnActionPerformed(const Osp::Ui::Control& source, int actionId);
53         void CreateSendMsgForm();
54         static result GenerateSecret();
55         result PerformRsaEncryption();
56         result PerformAesEncryption();
57         result PerformHashEncryption();
58         result PerformSignEncryption();
59         void SetStatusLable(Osp::Base::String szStatusMsg);
60         Osp::Base::Object*  Run (void);
61         virtual void OnUserEventReceivedN(RequestId requestId, Osp::Base::Collection::IList* pArgs);
62 private:
63         WaitPopup* __pWaitPopup;
64         Osp::Base::Runtime::Thread* __pThread;
65         result __r;
66 };
67
68 #endif
69