Release 4.0.0-preview1-00081
[platform/core/csapi/tizenfx.git] / binaries / frameworks / 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.InvalidOperationException">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 invalid parameter, when out of memory, when there is an I/O error.</exception>
69             <code>
70             MessagePort messagePort = new MessagePort("SenderPort", true);
71             messagePort.MessageReceived += MessageReceivedCallback;
72             messagePort.Listen();
73             </code>
74         </member>
75         <member name="M:Tizen.Applications.Messages.MessagePort.StopListening">
76             <summary>
77             Unregisters the local message port.
78             </summary>
79             <exception cref="T:System.InvalidOperationException">Thrown when messageport is already stopped, when there is an invalid parameter, when the port is not found, when out of memory, when there is an I/O error.</exception>
80             <code>
81             MessagePort messagePort = new MessagePort("SenderPort", true);
82             messagePort.MessageReceived += MessageReceivedCallback;
83             messagePort.Listen();
84             using (var message = new Tizen.Application.Bundle())
85             {
86                 message.AddItem("message", "a_string");
87                 messagePort.Send(message, "ReceiverAppID", "ReceiverPort");
88             }
89             messageProt.StopListening();
90             </code>
91         </member>
92         <member name="M:Tizen.Applications.Messages.MessagePort.Send(Tizen.Applications.Bundle,System.String,System.String)">
93             <summary>
94             Sends an untrusted message to the message port of a remote application.
95             </summary>
96             <param name="message">The message to be passed to the remote application, the recommended message size is under 4KB.</param>
97             <param name="remoteAppId">The ID of the remote application.</param>
98             <param name="remotePortName">The name of the remote message port.</param>
99             <exception cref="T:System.InvalidOperationException">Thrown when there is an invalid parameter, when the port is not found, when out of memory, when there is an I/O error.</exception>
100             <exception cref="T:System.ArgumentOutOfRangeException">Thrown when message has exceeded the maximum limit(4KB).</exception>
101             <code>
102             MessagePort messagePort = new MessagePort("SenderPort", true);
103             messagePort.MessageReceived += MessageReceivedCallback;
104             messagePort.Listen();
105             using (var message = new Tizen.Application.Bundle())
106             {
107                 message.AddItem("message", "a_string");
108                 messagePort.Send(message, "ReceiverAppID", "ReceiverPort");
109             }
110             </code>
111         </member>
112         <member name="M:Tizen.Applications.Messages.MessagePort.Send(Tizen.Applications.Bundle,System.String,System.String,System.Boolean)">
113             <summary>
114             Sends a message to the message port of a remote application.
115             </summary>
116             <param name="message">The message to be passed to the remote application, the recommended message size is under 4KB.</param>
117             <param name="remoteAppId">The ID of the remote application.</param>
118             <param name="remotePortName">The name of the remote message port.</param>
119             <param name="trusted">If true, it is the trusted message port of remote application, otherwise false.</param>
120             <exception cref="T:System.InvalidOperationException">Thrown when there is an invalid parameter, when the port is not found, when out of memory, when there is an I/O error.</exception>
121             <exception cref="T:System.ArgumentOutOfRangeException">Thrown when message has exceeded the maximum limit(4KB).</exception>
122             <code>
123             MessagePort messagePort = new MessagePort("SenderPort", true);
124             messagePort.MessageReceived += MessageReceivedCallback;
125             messagePort.Listen();
126             using (var message = new Tizen.Application.Bundle())
127             {
128                 message.AddItem("message", "a_string");
129                 messagePort.Send(message, "ReceiverAppID", "ReceiverPort", true);
130             }
131             </code>
132         </member>
133         <member name="M:Tizen.Applications.Messages.MessagePort.Dispose(System.Boolean)">
134             <summary>
135             Releases the unmanaged resource used by the MessagePort class specifying whether to perform a normal dispose operation.
136             </summary>
137             <param name="disposing">true for a normal dispose operation; false to finalize the handle.</param>
138         </member>
139         <member name="M:Tizen.Applications.Messages.MessagePort.Dispose">
140             <summary>
141             Releases all resources used by the MessagePort class.
142             </summary>
143         </member>
144         <member name="T:Tizen.Applications.Messages.MessageReceivedEventArgs">
145             <summary>
146             An extended EventArgs class, which contains remote message port information and message.
147             </summary>
148         </member>
149         <member name="P:Tizen.Applications.Messages.MessageReceivedEventArgs.Remote">
150             <summary>
151             Contains AppId, port name, and trusted.
152             </summary>
153         </member>
154         <member name="P:Tizen.Applications.Messages.MessageReceivedEventArgs.Message">
155             <summary>
156             The message passed from the remote application.
157             </summary>
158         </member>
159         <member name="T:Tizen.Applications.Messages.RemoteValues">
160             <summary>
161             Contains AppId, port name, and trusted.
162             </summary>
163         </member>
164         <member name="P:Tizen.Applications.Messages.RemoteValues.AppId">
165             <summary>
166             The ID of the remote application that sent this message.
167             </summary>
168         </member>
169         <member name="P:Tizen.Applications.Messages.RemoteValues.PortName">
170             <summary>
171             The name of the remote message port.
172             </summary>
173         </member>
174         <member name="P:Tizen.Applications.Messages.RemoteValues.Trusted">
175             <summary>
176             If true, the remote port is a trusted port, otherwise, if false, it is not.
177             </summary>
178         </member>
179     </members>
180 </doc>