Merge "Revert "Fix N_SE-46938 for tz list."" into devel_3.0_main
[platform/framework/native/appfw.git] / src / io / inc / FIo_RemoteMessagePortImpl.h
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        FIo_RemoteMessagePortImpl.h
19  * @brief       This is the header file for the _RemoteMessagePortImpl class.
20  *
21  * This file contains the declarations of  _RemoteMessagePortImpl
22  */
23
24
25 #ifndef _FIO_REMOTE_MESSAGE_PORT_IMPL_H_
26 #define _FIO_REMOTE_MESSAGE_PORT_IMPL_H_
27
28 #include <FBaseResult.h>
29 #include <FBaseDataType.h>
30 #include <FBaseObject.h>
31 #include <FBaseString.h>
32 #include <FBaseColIMap.h>
33 #include <FBaseColLinkedListT.h>
34 #include <FAppTypes.h>
35
36
37 namespace Tizen { namespace Io
38 {
39
40 class RemoteMessagePort;
41 class IMessagePortListener;
42
43 class _RemoteMessagePortImpl
44 {
45 public:
46         _RemoteMessagePortImpl(void);
47
48         virtual ~_RemoteMessagePortImpl(void);
49
50         result Construct(const Tizen::App::AppId& remoteAppId, const Tizen::Base::String& remotePort, bool isTrusted = false);
51
52         Tizen::Base::String GetName(void) const;
53
54         Tizen::App::AppId GetAppId(void) const;
55
56         bool IsTrusted(void) const;
57
58         result SendMessage(const Tizen::Base::Collection::IMap* pMessage);
59
60         result SendMessage(const LocalMessagePort* pLocalMessagePort, const Tizen::Base::Collection::IMap* pMessage);
61
62         static RemoteMessagePort* GetMessagePort(const Tizen::App::AppId& remoteAppId, const Tizen::Base::String& remotePort, bool isTrusted = false);
63
64         static RemoteMessagePort* GetMessagePortOnly(const Tizen::App::AppId& remoteAppId, const Tizen::Base::String& remotePort, bool isTrusted = false);
65
66 private:
67         _RemoteMessagePortImpl(const _RemoteMessagePortImpl& value);
68
69         _RemoteMessagePortImpl& operator =(const _RemoteMessagePortImpl& value);
70
71 private:
72         Tizen::App::AppId __remoteAppId;
73         Tizen::Base::String __remotePort;
74         bool __isTrusted;
75
76 }; // _RemoteMessagePortImpl
77
78 } } // Tizen::Io
79
80 #endif //_FIO_REMOTE_MESSAGE_PORT_IMPL_H_