Added alternativeText param to Sync API 67/14867/1
authorKarthik Subas Chandra Bose <karthik.scb@samsung.com>
Fri, 20 Dec 2013 06:11:01 +0000 (15:11 +0900)
committerKeebong <keebong.bahn@samsung.com>
Mon, 13 Jan 2014 09:41:22 +0000 (18:41 +0900)
Change-Id: I6207118d6777809e4a9f1cc1a72983cad2f34a03
Signed-off-by: Karthik Subas Chandra Bose <karthik.scb@samsung.com>
src/FShell_AppWidgetLayer.cpp
src/FShell_AppWidgetManagerProxy.cpp
src/FShell_AppWidgetProviderManagerImpl.cpp
src/inc/FShell_AppWidgetManagerIpcMessage.h
src/inc/FShell_AppWidgetManagerProxy.h
src/inc/FShell_AppWidgetProviderManagerImpl.h

index bcc9e15..a2c5bbf 100644 (file)
@@ -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;
index 6aada1a..c31e1ce 100644 (file)
@@ -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<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_SyncRemoteBuffer(instanceId, width, height, screenReaderText, &ret));
+       std::auto_ptr<IPC::Message> 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.");
 
index c21e5d6..bc6aad3 100644 (file)
@@ -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
index f23f558..4665ce7 100644 (file)
@@ -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)
index 96ef43d..6fa0a41 100644 (file)
@@ -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);
index dd8a393..708ebd2 100644 (file)
@@ -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);