Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_SearchBarModel.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 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://floralicense.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 /**
19  * @file                FUiCtrl_SearchBarModel.h
20  * @brief               This is the header file for the _SearchBarModel class.
21  *
22  * This header file contains the declarations of the %_SearchBarModel class.
23  */
24
25 #ifndef _FUI_CTRL_INTERNAL_SEARCH_BAR_MODEL_H_
26 #define _FUI_CTRL_INTERNAL_SEARCH_BAR_MODEL_H_
27
28 #include <FBaseObject.h>
29 #include "FUiCtrl_SearchBarPresenter.h"
30
31 namespace Tizen { namespace Ui { namespace Controls
32 {
33 /**
34  * @class _SearchBarModel
35  * @brief
36  * @since 2.0
37  */
38 class _SearchBarModel
39         : public Tizen::Base::Object
40 {
41 // Lifecycle
42 public:
43         /**
44          * This is default constructor for this class.
45          *
46          * @since       2.0
47          */
48         _SearchBarModel(void);
49
50         /**
51          * This is the destructor for this class.
52          *
53          * @since       2.0
54          */
55         virtual ~_SearchBarModel(void);
56
57 // Operations
58         virtual result Construct(void);
59
60         /**
61          * Sets the visibility state of the content area.
62          *
63          * @since       2.0
64          * @return      An error code
65          * @param[in]   visible            The visibility state of the content area.
66          * @exception   E_SUCCESS          The method was successful.
67          * @exception   E_SYSTEM           A system error occurred.
68          * @see         IsContentAreaVisible()
69          */
70         result SetContentAreaVisible(bool visible);
71
72         /**
73          * Checks whether the content area is visible.
74          *
75          * @since       2.0
76          * @return      The visibility state of the content area.
77          * @exception   E_SUCCESS           The method was successful.
78          * @see         SetContentAreaVisible()
79          */
80         bool IsContentAreaVisible(void) const;
81
82         /**
83          * Gets the search bar mode.
84          *
85          * @since               2.0
86          * @return      The search bar mode
87          * @exception   E_SUCCESS           The method was successful.
88          * @exception   E_SYSTEM            A system error occurred.
89          * @remarks     The specific error code can be accessed using the GetLastResult() method.
90          * @see         SetMode()
91          */
92         SearchBarMode GetMode(void) const;
93
94         /**
95          * Determines whether the search bar mode is locked.
96          *
97          * @since               2.0
98          * @return      @c true if the mode is locked, @n
99          *                              else @c false
100          * @exception   E_SUCCESS           The method was successful.
101          * @exception   E_SYSTEM            A system error occurred.
102          * @remarks     The specific error code can be accessed using the GetLastResult() method.
103          * @see         SetModeLock()
104          */
105         bool IsModeLocked(void) const;
106
107         /**
108          * Sets the search bar mode.
109          *
110          * @since               2.0
111          * @return      An error code
112          * @exception   E_SUCCESS           The method was successful.
113          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation, or the mode is locked.
114          * @exception   E_SYSTEM            A system error occurred.
115          * @see         GetMode()
116          * @see         SetModeLock()
117          */
118         result SetMode(SearchBarMode mode);
119
120         /**
121          * Locks or unlocks the search bar mode.
122          *
123          * @since               2.0
124          * @return      An error code
125          * @param[in]   modeLocked      The mode lock
126          * @exception   E_SUCCESS       The method was successful.
127          * @exception   E_SYSTEM        A system error occurred.
128          * @see         GetMode()
129          */
130         result SetModeLocked(bool modeLocked);
131
132
133 private:
134         _SearchBarModel(const _SearchBarModel& value);
135
136         _SearchBarModel& operator =(const _SearchBarModel& value);
137
138 // Attributes
139         bool __isContentAreaVisible;
140         bool __isModeLocked;
141         SearchBarMode __searchBarMode;
142
143 }; // _SearchBarModel
144
145 }}} // Tizen::Ui::Controls
146
147 #endif  // _FUI_CTRL_INTERNAL_SEARCH_BAR_MODEL_H_