namespace Tizen.Applications.RPCPort
{
/// <summary>
- /// Exception class for invalid IO
+ /// Exception class for invalid IO.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public class InvalidIOException : InvalidOperationException { }
/// <summary>
- /// Exception class for invalid ID
+ /// Exception class for invalid ID.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public class InvalidIDException : InvalidOperationException { }
/// <summary>
- /// Exception class for permission denied
+ /// Exception class for permission denied.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public class PermissionDeniedException : InvalidOperationException { }
/// <summary>
- /// Exception class for invalid protocol
+ /// Exception class for invalid protocol.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public class InvalidProtocolException : InvalidOperationException { }
/// <summary>
- /// Exception class which will be thrown when not connected socket is used
+ /// Exception class, which is thrown when a non connected socket is used.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public class NotConnectedSocketException : InvalidOperationException { }
/// <summary>
- /// Exception class which will be thrown when invalid callback object is used
+ /// Exception class, which is thrown when an invalid callback object is used.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public class InvalidCallbackException : InvalidOperationException { }
namespace Tizen.Applications.RPCPort
{
/// <summary>
- /// The class for helping marshalling and unmarshalling for RPC
+ /// The class that helps to perform marshalling and unmarshalling for RPC.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public class Parcel : IDisposable
private IntPtr _handle;
/// <summary>
- /// Constructor for this class
+ /// Constructor for this class.
/// </summary>
- /// <exception cref="InvalidIOException">Thrown when internal IO error happens</exception>
+ /// <exception cref="InvalidIOException">Thrown when an internal IO error occurs.</exception>
/// <since_tizen> 5 </since_tizen>
public Parcel()
{
}
/// <summary>
- /// Constructor with Port object
+ /// Constructor with port object.
/// </summary>
- /// <param name="port">Port object</param>
- /// <exception cref="InvalidIOException">Thrown when internal IO error happens</exception>
+ /// <param name="port">Port object.</param>
+ /// <exception cref="InvalidIOException">Thrown when an internal IO error occurs.</exception>
/// <since_tizen> 5 </since_tizen>
public Parcel(Port port)
{
}
/// <summary>
- /// Sends parcel data through the port
+ /// Sends parcel data through the port.
/// </summary>
- /// <param name="p">The RPC port object for writing data</param>
- /// <exception cref="InvalidIOException">Thrown when internal IO error happens</exception>
+ /// <param name="p">The RPC port object for writing data.</param>
+ /// <exception cref="InvalidIOException">Thrown when an internal IO error occurs.</exception>
/// <since_tizen> 5 </since_tizen>
public void Send(Port p)
{
}
/// <summary>
- /// Writes 'byte' type value into Parcel object
+ /// Writes a byte value into parcel object.
/// </summary>
- /// <param name="b">'byte' type data</param>
+ /// <param name="b">byte data.</param>
/// <since_tizen> 5 </since_tizen>
public void WriteByte(byte b)
{
}
/// <summary>
- /// Writes 'short' type value into Parcel object
+ /// Writes a short value into parcel object.
/// </summary>
- /// <param name="b">'short' type data</param>
+ /// <param name="b">short data.</param>
/// <since_tizen> 5 </since_tizen>
public void WriteShort(short b)
{
}
/// <summary>
- /// Writes 'int' type value into Parcel object
+ /// Writes an int value into parcel object.
/// </summary>
- /// <param name="b">'int' type data</param>
+ /// <param name="b">int data.</param>
/// <since_tizen> 5 </since_tizen>
public void WriteInt(int b)
{
}
/// <summary>
- /// Writes a Long type value into Parcel handle
+ /// Writes a long value into parcel object.
/// </summary>
- /// <param name="b">'long' type data</param>
+ /// <param name="b">long data.</param>
/// <since_tizen> 5 </since_tizen>
public void WriteLong(long b)
{
}
/// <summary>
- /// Writes a 'float' type value into Parcel handle
+ /// Writes a float value into parcel object.
/// </summary>
- /// <param name="b">'float' type data</param>
+ /// <param name="b">float data.</param>
/// <since_tizen> 5 </since_tizen>
public void WriteFloat(float b)
{
}
/// <summary>
- /// Writes a 'double' type value into Parcel handle
+ /// Writes a double value into parcel object.
/// </summary>
- /// <param name="b">'double' type data</param>
+ /// <param name="b">double data.</param>
/// <since_tizen> 5 </since_tizen>
public void WriteDouble(double b)
{
}
/// <summary>
- /// Writes a 'string' type value into Parcel handle
+ /// Writes a string value into parcel object.
/// </summary>
- /// <param name="b">'string' type data</param>
+ /// <param name="b">string data.</param>
/// <since_tizen> 5 </since_tizen>
public void WriteString(string b)
{
}
/// <summary>
- /// Writes a 'bool' type value into Parcel handle
+ /// Writes a bool value into parcel object.
/// </summary>
- /// <param name="b">'bool' type data</param>
+ /// <param name="b">bool data.</param>
/// <since_tizen> 5 </since_tizen>
public void WriteBool(bool b)
{
}
/// <summary>
- /// Writes a 'Bundle' type value into Parcel handle
+ /// Writes a Bundle data into parcel object.
/// </summary>
- /// <param name="b">'Bundle' type data</param>
+ /// <param name="b">Bundle data.</param>
/// <since_tizen> 5 </since_tizen>
public void WriteBundle(Bundle b)
{
}
/// <summary>
- /// Writes a count for array into Parcel object
+ /// Writes a count of an array into parcel object.
/// </summary>
- /// <param name="cnt">Array count</param>
+ /// <param name="cnt">Array count.</param>
/// <since_tizen> 5 </since_tizen>
public void WriteArrayCount(int cnt)
{
}
/// <summary>
- /// Reads 'byte' type value from Parcel object
+ /// Reads a byte value from parcel object.
/// </summary>
- /// <returns>'byte' type data</returns>
+ /// <returns>byte data.</returns>
/// <since_tizen> 5 </since_tizen>
public byte ReadByte()
{
}
/// <summary>
- /// Reads 'short' type value from Parcel object
+ /// Reads a short value from parcel object.
/// </summary>
- /// <returns>'short' type data</returns>
+ /// <returns>short data.</returns>
/// <since_tizen> 5 </since_tizen>
public short ReadShort()
{
}
/// <summary>
- /// Reads 'int' type value from Parcel object
+ /// Reads an int value from parcel object.
/// </summary>
- /// <returns>'int' type data</returns>
+ /// <returns>int data.</returns>
/// <since_tizen> 5 </since_tizen>
public int ReadInt()
{
}
/// <summary>
- /// Reads 'long' type value from Parcel object
+ /// Reads a long value from parcel object.
/// </summary>
- /// <returns>'long' type data</returns>
+ /// <returns>long data.</returns>
/// <since_tizen> 5 </since_tizen>
public long ReadLong()
{
}
/// <summary>
- /// Reads 'float' type value from Parcel object
+ /// Reads a float value from parcel object.
/// </summary>
- /// <returns>'float' type data</returns>
+ /// <returns>float data.</returns>
/// <since_tizen> 5 </since_tizen>
public float ReadFloat()
{
}
/// <summary>
- /// Reads 'double' type value from Parcel object
+ /// Reads a double value from parcel object.
/// </summary>
- /// <returns>'double' type data</returns>
+ /// <returns>double data.</returns>
/// <since_tizen> 5 </since_tizen>
public double ReadDouble()
{
}
/// <summary>
- /// Reads 'string' type value from Parcel object
+ /// Reads a string value from parcel object.
/// </summary>
- /// <returns>'string' type data</returns>
+ /// <returns>string data.</returns>
/// <since_tizen> 5 </since_tizen>
public string ReadString()
{
}
/// <summary>
- /// Reads 'bool' type value from Parcel object
+ /// Reads a bool value from parcel object.
/// </summary>
- /// <returns>'bool' type data</returns>
+ /// <returns>bool data.</returns>
/// <since_tizen> 5 </since_tizen>
public bool ReadBool()
{
}
/// <summary>
- /// Reads 'Bundle' type value from Parcel object
+ /// Reads a Bundle value from parcel object.
/// </summary>
- /// <returns>'Bundle' type data</returns>
+ /// <returns>Bundle data.</returns>
/// <since_tizen> 5 </since_tizen>
public Bundle ReadBundle()
{
}
/// <summary>
- /// Reads a count for array from Parcel object
+ /// Reads a count of an array from parcel object.
/// </summary>
- /// <returns>Array count</returns>
+ /// <returns>Array count.</returns>
/// <since_tizen> 5 </since_tizen>
public int ReadArrayCount()
{
}
/// <summary>
- /// Writes bytes into Parcel object
+ /// Writes bytes into parcel object.
/// </summary>
- /// <param name="bytes">Array of bytes</param>
+ /// <param name="bytes">Array of bytes.</param>
/// <since_tizen> 5 </since_tizen>
public void Write(byte[] bytes)
{
}
/// <summary>
- /// Reads bytes from Parcel object
+ /// Reads bytes from parcel object.
/// </summary>
- /// <param name="size">Bytes to read</param>
- /// <returns>Array of bytes</returns>
+ /// <param name="size">Bytes to read.</param>
+ /// <returns>Array of bytes.</returns>
/// <since_tizen> 5 </since_tizen>
public byte[] Read(int size)
{
}
/// <summary>
- /// Finalizer of the class Parcel
+ /// Finalizer of the class Parcel.
/// </summary>
~Parcel()
{
}
/// <summary>
- /// Release all resources used by the class Parcel
+ /// Release all the resources used by the class Parcel.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public void Dispose()
namespace Tizen.Applications.RPCPort
{
/// <summary>
- /// The class for communicating each other between proxy and stub
+ /// The class that proxy and stub can use to communicate with each other.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public class Port
{
/// <summary>
- /// Enumeration for RPC port types
+ /// Enumeration for RPC port types.
/// </summary>
public enum Type
{
/// <summary>
- /// Main channel to communicate
+ /// Main channel to communicate.
/// </summary>
Main,
/// <summary>
- /// Sub channel for callbacks
+ /// Sub channel for callbacks.
/// </summary>
Callback
}
namespace Tizen.Applications.RPCPort
{
/// <summary>
- /// Abstract class for making a proxy class for RPC
+ /// Abstract class for creating a proxy class for RPC.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public abstract class ProxyBase : IDisposable
private IntPtr _proxy;
/// <summary>
- /// Gets Port object
+ /// Gets Port object.
/// </summary>
/// <since_tizen> 5 </since_tizen>
protected Port Port { get; private set; }
/// <summary>
- /// Gets Port object for asynchronous events
+ /// Gets Port object for asynchronous events.
/// </summary>
/// <since_tizen> 5 </since_tizen>
protected Port CallbackPort { get; private set; }
/// <summary>
- /// Constructor for this class
+ /// Constructor for this class.
/// </summary>
- /// <exception cref="InvalidIOException">Thrown when internal IO error happens</exception>
+ /// <exception cref="InvalidIOException">Thrown when internal IO error occurs.</exception>
/// <since_tizen> 5 </since_tizen>
public ProxyBase()
{
}
/// <summary>
- /// Connects to port
+ /// Connects to port.
/// </summary>
- /// <param name="appid">The target stub app ID</param>
- /// <param name="port">The name of rpc port</param>
- /// <exception cref="InvalidIDException">Thrown when not available app ID is used</exception>
- /// <exception cref="InvalidIOException">Thrown when internal IO error happens</exception>
- /// <exception cref="PermissionDeniedException">Thrown when the permission is denied</exception>
+ /// <param name="appid">The target stub app ID.</param>
+ /// <param name="port">The name of the RPC port.</param>
+ /// <exception cref="InvalidIDException">Thrown when not available app ID is used.</exception>
+ /// <exception cref="InvalidIOException">Thrown when an internal IO error occurs.</exception>
+ /// <exception cref="PermissionDeniedException">Thrown when the permission is denied.</exception>
/// <privilege>http://tizen.org/privilege/datasharing</privilege>
/// <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
/// <since_tizen> 5 </since_tizen>
}
/// <summary>
- /// Gets a port
+ /// Gets a port.
/// </summary>
- /// <param name="t">The type of port</param>
- /// <returns>Port object</returns>
- /// <exception cref="InvalidIOException">Thrown when internal IO error happens</exception>
+ /// <param name="t">The type of port.</param>
+ /// <returns>Port object.</returns>
+ /// <exception cref="InvalidIOException">Thrown when an internal IO error occurs.</exception>
/// <since_tizen> 5 </since_tizen>
protected Port GetPort(Port.Type t)
{
}
/// <summary>
- /// Abstract method for receiving connected event
+ /// Abstract method for receiving connected event.
/// </summary>
- /// <param name="endPoint">The target stub app ID</param>
- /// <param name="portName">The name of the port</param>
- /// <param name="port">Port object for reading and writing</param>
+ /// <param name="endPoint">The target stub app ID.</param>
+ /// <param name="portName">The name of the RPC port.</param>
+ /// <param name="port">Port object for reading and writing.</param>
/// <since_tizen> 5 </since_tizen>
protected abstract void OnConnectedEvent(string endPoint, string portName, Port port);
/// <summary>
- /// Abstract method for receiving disconnected event
+ /// Abstract method for receiving disconnected event.
/// </summary>
- /// <param name="endPoint">The target stub app ID</param>
- /// <param name="portName">The name of the port</param>
+ /// <param name="endPoint">The target stub app ID.</param>
+ /// <param name="portName">The name of the port.</param>
/// <since_tizen> 5 </since_tizen>
protected abstract void OnDisconnectedEvent(string endPoint, string portName);
/// <summary>
- /// Abstract method called when the proxy received data from stub
+ /// Abstract method called when the proxy receives data from stub.
/// </summary>
- /// <param name="endPoint">The target stub app ID</param>
- /// <param name="portName">The name of the port</param>
+ /// <param name="endPoint">The target stub app ID.</param>
+ /// <param name="portName">The name of the RPC port.</param>
/// <since_tizen> 5 </since_tizen>
protected abstract void OnReceivedEvent(string endPoint, string portName);
/// <summary>
- /// Abstract method for receiving rejected event
+ /// Abstract method for receiving rejected event.
/// </summary>
- /// <param name="endPoint">The target stub app ID</param>
- /// <param name="portName">The name of the port</param>
+ /// <param name="endPoint">The target stub app ID.</param>
+ /// <param name="portName">The name of the RPC port.</param>
/// <since_tizen> 5 </since_tizen>
protected abstract void OnRejectedEvent(string endPoint, string portName);
}
/// <summary>
- /// Finalizer of the class ProxyBase
+ /// Finalizer of the class ProxyBase.
/// </summary>
~ProxyBase()
{
}
/// <summary>
- /// Release all resources used by the class ProxyBase
+ /// Release all resources used by the class ProxyBase.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public void Dispose()
namespace Tizen.Applications.RPCPort
{
/// <summary>
- /// Abstract class for making a stub class for RPC
+ /// Abstract class for creating a stub class for RPC.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public abstract class StubBase : IDisposable
private IntPtr _stub;
/// <summary>
- /// Gets port name
+ /// Gets port name.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public string PortName { get; }
/// <summary>
- /// Constructor for this class
+ /// Constructor for this class.
/// </summary>
- /// <param name="portName">The name of the port which want to listen</param>
- /// <exception cref="InvalidIOException">Thrown when internal IO error happens</exception>
+ /// <param name="portName">The name of the port that wants to listen.</param>
+ /// <exception cref="InvalidIOException">Thrown when an internal IO error occurs.</exception>
/// <since_tizen> 5 </since_tizen>
public StubBase(string portName)
{
}
/// <summary>
- /// Listens to the requests for connections
+ /// Listens to the requests for connections.
/// </summary>
- /// <exception cref="InvalidIOException">Thrown when internal IO error happens</exception>
+ /// <exception cref="InvalidIOException">Thrown when an internal IO error occurs.</exception>
/// <since_tizen> 5 </since_tizen>
protected void Listen()
{
}
/// <summary>
- /// Adds a privilege to the stub
+ /// Adds a privilege to the stub.
/// </summary>
- /// <param name="privilege">The privilege to access this stub</param>
- /// <exception cref="ArgumentNullException">Thrown when the privilege is null</exception>
+ /// <param name="privilege">The privilege to access this stub.</param>
+ /// <exception cref="ArgumentNullException">Thrown when the privilege is null.</exception>
/// <since_tizen> 5 </since_tizen>
protected void AddPrivilege(string privilege)
{
}
/// <summary>
- /// Sets trusted to the stub
+ /// Sets a trusted proxy to the stub.
/// </summary>
- /// <param name="trusted">Whether stub allows only trusted proxy or not</param>
+ /// <param name="trusted">Whether stub allows only trusted proxy or not.</param>
/// <since_tizen> 5 </since_tizen>
protected void SetTrusted(bool trusted)
{
}
/// <summary>
- /// Gets s port
+ /// Gets s port.
/// </summary>
- /// <param name="t">The type of port</param>
- /// <param name="instance">The ID of the instance which is connected</param>
- /// <returns>Port object</returns>
- /// <exception cref="InvalidIDException">Thrown when invalid instance was used</exception>
- /// <exception cref="InvalidIOException">Thrown when internal IO error happens</exception>
+ /// <param name="t">The type of port.</param>
+ /// <param name="instance">The ID of the instance, which is connected.</param>
+ /// <returns>Port object.</returns>
+ /// <exception cref="InvalidIDException">Thrown when invalid instance is used.</exception>
+ /// <exception cref="InvalidIOException">Thrown when an internal IO error occurs.</exception>
/// <since_tizen> 5 </since_tizen>
protected Port GetPort(Port.Type t, string instance)
{
}
/// <summary>
- /// Abstract method for receiving connected event
+ /// Abstract method for receiving connected event.
/// </summary>
- /// <param name="sender">The target proxy app ID</param>
- /// <param name="instance">The information of the request</param>
+ /// <param name="sender">The target proxy app ID.</param>
+ /// <param name="instance">The information about the request.</param>
/// <since_tizen> 5 </since_tizen>
protected abstract void OnConnectedEvent(string sender, string instance);
/// <summary>
- /// Abstract method for receiving disconnected event
+ /// Abstract method for receiving disconnected event.
/// </summary>
- /// <param name="sender">The target proxy app ID</param>
- /// <param name="instance">The information of the request</param>
+ /// <param name="sender">The target proxy app ID.</param>
+ /// <param name="instance">The information about the request.</param>
/// <since_tizen> 5 </since_tizen>
protected abstract void OnDisconnectedEvent(string sender, string instance);
/// <summary>
- /// Abstract method called when the stub received data from proxy
+ /// Abstract method called when the stub receives data from proxy.
/// </summary>
- /// <param name="sender">The target proxy app ID</param>
- /// <param name="instance">The information of the request</param>
- /// <param name="port">Port object for reading and writing</param>
- /// <returns>'true' to continue receiving data, otherwise 'false' to disconnect from the port</returns>
+ /// <param name="sender">The target proxy app ID.</param>
+ /// <param name="instance">The information about the request.</param>
+ /// <param name="port">Port object for reading and writing.</param>
+ /// <returns><c>true</c> to continue receiving data, otherwise <c>false</c> to disconnect from the port.</returns>
/// <since_tizen> 5 </since_tizen>
protected abstract bool OnReceivedEvent(string sender, string instance, Port port);
/// <summary>
- /// Abstract method called right before disposing object
+ /// Abstract method called immediately before disposing an object.
/// </summary>
/// <since_tizen> 5 </since_tizen>
protected abstract void OnTerminatedEvent();
}
/// <summary>
- /// Finalizer of the class StubBase
+ /// Finalizer of the class StubBase.
/// </summary>
~StubBase()
{
}
/// <summary>
- /// Release all resources used by the class StubBase
+ /// Release all the resources used by the class StubBase.
/// </summary>
public void Dispose()
{