#ifndef _FIO_INTERNAL_MESSAGE_PORT_SERVICE_H_
#define _FIO_INTERNAL_MESSAGE_PORT_SERVICE_H_
+#include <message-port-data-types.h>
+
#include <FBaseResult.h>
#include <FBaseString.h>
#include <FBaseColHashMap.h>
class Message;
}
-namespace Tizen { namespace Io
-{
-
class _MessagePortStub;
class _MessagePortService
virtual result Construct(_MessagePortStub& stub);
- virtual result RegisterMessagePort(const Tizen::Base::String& appId,
- const Tizen::Base::String& port,
- int clientId,
- bool isTrusted);
+ virtual int RegisterMessagePort(int clientId, const BundleBuffer& buffer);
- virtual result RequestRemotePort(const Tizen::App::AppId& remoteAppId,
- const Tizen::Base::String& remotePort,
- bool isTrusted);
+ virtual int CheckRemotePort(const BundleBuffer& buffer);
result UnregisterMessagePort(int clientId);
- virtual result SendMessage(const Tizen::Base::String& dest,
- const Tizen::Base::String& destPort,
- bool isTrusted,
- const Tizen::Base::Collection::HashMap* pMap);
-
- virtual result SendMessage(const Tizen::Base::String& src,
- const Tizen::Base::String& srcPort,
- bool isTrustedSrc,
- const Tizen::Base::String& dest,
- const Tizen::Base::String& destPort,
- bool isTrustedDest,
- const Tizen::Base::Collection::HashMap* pMap);
+ virtual int SendMessage(const BundleBuffer& buffer);
private:
- Tizen::Base::String GetKey(const Tizen::Base::String& appId, const Tizen::Base::String& port) const;
+ Tizen::Base::String GetKey(const BundleBuffer& buffer, bool local = true) const;
+
+ bool IsPreloaded(const Tizen::Base::String& localAppId, const Tizen::Base::String& remoteAppId) const;
+
+ int CheckCertificate(const Tizen::Base::String& localAppId, const Tizen::Base::String& remoteAppId) const;
class _StringHashProvider
: public Tizen::Base::Collection::IHashCodeProviderT<Tizen::Base::String>
Tizen::Base::Collection::HashMapT <Tizen::Base::String, int>* __pTrustedPorts;
}; // _MessagePortService
-} } // Tizen::Io
-
#endif // _FIO_INTERNAL_MESSAGE_PORT_SERVICE_H_