${CMAKE_SOURCE_DIR}/inc
${CMAKE_SOURCE_DIR}/src/inc
${CMAKE_SOURCE_DIR}/src/core
+ /usr/include/chromium
/usr/include/osp
/usr/include/osp/app
/usr/include/osp/base
/usr/include/shortcut
/usr/include/vconf
/usr/include/badge
+ /usr/include/glib-2.0
+ /usr/lib/glib-2.0/include
)
SET (${this_target}_SOURCE_FILES
FShell_NotificationManagerImpl.cpp
FShell_NotificationRequestImpl.cpp
FShell_ShortcutManagerImpl.cpp
+ FShell_LockManagerProxy.cpp
+ FShell_LockManagerIpcMessages.cpp
)
## Definitions
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed")
TARGET_LINK_LIBRARIES(${this_target} "-lpthread" )
+TARGET_LINK_LIBRARIES(${this_target} "-lchromium" )
TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" )
TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application" )
TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager" )
* @brief This is the implementation for the _LockManagerImpl class.
*/
+#include <unique_ptr.h>
#include <vconf.h>
#include <FBaseLog.h>
#include <FBaseSysLog.h>
#include <FShell_LockManagerImpl.h>
+#include <FShell_LockManagerProxy.h>
namespace Tizen { namespace Shell
{
if( pLockManagerImpl == null )
{
pLockManagerImpl = new (std::nothrow) _LockManagerImpl();
+ SysTryReturn(NID_APP, pLockManagerImpl, null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+
+ result r = pLockManagerImpl->Construct();
+ SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
}
return pLockManagerImpl;
}
+result
+_LockManagerImpl::Construct(void)
+{
+ result r = E_SUCCESS;
+
+ std::unique_ptr< _LockManagerProxy > pLockManager(new (std::nothrow) _LockManagerProxy);
+ SysTryReturnResult(NID_APP, pLockManager, E_OUT_OF_MEMORY, "The memory is insufficient.");
+
+ r = pLockManager->Construct();
+ SysTryReturnResult(NID_APP, !IsFailed(r), r, "Propagating.");
+
+ __pLockManager = pLockManager.release();
+
+ return E_SUCCESS;
+}
+
bool
_LockManagerImpl::IsLocked(void) const
{
{
return E_SUCCESS;
}
-
-// SysTryReturnResult(NID_SHELL, !IsSecureMode(), E_INVALID_OPERATION, "Secured lock screen can't be unlocked.");
-
- int errorCode = -1;
- errorCode = vconf_set_int(VCONFKEY_IDLE_LOCK_STATE, VCONFKEY_IDLE_UNLOCK);
- SysTryReturnResult(NID_SYS, errorCode == 0, E_SYSTEM, "Failed to set on VCONFKEY_REGIONFORMAT_TIME1224 vconf");
-
- return E_SUCCESS;
+ return __pLockManager->Unlock();
}
+
}} // Tizen::Shell
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FShell_LockManagerIpcMessages.cpp
+ * @brief This file contains IPC message class generated by macros.
+ */
+
+#define IPC_MESSAGE_IMPL
+#include "FShell_LockManagerIpcMessages.h"
+
+// Generate constructors.
+#include "ipc/struct_constructor_macros.h"
+#include "FShell_LockManagerIpcMessages.h"
+// Generate destructors.
+
+#include "ipc/struct_destructor_macros.h"
+#include "FShell_LockManagerIpcMessages.h"
+
+// Generate param traits write methods.
+#include "ipc/param_traits_write_macros.h"
+namespace IPC
+{
+#include "FShell_LockManagerIpcMessages.h"
+} // namespace IPC
+
+// Generate param traits read methods.
+#include "ipc/param_traits_read_macros.h"
+namespace IPC
+{
+#include "FShell_LockManagerIpcMessages.h"
+} // namespace IPC
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FShell_LockManagerProxy.cpp
+ * @brief This is the implementation for the _LockManagerProxy.cpp class.
+ */
+
+#include <new>
+#include <memory>
+#include <unique_ptr.h>
+#include <FBaseErrors.h>
+#include <FBaseSysLog.h>
+#include <FIo_IpcClient.h>
+
+#include "FShell_LockManagerIpcMessages.h"
+#include "FShell_LockManagerProxy.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Shell;
+
+namespace Tizen { namespace Shell
+{
+
+_LockManagerProxy::_LockManagerProxy(void)
+ : __pIpcClient(null)
+{
+}
+
+_LockManagerProxy::~_LockManagerProxy(void)
+{
+}
+
+result
+_LockManagerProxy::Construct()
+{
+ __pIpcClient = new (std::nothrow) Tizen::Io::_IpcClient();
+ SysTryReturnResult(NID_APP, __pIpcClient != null, E_OUT_OF_MEMORY, "The memory is not sufficient.");
+
+ result r = __pIpcClient->Construct("osp.shell.ipcserver.lockmanager");
+ SysTryReturnResult(NID_APP, !IsFailed(r), r, "_IpcClient constructing failed.");
+
+ return E_SUCCESS;
+}
+
+result
+_LockManagerProxy::Unlock()
+{
+ SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+
+ result response = E_SUCCESS;
+
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) LockManager_Unlock(&response));
+ result r = __pIpcClient->SendRequest(*pMsg.get());
+ SysTryReturnResult(NID_APP, !IsFailed(r), r, "SendRequest is failed.");
+
+ return response;
+}
+
+} } // Tizen::Shell
namespace Tizen { namespace Shell {
+class _LockManagerProxy;
/**
* @class _LockManagerImpl
* @brief Manages state of lock screen.
// @exception E_SYSTEM The method cannot proceed due to a severe system error.
//
result Construct(void);
+
+private:
+ _LockManagerProxy* __pLockManager;
};
}} // Tizen::Shell
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FShell_LockManagerIpcMessages.h
+ * @brief This is the header file for the LockManager Ipc message types.
+ */
+
+#include <FAppTypes.h>
+
+#include <ipc/ipc_message_macros.h>
+#include <FIo_IpcCommonParamTraits.h>
+#include <FIo_IpcMessageStart.h>
+
+#define IPC_MESSAGE_START LockManagerServiceStart
+
+IPC_SYNC_MESSAGE_CONTROL0_1(LockManager_Unlock, result)
+
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FShell_LockManagerProxy.h
+ * @brief This is the header file of the _LockManagerProxy class.
+ */
+
+#ifndef _FSHELL_INTERNAL_LOCK_MANAGER_PROXY_H_
+#define _FSHELL_INTERNAL_LOCK_MANAGER_PROXY_H_
+
+#include <FBaseObject.h>
+
+namespace Tizen { namespace Io { class _IpcClient; } }
+
+namespace Tizen { namespace Shell
+{
+
+/**
+ * @class _LockManagerProxy
+ * @brief
+ * @since 2.1
+ */
+class _LockManagerProxy
+ : public Tizen::Base::Object
+{
+public:
+ _LockManagerProxy(void);
+ virtual ~_LockManagerProxy(void);
+
+ result Construct(void);
+
+ result Unlock();
+
+private:
+ _LockManagerProxy(const _LockManagerProxy& rhs);
+
+ _LockManagerProxy& operator =(const _LockManagerProxy& rhs);
+
+private:
+ Tizen::Io::_IpcClient* __pIpcClient;
+
+}; // _LockManagerProxy
+
+} } // Tizen::Shell
+
+#endif // _FSHELL_INTERNAL_LOCK_MANAGER_PROXY_H_