From 383cd0dc40731846436af2710c3c8e6e2f788604 Mon Sep 17 00:00:00 2001
From: Reni Mathew <36875286+Reni-90@users.noreply.github.com>
Date: Fri, 31 Aug 2018 10:21:56 +0530
Subject: [PATCH] English review for RPCPort (#421)
* English review for RPCPort
* Updated the file as per the suggestion.
* To maintain consistency followed the style used in Native APIs.
---
.../Tizen.Applications.RPCPort/Exceptions.cs | 12 +--
.../Tizen.Applications.RPCPort/Parcel.cs | 112 ++++++++++-----------
.../Tizen.Applications.RPCPort/Port.cs | 8 +-
.../Tizen.Applications.RPCPort/ProxyBase.cs | 60 +++++------
.../Tizen.Applications.RPCPort/StubBase.cs | 64 ++++++------
5 files changed, 128 insertions(+), 128 deletions(-)
diff --git a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Exceptions.cs b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Exceptions.cs
index 4ff403b..c30ec1d 100755
--- a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Exceptions.cs
+++ b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Exceptions.cs
@@ -19,37 +19,37 @@ using System;
namespace Tizen.Applications.RPCPort
{
///
- /// Exception class for invalid IO
+ /// Exception class for invalid IO.
///
/// 5
public class InvalidIOException : InvalidOperationException { }
///
- /// Exception class for invalid ID
+ /// Exception class for invalid ID.
///
/// 5
public class InvalidIDException : InvalidOperationException { }
///
- /// Exception class for permission denied
+ /// Exception class for permission denied.
///
/// 5
public class PermissionDeniedException : InvalidOperationException { }
///
- /// Exception class for invalid protocol
+ /// Exception class for invalid protocol.
///
/// 5
public class InvalidProtocolException : InvalidOperationException { }
///
- /// Exception class which will be thrown when not connected socket is used
+ /// Exception class, which is thrown when a non connected socket is used.
///
/// 5
public class NotConnectedSocketException : InvalidOperationException { }
///
- /// Exception class which will be thrown when invalid callback object is used
+ /// Exception class, which is thrown when an invalid callback object is used.
///
/// 5
public class InvalidCallbackException : InvalidOperationException { }
diff --git a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Parcel.cs b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Parcel.cs
index 886e614..2571d86 100755
--- a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Parcel.cs
+++ b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Parcel.cs
@@ -19,7 +19,7 @@ using System;
namespace Tizen.Applications.RPCPort
{
///
- /// The class for helping marshalling and unmarshalling for RPC
+ /// The class that helps to perform marshalling and unmarshalling for RPC.
///
/// 5
public class Parcel : IDisposable
@@ -27,9 +27,9 @@ namespace Tizen.Applications.RPCPort
private IntPtr _handle;
///
- /// Constructor for this class
+ /// Constructor for this class.
///
- /// Thrown when internal IO error happens
+ /// Thrown when an internal IO error occurs.
/// 5
public Parcel()
{
@@ -39,10 +39,10 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Constructor with Port object
+ /// Constructor with port object.
///
- /// Port object
- /// Thrown when internal IO error happens
+ /// Port object.
+ /// Thrown when an internal IO error occurs.
/// 5
public Parcel(Port port)
{
@@ -54,10 +54,10 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Sends parcel data through the port
+ /// Sends parcel data through the port.
///
- /// The RPC port object for writing data
- /// Thrown when internal IO error happens
+ /// The RPC port object for writing data.
+ /// Thrown when an internal IO error occurs.
/// 5
public void Send(Port p)
{
@@ -69,9 +69,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes 'byte' type value into Parcel object
+ /// Writes a byte value into parcel object.
///
- /// 'byte' type data
+ /// byte data.
/// 5
public void WriteByte(byte b)
{
@@ -79,9 +79,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes 'short' type value into Parcel object
+ /// Writes a short value into parcel object.
///
- /// 'short' type data
+ /// short data.
/// 5
public void WriteShort(short b)
{
@@ -89,9 +89,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes 'int' type value into Parcel object
+ /// Writes an int value into parcel object.
///
- /// 'int' type data
+ /// int data.
/// 5
public void WriteInt(int b)
{
@@ -99,9 +99,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes a Long type value into Parcel handle
+ /// Writes a long value into parcel object.
///
- /// 'long' type data
+ /// long data.
/// 5
public void WriteLong(long b)
{
@@ -109,9 +109,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes a 'float' type value into Parcel handle
+ /// Writes a float value into parcel object.
///
- /// 'float' type data
+ /// float data.
/// 5
public void WriteFloat(float b)
{
@@ -119,9 +119,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes a 'double' type value into Parcel handle
+ /// Writes a double value into parcel object.
///
- /// 'double' type data
+ /// double data.
/// 5
public void WriteDouble(double b)
{
@@ -129,9 +129,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes a 'string' type value into Parcel handle
+ /// Writes a string value into parcel object.
///
- /// 'string' type data
+ /// string data.
/// 5
public void WriteString(string b)
{
@@ -139,9 +139,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes a 'bool' type value into Parcel handle
+ /// Writes a bool value into parcel object.
///
- /// 'bool' type data
+ /// bool data.
/// 5
public void WriteBool(bool b)
{
@@ -149,9 +149,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes a 'Bundle' type value into Parcel handle
+ /// Writes a Bundle data into parcel object.
///
- /// 'Bundle' type data
+ /// Bundle data.
/// 5
public void WriteBundle(Bundle b)
{
@@ -159,9 +159,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes a count for array into Parcel object
+ /// Writes a count of an array into parcel object.
///
- /// Array count
+ /// Array count.
/// 5
public void WriteArrayCount(int cnt)
{
@@ -169,9 +169,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads 'byte' type value from Parcel object
+ /// Reads a byte value from parcel object.
///
- /// 'byte' type data
+ /// byte data.
/// 5
public byte ReadByte()
{
@@ -180,9 +180,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads 'short' type value from Parcel object
+ /// Reads a short value from parcel object.
///
- /// 'short' type data
+ /// short data.
/// 5
public short ReadShort()
{
@@ -191,9 +191,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads 'int' type value from Parcel object
+ /// Reads an int value from parcel object.
///
- /// 'int' type data
+ /// int data.
/// 5
public int ReadInt()
{
@@ -202,9 +202,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads 'long' type value from Parcel object
+ /// Reads a long value from parcel object.
///
- /// 'long' type data
+ /// long data.
/// 5
public long ReadLong()
{
@@ -213,9 +213,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads 'float' type value from Parcel object
+ /// Reads a float value from parcel object.
///
- /// 'float' type data
+ /// float data.
/// 5
public float ReadFloat()
{
@@ -224,9 +224,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads 'double' type value from Parcel object
+ /// Reads a double value from parcel object.
///
- /// 'double' type data
+ /// double data.
/// 5
public double ReadDouble()
{
@@ -235,9 +235,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads 'string' type value from Parcel object
+ /// Reads a string value from parcel object.
///
- /// 'string' type data
+ /// string data.
/// 5
public string ReadString()
{
@@ -246,9 +246,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads 'bool' type value from Parcel object
+ /// Reads a bool value from parcel object.
///
- /// 'bool' type data
+ /// bool data.
/// 5
public bool ReadBool()
{
@@ -257,9 +257,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads 'Bundle' type value from Parcel object
+ /// Reads a Bundle value from parcel object.
///
- /// 'Bundle' type data
+ /// Bundle data.
/// 5
public Bundle ReadBundle()
{
@@ -269,9 +269,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads a count for array from Parcel object
+ /// Reads a count of an array from parcel object.
///
- /// Array count
+ /// Array count.
/// 5
public int ReadArrayCount()
{
@@ -280,9 +280,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Writes bytes into Parcel object
+ /// Writes bytes into parcel object.
///
- /// Array of bytes
+ /// Array of bytes.
/// 5
public void Write(byte[] bytes)
{
@@ -290,10 +290,10 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Reads bytes from Parcel object
+ /// Reads bytes from parcel object.
///
- /// Bytes to read
- /// Array of bytes
+ /// Bytes to read.
+ /// Array of bytes.
/// 5
public byte[] Read(int size)
{
@@ -324,7 +324,7 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Finalizer of the class Parcel
+ /// Finalizer of the class Parcel.
///
~Parcel()
{
@@ -332,7 +332,7 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Release all resources used by the class Parcel
+ /// Release all the resources used by the class Parcel.
///
/// 5
public void Dispose()
diff --git a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Port.cs b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Port.cs
index c33e2c4..f31364f 100755
--- a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Port.cs
+++ b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Port.cs
@@ -19,23 +19,23 @@ using System;
namespace Tizen.Applications.RPCPort
{
///
- /// The class for communicating each other between proxy and stub
+ /// The class that proxy and stub can use to communicate with each other.
///
/// 5
public class Port
{
///
- /// Enumeration for RPC port types
+ /// Enumeration for RPC port types.
///
public enum Type
{
///
- /// Main channel to communicate
+ /// Main channel to communicate.
///
Main,
///
- /// Sub channel for callbacks
+ /// Sub channel for callbacks.
///
Callback
}
diff --git a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/ProxyBase.cs b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/ProxyBase.cs
index e904444..71321de 100755
--- a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/ProxyBase.cs
+++ b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/ProxyBase.cs
@@ -19,7 +19,7 @@ using System;
namespace Tizen.Applications.RPCPort
{
///
- /// Abstract class for making a proxy class for RPC
+ /// Abstract class for creating a proxy class for RPC.
///
/// 5
public abstract class ProxyBase : IDisposable
@@ -31,21 +31,21 @@ namespace Tizen.Applications.RPCPort
private IntPtr _proxy;
///
- /// Gets Port object
+ /// Gets Port object.
///
/// 5
protected Port Port { get; private set; }
///
- /// Gets Port object for asynchronous events
+ /// Gets Port object for asynchronous events.
///
/// 5
protected Port CallbackPort { get; private set; }
///
- /// Constructor for this class
+ /// Constructor for this class.
///
- /// Thrown when internal IO error happens
+ /// Thrown when internal IO error occurs.
/// 5
public ProxyBase()
{
@@ -62,13 +62,13 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Connects to port
+ /// Connects to port.
///
- /// The target stub app ID
- /// The name of rpc port
- /// Thrown when not available app ID is used
- /// Thrown when internal IO error happens
- /// Thrown when the permission is denied
+ /// The target stub app ID.
+ /// The name of the RPC port.
+ /// Thrown when not available app ID is used.
+ /// Thrown when an internal IO error occurs.
+ /// Thrown when the permission is denied.
/// http://tizen.org/privilege/datasharing
/// http://tizen.org/privilege/appmanager.launch
/// 5
@@ -87,11 +87,11 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Gets a port
+ /// Gets a port.
///
- /// The type of port
- /// Port object
- /// Thrown when internal IO error happens
+ /// The type of port.
+ /// Port object.
+ /// Thrown when an internal IO error occurs.
/// 5
protected Port GetPort(Port.Type t)
{
@@ -108,35 +108,35 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Abstract method for receiving connected event
+ /// Abstract method for receiving connected event.
///
- /// The target stub app ID
- /// The name of the port
- /// Port object for reading and writing
+ /// The target stub app ID.
+ /// The name of the RPC port.
+ /// Port object for reading and writing.
/// 5
protected abstract void OnConnectedEvent(string endPoint, string portName, Port port);
///
- /// Abstract method for receiving disconnected event
+ /// Abstract method for receiving disconnected event.
///
- /// The target stub app ID
- /// The name of the port
+ /// The target stub app ID.
+ /// The name of the port.
/// 5
protected abstract void OnDisconnectedEvent(string endPoint, string portName);
///
- /// Abstract method called when the proxy received data from stub
+ /// Abstract method called when the proxy receives data from stub.
///
- /// The target stub app ID
- /// The name of the port
+ /// The target stub app ID.
+ /// The name of the RPC port.
/// 5
protected abstract void OnReceivedEvent(string endPoint, string portName);
///
- /// Abstract method for receiving rejected event
+ /// Abstract method for receiving rejected event.
///
- /// The target stub app ID
- /// The name of the port
+ /// The target stub app ID.
+ /// The name of the RPC port.
/// 5
protected abstract void OnRejectedEvent(string endPoint, string portName);
@@ -183,7 +183,7 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Finalizer of the class ProxyBase
+ /// Finalizer of the class ProxyBase.
///
~ProxyBase()
{
@@ -191,7 +191,7 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Release all resources used by the class ProxyBase
+ /// Release all resources used by the class ProxyBase.
///
/// 5
public void Dispose()
diff --git a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/StubBase.cs b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/StubBase.cs
index 08ed890..3e642b3 100755
--- a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/StubBase.cs
+++ b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/StubBase.cs
@@ -19,7 +19,7 @@ using System;
namespace Tizen.Applications.RPCPort
{
///
- /// Abstract class for making a stub class for RPC
+ /// Abstract class for creating a stub class for RPC.
///
/// 5
public abstract class StubBase : IDisposable
@@ -30,16 +30,16 @@ namespace Tizen.Applications.RPCPort
private IntPtr _stub;
///
- /// Gets port name
+ /// Gets port name.
///
/// 5
public string PortName { get; }
///
- /// Constructor for this class
+ /// Constructor for this class.
///
- /// The name of the port which want to listen
- /// Thrown when internal IO error happens
+ /// The name of the port that wants to listen.
+ /// Thrown when an internal IO error occurs.
/// 5
public StubBase(string portName)
{
@@ -55,9 +55,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Listens to the requests for connections
+ /// Listens to the requests for connections.
///
- /// Thrown when internal IO error happens
+ /// Thrown when an internal IO error occurs.
/// 5
protected void Listen()
{
@@ -71,10 +71,10 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Adds a privilege to the stub
+ /// Adds a privilege to the stub.
///
- /// The privilege to access this stub
- /// Thrown when the privilege is null
+ /// The privilege to access this stub.
+ /// Thrown when the privilege is null.
/// 5
protected void AddPrivilege(string privilege)
{
@@ -84,9 +84,9 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Sets trusted to the stub
+ /// Sets a trusted proxy to the stub.
///
- /// Whether stub allows only trusted proxy or not
+ /// Whether stub allows only trusted proxy or not.
/// 5
protected void SetTrusted(bool trusted)
{
@@ -94,13 +94,13 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Gets s port
+ /// Gets s port.
///
- /// The type of port
- /// The ID of the instance which is connected
- /// Port object
- /// Thrown when invalid instance was used
- /// Thrown when internal IO error happens
+ /// The type of port.
+ /// The ID of the instance, which is connected.
+ /// Port object.
+ /// Thrown when invalid instance is used.
+ /// Thrown when an internal IO error occurs.
/// 5
protected Port GetPort(Port.Type t, string instance)
{
@@ -118,33 +118,33 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Abstract method for receiving connected event
+ /// Abstract method for receiving connected event.
///
- /// The target proxy app ID
- /// The information of the request
+ /// The target proxy app ID.
+ /// The information about the request.
/// 5
protected abstract void OnConnectedEvent(string sender, string instance);
///
- /// Abstract method for receiving disconnected event
+ /// Abstract method for receiving disconnected event.
///
- /// The target proxy app ID
- /// The information of the request
+ /// The target proxy app ID.
+ /// The information about the request.
/// 5
protected abstract void OnDisconnectedEvent(string sender, string instance);
///
- /// Abstract method called when the stub received data from proxy
+ /// Abstract method called when the stub receives data from proxy.
///
- /// The target proxy app ID
- /// The information of the request
- /// Port object for reading and writing
- /// 'true' to continue receiving data, otherwise 'false' to disconnect from the port
+ /// The target proxy app ID.
+ /// The information about the request.
+ /// Port object for reading and writing.
+ /// true to continue receiving data, otherwise false to disconnect from the port.
/// 5
protected abstract bool OnReceivedEvent(string sender, string instance, Port port);
///
- /// Abstract method called right before disposing object
+ /// Abstract method called immediately before disposing an object.
///
/// 5
protected abstract void OnTerminatedEvent();
@@ -189,7 +189,7 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Finalizer of the class StubBase
+ /// Finalizer of the class StubBase.
///
~StubBase()
{
@@ -197,7 +197,7 @@ namespace Tizen.Applications.RPCPort
}
///
- /// Release all resources used by the class StubBase
+ /// Release all the resources used by the class StubBase.
///
public void Dispose()
{
--
2.7.4