Merge "Changing the return value description of IsBitSet(), IsProbablePrimeNumber...
[platform/framework/native/appfw.git] / src / io / FIo_RemoteMessagePortImpl.cpp
index 00df8cf..c8345e9 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -88,7 +87,6 @@ result
 _RemoteMessagePortImpl::SendMessage(const IMap* pMessage)
 {
        SysTryReturnResult(NID_IO, pMessage != null, E_INVALID_ARG, "The argument is null.");
-       SysTryReturnResult(NID_IO, CheckMessageType(pMessage), E_INVALID_ARG, "The argument is invalid.");
 
        return _MessagePortProxy::GetProxy()->SendMessage(__remoteAppId, __remotePort, __isTrusted, (HashMap*)pMessage);
 }
@@ -98,39 +96,10 @@ _RemoteMessagePortImpl::SendMessage(const LocalMessagePort* pLocalMessagePort, c
 {
        SysTryReturnResult(NID_IO, pLocalMessagePort != null, E_INVALID_ARG, "The argument is null.");
        SysTryReturnResult(NID_IO, pMessage != null, E_INVALID_ARG, "The argument is null.");
-       SysTryReturnResult(NID_IO, CheckMessageType(pMessage), E_INVALID_ARG, "The argument is invalid.");
 
        return _MessagePortProxy::GetProxy()->SendMessage(pLocalMessagePort->GetName(), pLocalMessagePort->IsTrusted(), __remoteAppId, __remotePort, __isTrusted, (HashMap*)pMessage);
 }
 
-bool
-_RemoteMessagePortImpl::CheckMessageType(const IMap* pMessage)
-{
-       std::unique_ptr<IMapEnumerator> pEnum (pMessage->GetMapEnumeratorN());
-       while(pEnum->MoveNext() == E_SUCCESS)
-       {
-               const String* pKey = dynamic_cast<const String*>(pEnum->GetKey());
-               const Object* pValue = pEnum->GetValue();
-
-               if (pKey && pValue)
-               {
-                       if (typeid(*pValue) != typeid(const String))
-                       {
-                               if (typeid(*pValue) != typeid(const ByteBuffer))
-                               {
-                                       return false;
-                               }
-                       }
-               }
-               else
-               {
-                       return false;
-               }
-       }
-
-       return true;
-}
-
 RemoteMessagePort*
 _RemoteMessagePortImpl::GetMessagePort(const AppId& remoteAppId, const String& remotePort, bool isTrusted)
 {
@@ -143,8 +112,6 @@ _RemoteMessagePortImpl::GetMessagePort(const AppId& remoteAppId, const String& r
        SysTryCatch(NID_IO, pImpl != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
 
        r = pImpl->Construct(remoteAppId, remotePort, isTrusted);
-       //SysTryCatch(NID_IO, r != E_OBJ_NOT_FOUND, , E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The remote message port is not found.");
-       //SysTryCatch(NID_IO, r != E_CERTIFICATE_VERIFICATION_FAILED, , E_CERTIFICATE_VERIFICATION_FAILED, "[E_CERTIFICATE_VERIFICATION_FAILED] The target application is not signed with the same certificate.");
        SysTryCatch(NID_IO, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
        pRemoteMessagePort->__pRemoteMessagePortImpl = pImpl.release();