From 2fc384384180cb8eeb13c3bd7984f40a50865a6c Mon Sep 17 00:00:00 2001 From: Karthik Subas Chandra Bose Date: Fri, 20 Dec 2013 15:11:01 +0900 Subject: [PATCH] Added alternativeText param to Sync API Change-Id: I6207118d6777809e4a9f1cc1a72983cad2f34a03 Signed-off-by: Karthik Subas Chandra Bose --- src/FShell_AppWidgetLayer.cpp | 4 +++- src/FShell_AppWidgetManagerProxy.cpp | 5 +++-- src/FShell_AppWidgetProviderManagerImpl.cpp | 14 +++----------- src/inc/FShell_AppWidgetManagerIpcMessage.h | 2 +- src/inc/FShell_AppWidgetManagerProxy.h | 2 +- src/inc/FShell_AppWidgetProviderManagerImpl.h | 3 +-- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/FShell_AppWidgetLayer.cpp b/src/FShell_AppWidgetLayer.cpp index bcc9e15..a2c5bbf 100644 --- a/src/FShell_AppWidgetLayer.cpp +++ b/src/FShell_AppWidgetLayer.cpp @@ -439,6 +439,7 @@ _AppWidgetLayer::SyncBuffer(const Dimension& size) SysTryReturn(NID_SHELL, !__providerId.IsEmpty(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); String screenReaderText(L""); + String alternativeText(L""); if (__pWindow) { @@ -451,12 +452,13 @@ _AppWidgetLayer::SyncBuffer(const Dimension& size) screenReaderText = pAccessibilityElement->GetTraitString(); } } + alternativeText = __pWindow->GetName(); } bool isEmpty = screenReaderText.IsEmpty(); SysLog(NID_SHELL, "IsEmpty(%d) %ls", isEmpty, screenReaderText.GetPointer()); - result r = _AppWidgetProviderManagerImpl::GetInstance()->SyncRemoteBuffer(__providerId, size.width, size.height, screenReaderText); + result r = _AppWidgetProviderManagerImpl::GetInstance()->SyncRemoteBuffer(__providerId, size.width, size.height, screenReaderText, alternativeText); SysTryReturn(NID_SHELL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); return r; diff --git a/src/FShell_AppWidgetManagerProxy.cpp b/src/FShell_AppWidgetManagerProxy.cpp index 6aada1a..c31e1ce 100644 --- a/src/FShell_AppWidgetManagerProxy.cpp +++ b/src/FShell_AppWidgetManagerProxy.cpp @@ -195,13 +195,14 @@ _AppWidgetManagerProxy::AcquireRemoteBufferForPD(const Tizen::Base::String& inst } result -_AppWidgetManagerProxy::SyncRemoteBuffer(const Tizen::Base::String& instanceId, int width, int height, const Tizen::Base::String& screenReaderText) +_AppWidgetManagerProxy::SyncRemoteBuffer(const Tizen::Base::String& instanceId, int width, int height, + const Tizen::Base::String& screenReaderText, const Tizen::Base::String& alternativeText) { SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_SYSTEM, "__pIpcClient instance must not be null."); SysLog(NID_SHELL, ""); result ret = E_FAILURE; - std::auto_ptr pMsg (new (std::nothrow) AppWidgetManager_SyncRemoteBuffer(instanceId, width, height, screenReaderText, &ret)); + std::auto_ptr pMsg (new (std::nothrow) AppWidgetManager_SyncRemoteBuffer(instanceId, width, height, screenReaderText, alternativeText, &ret)); result r = __pIpcClient->SendRequest(*pMsg.get()); SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "SendRequest failed."); diff --git a/src/FShell_AppWidgetProviderManagerImpl.cpp b/src/FShell_AppWidgetProviderManagerImpl.cpp index c21e5d6..bc6aad3 100644 --- a/src/FShell_AppWidgetProviderManagerImpl.cpp +++ b/src/FShell_AppWidgetProviderManagerImpl.cpp @@ -509,21 +509,13 @@ _AppWidgetProviderManagerImpl::ReleaseRemoteBufferForPD(const String& instanceId } result -_AppWidgetProviderManagerImpl::SyncRemoteBuffer(const String& instanceId, int width, int height) +_AppWidgetProviderManagerImpl::SyncRemoteBuffer(const String& instanceId, int width, int height, + const String& screenReaderText, const String& alternativeText) { _AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance(); SysTryReturnResult(NID_SHELL, pProxy, E_SYSTEM, "Failed to get proxy instance!"); - return pProxy->SyncRemoteBuffer(instanceId, width, height, L""); -} - -result -_AppWidgetProviderManagerImpl::SyncRemoteBuffer(const String& instanceId, int width, int height, const String& screenReaderText) -{ - _AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance(); - SysTryReturnResult(NID_SHELL, pProxy, E_SYSTEM, "Failed to get proxy instance!"); - - return pProxy->SyncRemoteBuffer(instanceId, width, height, screenReaderText); + return pProxy->SyncRemoteBuffer(instanceId, width, height, screenReaderText, alternativeText); } result diff --git a/src/inc/FShell_AppWidgetManagerIpcMessage.h b/src/inc/FShell_AppWidgetManagerIpcMessage.h index f23f558..4665ce7 100644 --- a/src/inc/FShell_AppWidgetManagerIpcMessage.h +++ b/src/inc/FShell_AppWidgetManagerIpcMessage.h @@ -35,7 +35,7 @@ IPC_SYNC_MESSAGE_CONTROL2_1(AppWidgetManager_RequestUpdateInstance, Tizen::Base: IPC_SYNC_MESSAGE_CONTROL3_1(AppWidgetManager_AcquireRemoteBuffer, Tizen::Base::String, int, int, int) IPC_SYNC_MESSAGE_CONTROL3_1(AppWidgetManager_AcquireRemoteBufferForPD, Tizen::Base::String, int, int, int) -IPC_SYNC_MESSAGE_CONTROL4_1(AppWidgetManager_SyncRemoteBuffer, Tizen::Base::String, int, int, Tizen::Base::String, result) +IPC_SYNC_MESSAGE_CONTROL5_1(AppWidgetManager_SyncRemoteBuffer, Tizen::Base::String, int, int, Tizen::Base::String, Tizen::Base::String, result) IPC_SYNC_MESSAGE_CONTROL1_1(AppWidgetManager_SyncRemoteBufferForPD, Tizen::Base::String, result) IPC_SYNC_MESSAGE_CONTROL1_1(AppWidgetManager_ReleaseRemoteBuffer, Tizen::Base::String, result) IPC_SYNC_MESSAGE_CONTROL1_1(AppWidgetManager_ReleaseRemoteBufferForPD, Tizen::Base::String, result) diff --git a/src/inc/FShell_AppWidgetManagerProxy.h b/src/inc/FShell_AppWidgetManagerProxy.h index 96ef43d..6fa0a41 100644 --- a/src/inc/FShell_AppWidgetManagerProxy.h +++ b/src/inc/FShell_AppWidgetManagerProxy.h @@ -64,7 +64,7 @@ public: result RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument); result AcquireRemoteBuffer(const Tizen::Base::String& instanceId, int w, int h, int& bufferId); result AcquireRemoteBufferForPD(const Tizen::Base::String& instanceId, int w, int h, int& bufferId); - result SyncRemoteBuffer(const Tizen::Base::String& instanceId, int width, int height, const Tizen::Base::String& screenReaderText); + result SyncRemoteBuffer(const Tizen::Base::String& instanceId, int width, int height, const Tizen::Base::String& screenReaderText, const Tizen::Base::String& alternativeText); result SyncRemoteBufferForPD(const Tizen::Base::String& instanceId); result ReleaseRemoteBuffer(const Tizen::Base::String& instanceId); result ReleaseRemoteBufferForPD(const Tizen::Base::String& instanceId); diff --git a/src/inc/FShell_AppWidgetProviderManagerImpl.h b/src/inc/FShell_AppWidgetProviderManagerImpl.h index dd8a393..708ebd2 100644 --- a/src/inc/FShell_AppWidgetProviderManagerImpl.h +++ b/src/inc/FShell_AppWidgetProviderManagerImpl.h @@ -84,8 +84,7 @@ public: result RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument = L""); result AcquireRemoteBuffer(const Tizen::Base::String& instanceId, int width, int height, int& bufferId); result AcquireRemoteBufferForPD(const Tizen::Base::String& instanceId, int width, int height, int& bufferId); - result SyncRemoteBuffer(const Tizen::Base::String& instanceId, int width, int height); - result SyncRemoteBuffer(const Tizen::Base::String& instanceId, int width, int height, const Tizen::Base::String& screenReaderText); + result SyncRemoteBuffer(const Tizen::Base::String& instanceId, int width, int height, const Tizen::Base::String& screenReaderText, const Tizen::Base::String& alternativeText); result SyncRemoteBufferForPD(const Tizen::Base::String& instanceId); result ReleaseRemoteBuffer(const Tizen::Base::String& instanceId); result ReleaseRemoteBufferForPD(const Tizen::Base::String& instanceId); -- 2.7.4