Add GetClientPackageId() in IpcServer
authorSunwook Bae <sunwook45.bae@samsung.com>
Fri, 22 Mar 2013 08:32:12 +0000 (17:32 +0900)
committerSunwook Bae <sunwook45.bae@samsung.com>
Fri, 22 Mar 2013 08:32:12 +0000 (17:32 +0900)
Change-Id: Ieb26db8e10cf0a13ac0606c615dc7a8e0845d8f9
Signed-off-by: Sunwook Bae <sunwook45.bae@samsung.com>
src/server/inc/FIo_IpcServer.h
src/server/io/FIo_IpcServer.cpp

index 7458d18..df1530c 100644 (file)
@@ -90,29 +90,19 @@ public:
         */
        int GetClientId(void) const;
 
-       /**
-        * Returns the process id of the client which sent a request message.
-        *
-        * @return The process id of the IPC client.
-        * @remark This can be called only in a message handler.
-        */
        int GetClientProcessId(void) const;
 
-       /**
-        * Returns the package id of the client which sent a request message.
-        *
-        * @return The package id of the IPC client.
-        * @remark This can be called only in a message handler.
-        */
        Tizen::Base::String GetClientAppId(void) const;
 
+       Tizen::Base::String GetClientAppExecutableName(void) const;
+
        /**
-        * Returns the executable name of the client which sent a request message.
+        * Returns the package id of the client which sent a request message.
         *
-        * @return The executable name of the IPC client.
+        * @return The package id of the IPC client.
         * @remark This can be called only in a message handler.
         */
-       Tizen::Base::String GetClientAppExecutableName(void) const;
+       Tizen::App::PackageId GetClientPackageId(void) const;
 
        /**
         * Returns the application id of the client which sent a request message.
index 1888911..24a0d53 100644 (file)
@@ -419,6 +419,19 @@ _IpcServer::GetClientAppExecutableName(void) const
        return nullString;
 }
 
+PackageId
+_IpcServer::GetClientPackageId(void) const
+{
+       static String nullString;
+
+       if (__pCurrentClientInfo)
+       {
+               return __pCurrentClientInfo->pkgId;
+       }
+
+       return nullString;
+}
+
 AppId
 _IpcServer::GetClientApplicationId(void) const
 {