Release 4.0.0-preview1-00184
[platform/core/csapi/tizenfx.git] / Artifacts / bin / public / Tizen.Applications.MessagePort.xml
1 <?xml version="1.0"?>
2 <doc>
3     <assembly>
4         <name>Tizen.Applications.MessagePort</name>
5     </assembly>
6     <members>
7         <member name="T:Tizen.Applications.Messages.MessagePort">
8             <summary>
9             The message port API provides functions to send and receive messages between applications.
10             </summary>
11             <remarks>
12             The message port API provides functions for passing messages between applications. An application should register its own local port to receive messages from remote applications.
13             If a remote application sends a message, the registered callback function of the local port is called.
14             The trusted message-port API allows communications between applications that are signed by the same developer(author) certificate.
15             </remarks>
16         </member>
17         <member name="M:Tizen.Applications.Messages.MessagePort.#ctor(System.String,System.Boolean)">
18             <summary>
19             Initializes the instance of the MessagePort class.
20             </summary>
21             <param name="portName">The name of the local message port.</param>
22             <param name="trusted">If true, it is the trusted message port of application, otherwise false.</param>
23             <exception cref="T:System.ArgumentException">Thrown when portName is null or empty.</exception>
24             <code>
25             MessagePort messagePort = new MessagePort("SenderPort", true);
26             </code>
27         </member>
28         <member name="M:Tizen.Applications.Messages.MessagePort.Finalize">
29             <summary>
30             Destructor of the MessagePort class.
31             </summary>
32         </member>
33         <member name="E:Tizen.Applications.Messages.MessagePort.MessageReceived">
34             <summary>
35             Called when a message is received.
36             </summary>
37             <code>
38             MessagePort messagePort = new MessagePort("SenderPort", true);
39             messagePort.MessageReceived += MessageReceivedCallback;
40             static void MessageReceivedCallback(object sender, MessageReceivedEventArgs e)
41             {
42                 Console.WriteLine("Message Received ");
43                 if (e.Remote.AppId != null) {
44                     Console.WriteLine("from :"+e.Remote.AppId);
45                 }
46             }
47             </code>
48         </member>
49         <member name="P:Tizen.Applications.Messages.MessagePort.PortName">
50             <summary>
51             The name of the local message port.
52             </summary>
53         </member>
54         <member name="P:Tizen.Applications.Messages.MessagePort.Trusted">
55             <summary>
56             If true, the message port is a trusted port, otherwise false.
57             </summary>
58         </member>
59         <member name="P:Tizen.Applications.Messages.MessagePort.Listening">
60             <summary>
61             If true, the message port is listening, otherwise false.
62             </summary>
63         </member>
64         <member name="M:Tizen.Applications.Messages.MessagePort.Listen">
65             <summary>
66             Register the local message port.
67             </summary>
68             <exception cref="T:System.InvalidOperationException">Thrown when portName is already used, when there is an I/O error.</exception>
69             <exception cref="T:System.ArgumentException">Thrown when there is an invalid parameter.</exception>
70             <exception cref="T:System.OutOfMemoryException">Thrown when out of memory.</exception>
71             <code>
72             MessagePort messagePort = new MessagePort("SenderPort", true);
73             messagePort.MessageReceived += MessageReceivedCallback;
74             messagePort.Listen();
75             </code>
76         </member>
77         <member name="M:Tizen.Applications.Messages.MessagePort.StopListening">
78             <summary>
79             Unregisters the local message port.
80             </summary>
81             <exception cref="T:System.InvalidOperationException">Thrown when messageport is already stopped, when there is an I/O error, when the port is not found.</exception>
82             <exception cref="T:System.ArgumentException">Thrown when there is an invalid parameter.</exception>
83             <exception cref="T:System.OutOfMemoryException">Thrown when out of memory.</exception>
84             <code>
85             MessagePort messagePort = new MessagePort("SenderPort", true);
86             messagePort.MessageReceived += MessageReceivedCallback;
87             messagePort.Listen();
88             using (var message = new Tizen.Application.Bundle())
89             {
90                 message.AddItem("message", "a_string");
91                 messagePort.Send(message, "ReceiverAppID", "ReceiverPort");
92             }
93             messagePort.StopListening();
94             </code>
95         </member>
96         <member name="M:Tizen.Applications.Messages.MessagePort.Send(Tizen.Applications.Bundle,System.String,System.String)">
97             <summary>
98             Sends an untrusted message to the message port of a remote application.
99             </summary>
100             <param name="message">The message to be passed to the remote application, the recommended message size is under 4KB.</param>
101             <param name="remoteAppId">The ID of the remote application.</param>
102             <param name="remotePortName">The name of the remote message port.</param>
103             <exception cref="T:System.InvalidOperationException">Thrown when there is an I/O error, when the port is not found.</exception>
104             <exception cref="T:System.ArgumentException">Thrown when there is an invalid parameter.</exception>
105             <exception cref="T:System.OutOfMemoryException">Thrown when out of memory.</exception>
106             <exception cref="T:System.ArgumentOutOfRangeException">Thrown when message has exceeded the maximum limit(4KB).</exception>
107             <code>
108             MessagePort messagePort = new MessagePort("SenderPort", true);
109             messagePort.MessageReceived += MessageReceivedCallback;
110             messagePort.Listen();
111             using (var message = new Tizen.Application.Bundle())
112             {
113                 message.AddItem("message", "a_string");
114                 messagePort.Send(message, "ReceiverAppID", "ReceiverPort");
115             }
116             </code>
117         </member>
118         <member name="M:Tizen.Applications.Messages.MessagePort.Send(Tizen.Applications.Bundle,System.String,System.String,System.Boolean)">
119             <summary>
120             Sends a message to the message port of a remote application.
121             </summary>
122             <param name="message">The message to be passed to the remote application, the recommended message size is under 4KB.</param>
123             <param name="remoteAppId">The ID of the remote application.</param>
124             <param name="remotePortName">The name of the remote message port.</param>
125             <param name="trusted">If true, it is the trusted message port of remote application, otherwise false.</param>
126             <exception cref="T:System.InvalidOperationException">Thrown when there is an I/O error, when the port is not found.</exception>
127             <exception cref="T:System.ArgumentException">Thrown when there is an invalid parameter.</exception>
128             <exception cref="T:System.OutOfMemoryException">Thrown when out of memory.</exception>
129             <exception cref="T:System.ArgumentOutOfRangeException">Thrown when message has exceeded the maximum limit(4KB).</exception>
130             <exception cref="T:System.UnauthorizedAccessException">Thrown when the remote application is not signed with the same certificate.</exception>
131             <code>
132             MessagePort messagePort = new MessagePort("SenderPort", true);
133             messagePort.MessageReceived += MessageReceivedCallback;
134             messagePort.Listen();
135             using (var message = new Tizen.Application.Bundle())
136             {
137                 message.AddItem("message", "a_string");
138                 messagePort.Send(message, "ReceiverAppID", "ReceiverPort", true);
139             }
140             </code>
141         </member>
142         <member name="M:Tizen.Applications.Messages.MessagePort.Dispose(System.Boolean)">
143             <summary>
144             Releases the unmanaged resources used by the MessagePort class specifying whether to perform a normal dispose operation.
145             </summary>
146             <param name="disposing">true for a normal dispose operation; false to finalize the handle.</param>
147         </member>
148         <member name="M:Tizen.Applications.Messages.MessagePort.Dispose">
149             <summary>
150             Releases all resources used by the MessagePort class.
151             </summary>
152         </member>
153         <member name="T:Tizen.Applications.Messages.MessageReceivedEventArgs">
154             <summary>
155             An extended EventArgs class, which contains remote message port information and message.
156             </summary>
157         </member>
158         <member name="P:Tizen.Applications.Messages.MessageReceivedEventArgs.Remote">
159             <summary>
160             Contains AppId, port name, and trusted.
161             </summary>
162         </member>
163         <member name="P:Tizen.Applications.Messages.MessageReceivedEventArgs.Message">
164             <summary>
165             The message passed from the remote application.
166             </summary>
167         </member>
168         <member name="T:Tizen.Applications.Messages.RemotePort">
169             <summary>
170             The RemotePort Class provides functions to get if the remote port is running and to get whether the remote port is registered or unregistered.
171             </summary>
172             <since_tizen> 4 </since_tizen>
173         </member>
174         <member name="M:Tizen.Applications.Messages.RemotePort.#ctor(System.String,System.String,System.Boolean)">
175             <summary>
176             Constructor of the RemotePort class.
177             </summary>
178             <since_tizen> 4 </since_tizen>
179             <param name="appId">The Id of the remote application</param>
180             <param name="portName">The name of the remote message port</param>
181             <param name="trusted">If true is the trusted message port of application, otherwise false</param>
182             <exception cref="T:System.ArgumentException">Thrown when appId is null or empty, when portName is null or empty</exception>
183             <code>
184             RemotePort remotePort = new RemotePort("org.tizen.example.messageport", "SenderPort", false);
185             </code>
186         </member>
187         <member name="M:Tizen.Applications.Messages.RemotePort.Finalize">
188             <summary>
189             Destructor of the RemotePort class.
190             </summary>
191             <since_tizen> 4 </since_tizen>
192         </member>
193         <member name="P:Tizen.Applications.Messages.RemotePort.AppId">
194             <summary>
195             The AppId of the remote port
196             </summary>
197             <since_tizen> 4 </since_tizen>
198             <returns> Return appid of RemotePort </returns>
199         </member>
200         <member name="P:Tizen.Applications.Messages.RemotePort.PortName">
201             <summary>
202             The name of the remote message port
203             </summary>
204             <since_tizen> 4 </since_tizen>
205             <returns> Return name of RemotePort </returns>
206         </member>
207         <member name="P:Tizen.Applications.Messages.RemotePort.Trusted">
208             <summary>
209             If true the remote port is a trusted port, otherwise if false it is not
210             </summary>
211             <since_tizen> 4 </since_tizen>
212              <returns> Return true if RemotePort is trusted </returns>
213         </member>
214         <member name="M:Tizen.Applications.Messages.RemotePort.IsRunning">
215             <summary>
216             Check if the remote message port is running.
217             </summary>
218             <since_tizen> 4 </since_tizen>
219             <exception cref="T:System.InvalidOperationException">Thrown when there is an I/O error</exception>
220             <exception cref="T:System.OutOfMemoryException">Thrown when out of memory.</exception>
221             <code>
222             Remote remotePort = new RemotePort("org.tizen.example", "SenderPort", true);
223             bool isRunning = remotePort.isRunning();
224             </code>
225             <returns> Return true if Remote Port is running </returns>
226         </member>
227         <member name="E:Tizen.Applications.Messages.RemotePort.RemotePortStateChanged">
228             <summary>
229             Called when the remote port is registered or unregistered.
230             </summary>
231             <since_tizen> 4 </since_tizen>
232             <exception cref="T:System.InvalidOperationException">Thrown when there is an I/O error</exception>
233             <exception cref="T:System.OutOfMemoryException">Thrown when out of memory.</exception>
234             <code>
235             Remote remotePort = new RemotePort("org.tizen.example", "SenderPort", true);
236             remotePort.RemotePortStateChanged += RemotePortStateChangedCallback;
237             static void RemotePortStateChangedCallback(object sender, MessageReceivedEventArgs e)
238             {
239                 switch (e.Status)
240                 {
241                 case State.Registered :
242                     Console.WriteLine("Remote Port Registered ");
243                     break;
244                 case State.Unregistered :
245                     Console.WriteLine("Remote Port Unregistered ");
246                     break;
247                 default :
248                     break;
249                 }
250             }
251             </code>
252         </member>
253         <member name="M:Tizen.Applications.Messages.RemotePort.Dispose(System.Boolean)">
254             <summary>
255             Releases the unmanaged resources used by the RemotePort class specifying whether to perform a normal dispose operation.
256             </summary>
257             <param name="disposing">true for a normal dispose operation; false to finalize the handle.</param>
258         </member>
259         <member name="M:Tizen.Applications.Messages.RemotePort.Dispose">
260             <summary>
261             Releases all resources used by the RemotePort class.
262             </summary>
263             <since_tizen> 4 </since_tizen>
264         </member>
265         <member name="T:Tizen.Applications.Messages.State">
266             <summary>
267             Enumeration for Remote Message Port state type
268             </summary>
269             <since_tizen> 4 </since_tizen>
270         </member>
271         <member name="F:Tizen.Applications.Messages.State.Unregistered">
272             <summary>
273             Value representing Remote Port state is unregistered
274             </summary>
275         </member>
276         <member name="F:Tizen.Applications.Messages.State.Registered">
277             <summary>
278             Value representing Remote Port state is registered
279             </summary>
280         </member>
281         <member name="T:Tizen.Applications.Messages.RemotePortStateChangedEventArgs">
282             <summary>
283             An extended EventArgs class which contains state of remote message port
284             </summary>
285             <since_tizen> 4 </since_tizen>
286         </member>
287         <member name="P:Tizen.Applications.Messages.RemotePortStateChangedEventArgs.Status">
288             <summary>
289             The State of remote port
290             </summary>
291             <since_tizen> 4 </since_tizen>
292         </member>
293         <member name="T:Tizen.Applications.Messages.RemoteValues">
294             <summary>
295             Contains AppId, port name, and trusted.
296             </summary>
297         </member>
298         <member name="P:Tizen.Applications.Messages.RemoteValues.AppId">
299             <summary>
300             The ID of the remote application that sent this message.
301             </summary>
302         </member>
303         <member name="P:Tizen.Applications.Messages.RemoteValues.PortName">
304             <summary>
305             The name of the remote message port.
306             </summary>
307         </member>
308         <member name="P:Tizen.Applications.Messages.RemoteValues.Trusted">
309             <summary>
310             If true, the remote port is a trusted port, otherwise, if false, it is not.
311             </summary>
312         </member>
313     </members>
314 </doc>