Tizen 2.1 base
[apps/osp/MyFiles.git] / inc / MfSubFolderMoveCopy.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file: MfSubFolderMoveCopy.h
19  * @brief: This file contains the declaration SubFolderMoveCopy class, which loads the form which implements the Copy
20  * and Move Functionalities on the SubDirectoryForm.
21  */
22
23 #ifndef _MF_SUB_FOLDER_MOVE_COPY_H_
24 #define _MF_SUB_FOLDER_MOVE_COPY_H_
25
26 #include "MfSubBaseMoveCopy.h"
27
28 class SubFolderMoveCopy
29         : public SubBaseMoveCopy
30         , public Tizen::Ui::IDataBindingListener
31 {
32 public:
33         //! Constructor of the class.
34         /*!@fn MfMyFilesAppTopMostMoveCopy()
35          * @brief A public member taking no arguments which initializes the member variables of the class.
36          * @param Takes no parameters
37          * @return No value returned */
38         SubFolderMoveCopy(void);
39
40         //! Destructor of the class.
41         /*!@fn ~MfMyFilesAppTopMostMoveCopy()
42          * @brief A public virtual member taking no arguments, frees the memory allocated to the member variables.
43          * @param Takes no parameters
44          * @return No value returned
45          * */
46         virtual ~SubFolderMoveCopy(void);
47
48         /*!
49          * @fn Initialize()
50          * @param Takes no parameters
51          * @return bool value
52          */
53         bool Initialize(void);
54
55         //Initialises all the members of the class
56         /*!
57          * @fn OnInitializing()
58          * @param Takes no parameters
59          * @return result value
60          */
61         result OnInitializing(void);
62
63         //IDeviceEventListener
64         virtual void OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Tizen::Base::String& state);
65
66         //!IActionEventListener
67         /*! @fn OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
68          * @brief   Called when an action event occurs on the source control.
69          */
70         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
71
72         //IDataBindingListener
73         /*
74          * Called when the data transfer for source is completed by the data binding.
75          */
76         virtual void OnDataBindingSourceUpdated(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName
77                                                                                    , const Tizen::Base::String& propertyName);
78         /*
79          * Called when the data transfer for target is completed by the data binding
80          */
81         virtual void OnDataBindingTargetUpdated(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName
82                                                                                    , const Tizen::Base::String& propertyName);
83         /*
84          *Called when a validation has failed during data transfer.
85          */
86         virtual void OnDataBindingValidationFailed(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName
87                                                                                           , const Tizen::Base::String& propertyName, Tizen::Ui::DataBindingDestinationType destType);
88
89
90         //IListViewItemEventListener
91         virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
92
93         //! ISceneEventListener
94         /*! @fn OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
95          * @brief  Called after setting as current scene.
96          */
97         virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
98
99         /*! @fn OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
100          * @brief  Called when the current scene is deactivated.
101          */
102         virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
103
104         //ISceneManagerEventListener
105         virtual void OnSceneTransitionCompleted (const Tizen::Ui::Scenes::SceneId &previousSceneId, const Tizen::Ui::Scenes::SceneId &currentSceneId);
106         virtual void OnSceneTransitionStarted (const Tizen::Ui::Scenes::SceneId &currentSceneId, const Tizen::Ui::Scenes::SceneId &nextSceneId);
107
108         /*!IDeviceNotificationListener
109          * A public callback from the IDeviceNotificationListener taking deviceType and state as argument and returning nothing
110          * @fn OnDeviceChange
111          * @brief Used to handle device event changes. When memory card is inserted, removed then this method will be called
112          * @param ComponentType, String
113          * @return no return value
114          */
115         void OnDeviceChange(ComponentType deviceType, const Tizen::Base::String& state);
116
117 private:
118         /*
119          * A private member function taking a string holding the currentDirectory filepath
120          * and returning the filepath of the parent directory.
121          * @fn GetParentDirectoryName().
122          * @brief Called OnActionPerformed of the Up Button, navigates to the Parent Form.
123          * @param void No Parameters Taken.
124          * @return[String] containing the filepath of the parent of the current directory.
125          */
126         Tizen::Base::String GetParentDirectoryName(void);
127
128         /*
129          * A private member function taking no arguments and returning an ErrorCode.
130          * @fn LoadParentForm().
131          * @brief Called OnActionPerformed of the Up Button, navigates to the Parent Form.
132          * @param No parameters.
133          * @return[result] An ErrorCode.
134          */
135         result LoadParentForm(void);
136
137         /*
138          * A private member function returning no arguments.
139          * @fn SetHeaderTitleText(Tizen::Base::String& fileName)
140          * @brief Called to set the title text of the header within the form.
141          * @param [String&] fileName, filename of the current Directory.
142          * @return Void return type
143          */
144         void SetHeaderTitleText(Tizen::Base::String& filePath);
145
146         /*
147          * A private member function set the display path.
148          * @fn SetNextDisplayPath().
149          * @brief It sets the display path
150          * @param No parameters.
151          * @return No values returned.
152          */
153         void SetNextDisplayPath(void);
154
155         /*
156          * A private member function set the parent display path.
157          * @fn SetParentDisplayPath().
158          * @brief It sets the parent display path
159          * @param No parameters.
160          * @return No values returned.
161
162          */
163         void SetParentDisplayPath(void);
164
165         /*
166          * A private member function which shows the home view.
167          * @fn ShowHomeView
168          * @brief shows the home views
169          * @param void
170          * @return void
171          */
172         void ShowHomeView(void);
173
174 private:
175         static const int IDA_BTN_HOME = 137;
176         static const int IDA_BTN_UP = 138;
177
178         bool __updateFooterCheck;
179
180         int __fileManagedCount;
181         int __viewType;
182
183         MemoryType __storageType;
184
185         Tizen::Base::Integer __receivedStorageType;
186         Tizen::Base::String __displayPath;
187
188         Tizen::Ui::Controls::ButtonItem* __pHomeButton;
189         Tizen::Ui::Controls::ButtonItem* __pUpButton;
190         Tizen::Ui::Controls::Header* __pHeader;
191 };
192 #endif /*_MF_SUB_FOLDER_MOVE_COPY_H_*/