2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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 FShell_LockManagerImpl.h
19 * @brief This is the header file for the _LockManagerImpl class.
21 * This header file contains the declarations of the %_LockManagerImpl class.
24 #ifndef _FSHELL_INTERNAL_LOCK_MANAGER_IMPL_H_
25 #define _FSHELL_INTERNAL_LOCK_MANAGER_IMPL_H_
27 #include <FBaseObject.h>
29 namespace Tizen { namespace Shell {
31 class _LockManagerProxy;
33 * @class _LockManagerImpl
34 * @brief Manages state of lock screen.
38 * @final This class is not intended for extension.
40 * The %_LockManagerImpl class manages information of lock screen.
42 class _OSP_EXPORT_ _LockManagerImpl
43 : public Tizen::Base::Object
47 * Gets the %_LockManagerImpl instance.
51 * @return A pointer to the %_LockManagerImpl instance, @n
52 * else @c null if it fails
54 * @exception E_SUCCESS The method is successful.
55 * @exception E_OUT_OF_MEMORY The memory is insufficient.
56 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
57 * @remarks The specific error code can be accessed using the GetLastResult() method.
59 static _LockManagerImpl* GetInstance(void);
62 * Checks whether the screen is locked.
66 * @return @c true if the screen is locked,
69 bool IsLocked(void) const;
72 * Checks whether password lock screen is enabled by Settings.
76 * @return @c true if password lock screen is enabled,
79 bool IsSecureMode(void) const;
82 * Unlocks current lock screen.
85 * @privilege http://tizen.org/privilege/lockmanager
89 * @exception E_SUCCESS The method is successful.
90 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
91 * @exception E_INVALID_OPERATION Can't unlock, because secure mode is enabled.
92 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
94 * @remark This API call has no effect while secure mode is enabled.
100 // This default constructor is intentionally declared as private to implement the %Singleton semantic.
104 _LockManagerImpl(void);
107 // This destructor is intentionally declared as private to implement the %Singleton semantic.
111 virtual ~_LockManagerImpl(void);
114 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
118 _LockManagerImpl(const _LockManagerImpl& rhs);
121 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
125 _LockManagerImpl& operator =(const _LockManagerImpl& rhs);
128 // Constructs the instance of this class.
132 // @return An error code
133 // @exception E_SUCCESS The method is successful.
134 // @exception E_SYSTEM The method cannot proceed due to a severe system error.
136 result Construct(void);
138 static void InitSingleton(void);
139 static void DestroySingleton(void);
143 static _LockManagerImpl* __pTheInstance;
144 friend struct std::default_delete< _LockManagerImpl >;
150 #endif /* _FSHELL_INTERNAL_LOCK_MANAGER_IMPL_H_ */