2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://floralicense.org/license/
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.
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.
23 #ifndef _MF_SUB_FOLDER_MOVE_COPY_H_
24 #define _MF_SUB_FOLDER_MOVE_COPY_H_
26 #include "MfSubBaseMoveCopy.h"
28 class SubFolderMoveCopy
29 : public SubBaseMoveCopy
30 , public Tizen::Ui::IDataBindingListener
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);
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
46 virtual ~SubFolderMoveCopy(void);
50 * @param Takes no parameters
53 bool Initialize(void);
55 //Initialises all the members of the class
57 * @fn OnInitializing()
58 * @param Takes no parameters
59 * @return result value
61 result OnInitializing(void);
63 //IDeviceEventListener
64 virtual void OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Tizen::Base::String& state);
66 //!IActionEventListener
67 /*! @fn OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
68 * @brief Called when an action event occurs on the source control.
70 virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
72 //IDataBindingListener
74 * Called when the data transfer for source is completed by the data binding.
76 virtual void OnDataBindingSourceUpdated(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName
77 , const Tizen::Base::String& propertyName);
79 * Called when the data transfer for target is completed by the data binding
81 virtual void OnDataBindingTargetUpdated(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName
82 , const Tizen::Base::String& propertyName);
84 *Called when a validation has failed during data transfer.
86 virtual void OnDataBindingValidationFailed(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName
87 , const Tizen::Base::String& propertyName, Tizen::Ui::DataBindingDestinationType destType);
90 //IListViewItemEventListener
91 virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
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.
97 virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
99 /*! @fn OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
100 * @brief Called when the current scene is deactivated.
102 virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
104 //ISceneManagerEventListener
105 virtual void OnSceneTransitionCompleted (const Tizen::Ui::Scenes::SceneId &previousSceneId, const Tizen::Ui::Scenes::SceneId ¤tSceneId);
106 virtual void OnSceneTransitionStarted (const Tizen::Ui::Scenes::SceneId ¤tSceneId, const Tizen::Ui::Scenes::SceneId &nextSceneId);
108 /*!IDeviceNotificationListener
109 * A public callback from the IDeviceNotificationListener taking deviceType and state as argument and returning nothing
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
115 void OnDeviceChange(ComponentType deviceType, const Tizen::Base::String& state);
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.
126 Tizen::Base::String GetParentDirectoryName(void);
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.
135 result LoadParentForm(void);
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
144 void SetHeaderTitleText(Tizen::Base::String& filePath);
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.
153 void SetNextDisplayPath(void);
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.
163 void SetParentDisplayPath(void);
166 * A private member function which shows the home view.
168 * @brief shows the home views
172 void ShowHomeView(void);
175 static const int IDA_BTN_HOME = 137;
176 static const int IDA_BTN_UP = 138;
178 bool __updateFooterCheck;
180 int __fileManagedCount;
183 MemoryType __storageType;
185 Tizen::Base::Integer __receivedStorageType;
186 Tizen::Base::String __displayPath;
188 Tizen::Ui::Controls::ButtonItem* __pHomeButton;
189 Tizen::Ui::Controls::ButtonItem* __pUpButton;
190 Tizen::Ui::Controls::Header* __pHeader;
192 #endif /*_MF_SUB_FOLDER_MOVE_COPY_H_*/