Merge "Changing the return value description of IsBitSet(), IsProbablePrimeNumber...
[platform/framework/native/appfw.git] / src / io / FIoRemoteMessagePort.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        FIoRemoteMessagePort.cpp
19  * @brief       This is the implementation file for the RemoteMessagePort class.
20  *
21  */
22
23 #include <FBaseSysLog.h>
24 #include <FBaseColHashMap.h>
25 #include <FIoRemoteMessagePort.h>
26 #include "FIo_RemoteMessagePortImpl.h"
27
28
29 using namespace Tizen::Base;
30 using namespace Tizen::Base::Collection;
31
32 namespace Tizen { namespace Io
33 {
34
35 RemoteMessagePort::RemoteMessagePort(void)
36         : __pRemoteMessagePortImpl(null)
37 {
38 }
39
40 RemoteMessagePort::~RemoteMessagePort(void)
41 {
42         delete __pRemoteMessagePortImpl;
43 }
44
45 String
46 RemoteMessagePort::GetName(void) const
47 {
48         return __pRemoteMessagePortImpl->GetName();
49 }
50
51 String
52 RemoteMessagePort::GetAppId(void) const
53 {
54         return __pRemoteMessagePortImpl->GetAppId();
55 }
56
57 bool
58 RemoteMessagePort::IsTrusted(void) const
59 {
60         return __pRemoteMessagePortImpl->IsTrusted();
61 }
62
63 result
64 RemoteMessagePort::SendMessage(const IMap* pMessage)
65 {
66         SysAssertf(__pRemoteMessagePortImpl != null, "Not yet constructed. Construct() should be called before use.\n");
67
68         return __pRemoteMessagePortImpl->SendMessage(pMessage);
69 }
70
71 result
72 RemoteMessagePort::SendMessage(const LocalMessagePort* pLocalMessagePort, const IMap* pMessage)
73 {
74         SysAssertf(__pRemoteMessagePortImpl != null, "Not yet constructed. Construct() should be called before use.\n");
75
76         return __pRemoteMessagePortImpl->SendMessage(pLocalMessagePort, pMessage);
77 }
78
79 } } // Tizen::Io