Adding a function to get the provider count
[platform/framework/native/shell.git] / src / FShell_AppWidgetManagerProxy.cpp
index 61dc8a1..7ad3df8 100644 (file)
@@ -227,6 +227,19 @@ _AppWidgetManagerProxy::RequestReleaseSharedMemoryForPD(const Tizen::Base::Strin
 }
 
 result
+_AppWidgetManagerProxy::RequestProviderCount(const Tizen::Base::String& instanceId, int &count)
+{
+       SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_SYSTEM, "__pIpcClient instance must not be null.");
+       SysLog(NID_SHELL, "");
+
+       std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestProviderCount(instanceId, &count));
+       result r = __pIpcClient->SendRequest(*pMsg.get());
+       SysTryReturnResult(NID_SHELL, !IsFailed(r), r, "SendRequest failed.");
+
+       return E_SUCCESS;
+}
+
+result
 _AppWidgetManagerProxy::SendResult(const Tizen::Base::String& instanceId, bool isSucceeded)
 {
        SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_SYSTEM, "__pIpcClient instance must not be null.");
@@ -234,7 +247,7 @@ _AppWidgetManagerProxy::SendResult(const Tizen::Base::String& instanceId, bool i
 
        std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_SendResult(instanceId, isSucceeded));
        result r = __pIpcClient->SendRequest(*pMsg.get());
-       SysTryReturnResult(NID_SHELL, !IsFailed(r), r, "SendResult failed.");
+       SysTryReturnResult(NID_SHELL, !IsFailed(r), r, "SendRequest failed.");
 
        return E_SUCCESS;
 }