/// It provides API to manage attributes.
/// This class is accessed by using a constructor to create a new instance of this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class Attributes : IDictionary<string, object>, IDisposable
{
internal IntPtr _resourceAttributesHandle = IntPtr.Zero;
/// <summary>
/// The Attributes constructor
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory</exception>
/// <code>
/// <summary>
/// Gets the number of keys
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The number of keys.</value>
/// <code>
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// attributes.Add("brightness", 50);
/// <summary>
/// Represents whether attribute is readonly
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Whether attribute is readonly.</value>
/// <code>
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// <summary>
/// Contains all the attribute keys
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>All the attribute keys.</value>
/// <code>
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// <summary>
/// Contains all the attribute values
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>All the attribute values.</value>
/// <code>
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// <summary>
/// Gets or sets the attribute with the specified key.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The attribute with the specified key.</value>
/// <param name="key">The key of the attribute to get or set.</param>
/// <returns>The element with the specified key.</returns>
/// <code>
/// <summary>
/// Adds attribute key and value as a key value pair
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The key value pair to add</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <code>
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes();
/// attributes.Add(new KeyValuePair<string, object> ("state", "ON"));
/// <summary>
/// Adds an attribute
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="key">The key representing the attribute</param>
/// <param name="value">The value representing the attribute</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <code>
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes();
/// attributes.Add("brightness", 50);
/// <summary>
/// Clears attributes collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
/// <code>
/// <summary>
/// Checks whether the given key value pair exists in attributes collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The status key value pair</param>
/// <returns>true if exists. Otherwise, false</returns>
/// <code>
/// <summary>
/// Checks whether the given key exists in attributes collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="key">The status key to look for</param>
/// <returns>true if exists. Otherwise, false</returns>
/// <code>
/// <summary>
/// Copies the elements of the attributes to an array, starting at a particular index.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="array">The destination array</param>
/// <param name="arrayIndex">The zero-based index in array at which copying begins.</param>
/// <code>
}
/// <summary>
- /// Returns an enumerator that iterates through the collection.
+ /// Returns an enumerator that iterates through the collection.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <returns> An enumerator that can be used to iterate through the collection.</returns>
/// <code>
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// <summary>
/// Removes an attribute from collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The attributes element to remove</param>
/// <returns>true if operation is success. Otherwise, false</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
}
/// <summary>
- /// Removes an attribute from collection using key
+ /// Removes an attribute from collection using key
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="key">The attributes element to remove</param>
/// <returns>true if operation is successful, Otherwise, false</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
/// <summary>
/// Gets the value associated with the specified key.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="key">The key whose value to get.</param>
/// <param name="value"> The value associated with the specified key</param>
/// <returns> true if the attributes collection contains an element with the specified key; otherwise, false.</returns>
}
/// <summary>
- /// Returns an enumerator that iterates through the collection.
+ /// Returns an enumerator that iterates through the collection.
/// </summary>
+ /// <since_tizen>3</since_tizen>
IEnumerator IEnumerable.GetEnumerator()
{
return _attributes.GetEnumerator();
/// <summary>
/// Releases any unmanaged resources used by this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
protected virtual void Dispose(bool disposing)
{
if (_disposed)
namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class is an event arguments of the CacheUpdated event.
+ /// This class represents event arguments of the CacheUpdated event.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class CacheUpdatedEventArgs : EventArgs
{
internal CacheUpdatedEventArgs() { }
/// <summary>
/// Indicates the updated representation of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The updated representation of the resource.</value>
public Representation Representation { get; internal set; }
}
}
namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class is an event arguments of the DeviceInformationFound event.
+ /// This class represents event arguments of the DeviceInformationFound event.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class DeviceInformationFoundEventArgs
{
internal DeviceInformationFoundEventArgs() { }
/// <summary>
/// The request id
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The request id.</value>
public int RequestId { get; internal set; }
/// <summary>
/// Indicates to continuously receive the event for finding device information.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Continuously receive the event for finding device information.</value>
public bool EventContinue { get; set; }
/// <summary>
/// Indicates human friendly name for device
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Human friendly name for device.</value>
public string Name { get; internal set; }
/// <summary>
/// Indicates spec version of the core specification
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Spec version of the core specification.</value>
public string SpecVersion { get; internal set; }
/// <summary>
/// Indicates unique identifier for OIC device
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Unique identifier for OIC device.</value>
public string DeviceId { get; internal set; }
/// <summary>
/// Indicates version of the specs this device data model is implemented to
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Version of the specs this device data model is implemented to.</value>
public string DataModelVersion { get; internal set; }
}
}
namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class is an event arguments of the FindingErrorOccurred event.
+ /// This class represents event arguments of the FindingErrorOccurred event.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class FindingErrorOccurredEventArgs : EventArgs
{
internal FindingErrorOccurredEventArgs() { }
/// <summary>
/// The request id of the operation which caused this error
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The request id of the operation which caused this error.</value>
public int RequestId { get; internal set; }
/// <summary>
/// Contains error details.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Error details.</value>
public Exception Error { get; internal set; }
}
}
/// <summary>
/// IoT connectivity client manager consists of client side APIs.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public static class IoTConnectivityClientManager
{
/// <summary>
/// The IP Address for multicast
/// </summary>
+ /// <since_tizen>3</since_tizen>
public const string MulticastAddress = null;
private static int s_presenceListenerId = 1;
/// <summary>
/// PresenceReceived event. This event is occurred when server starts sending presence of a resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public static event EventHandler<PresenceReceivedEventArgs> PresenceReceived;
/// <summary>
/// ResourceFound event. This event is occurred when a resource is found from the remote server
/// after sending request using API StartFindingResource().
/// </summary>
+ /// <since_tizen>3</since_tizen>
public static event EventHandler<ResourceFoundEventArgs> ResourceFound;
/// <summary>
/// PlatformInformationFound event. This event is occurred when platform information is found
/// after sending request using API StartFindingPlatformInformation().
/// </summary>
+ /// <since_tizen>3</since_tizen>
public static event EventHandler<PlatformInformationFoundEventArgs> PlatformInformationFound;
/// <summary>
/// DeviceInformationFound event. This event is occurred when device information is found
/// after sending request using API StartFindingDeviceInformation().
/// </summary>
+ /// <since_tizen>3</since_tizen>
public static event EventHandler<DeviceInformationFoundEventArgs> DeviceInformationFound;
/// <summary>
/// FindingError event. This event is occurred when an error is found.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public static event EventHandler<FindingErrorOccurredEventArgs> FindingErrorOccurred;
/// <summary>
/// Timeout in seconds
/// </summary>
- /// <remarks>
+ /// <since_tizen>3</since_tizen>
+ /// <value>
/// Value to be set must be in range from 1 to 3600. Default timeout interval value is 30.\n
/// Sets/gets the timeout of StartFindingResource(), StartFindingDeviceInformation(), StartFindingPlatformInformation(),
/// RemoteResource.GetAsync(), RemoteResource.PutAsync(), RemoteResource.PostAsync() and RemoteResource.DeleteAsync() APIs.\n
/// Setter can throw exception.
- /// </remarks>
+ /// </value>
/// <pre>
/// Initialize() should be called to initialize
/// </pre>
/// <summary>
/// Polling interval of IoTConnectivity
/// </summary>
- /// <remarks>
+ /// <since_tizen>3</since_tizen>
+ /// <value>
/// Sets/Gets the polling inerval(milliseconds) of IoTCon. Default value is 100 milliseconds.
/// Value to be set must be in range from 1 to 999. The closer to 0, the faster it operates.
/// Setter is invoked immediately for changing the interval.
/// If you want the faster operation, we recommend you set 10 milliseconds for polling interval.
/// Setter can throw exception.
- /// </remarks>
+ /// </value>
/// <pre>
/// Initialize() should be called to initialize
/// </pre>
/// Initializes IoTCon.
/// Call this function to start IoTCon.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// @a filePath point to a file for handling secure virtual resources.
/// The file that is CBOR(Concise Binary Object Representation)-format must already exist
/// http://tizen.org/privilege/network.get \n
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="filePath">The file path to point to storage for handling secure virtual resources.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <post>
/// You must call Deinitialize() if IoTCon API is no longer needed.
/// </post>
/// <summary>
/// Deinitializes IoTCon.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// This API must be called if IoTCon API is no longer needed.
/// </remarks>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// Initialize() should be called to initialize.
/// </pre>
/// <summary>
/// Invokes a next message from a queue for receiving messages from others, immediately.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// This API invokes a next message from a queue for receiving messages from others, immediately.
/// After calling the API, it continues the polling with existing interval.
/// </remarks>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// Initialize() should be called to initialize.
/// </pre>
/// <summary>
/// Starts receiving presence events
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// Sends request to receive presence to an interested server's resource with resourceType.
/// If succeeded, <see cref="PresenceReceived"/> event handler will be triggered when the server sends presence.
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="hostAddress">The address or addressable name of the server</param>
/// <param name="resourceType">A resource type that a client is interested in</param>
/// <returns>PresenceId - An identifier for this request</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>Initialize() should be called to initialize.</pre>
/// <post>
/// When the resource receive presence, <see cref="PresenceReceived"/> event handler will be invoked.\n
/// <summary>
/// Stops receiving presence events
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// Sends request to not to receive server's presence any more.
/// </remarks>
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="presenceId">The start presence request identifier</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// Initialize() should be called to initialize.
/// </pre>
/// <summary>
/// Starts finding resources.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// Sends request to find a resource of @a hostAddress server with @a resourceType.
/// If succeeded, <see cref="ResourceFound"/> event handler will be triggered with information of the resource.\n
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="hostAddress">The address or addressable name of the server. The address includes a protocol like coaps://</param>
/// <param name="query">The query specified as a filter for founding resources</param>
/// <returns>RequestId - An identifier for this request</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>Initialize() should be called to initialize.</pre>
/// <post>
/// When the resource is found, <see cref="ResourceFound"/> event handler will be invoked.
/// <summary>
/// Starts finding the device information of remote server.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// Requests server for device information.
/// If succeeded, <see cref="DeviceInformationFound"/> event handler will be triggered with information of the device.\n
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="hostAddress">The host address of remote server</param>
/// <param name="query">The query specified as a filter for founding resources</param>
/// <returns>RequestId - An identifier for this request</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>Initialize() should be called to initialize.</pre>
/// <post>
/// <see cref="DeviceInformationFound" /> event handler will be invoked.
/// <summary>
/// Starts finding the platform information of remote server.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// Requests server for platform information.
/// If succeeded, <see cref="PlatformInformationFound" /> event handler will be triggered with information of the platform.\n
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="hostAddress">The host address of remote server</param>
/// <param name="query">The query specified as a filter for founding resources</param>
/// <returns>RequestId - An identifier for this request</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>Initialize() should be called to initialize.</pre>
/// <post>
/// <see cref="PlatformInformationFound" /> event handler will be invoked.
/// <summary>
/// IoT connectivity server manager consists of server side APIs.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public static class IoTConnectivityServerManager
{
-
private static int s_requestId = 1;
private static Dictionary<IntPtr, Interop.IoTConnectivity.Server.Resource.RequestHandlerCallback> s_RequestHandlerCallbackMap = new Dictionary<IntPtr, Interop.IoTConnectivity.Server.Resource.RequestHandlerCallback>();
/// <summary>
/// Initializes IoTCon. Call this API to start IoTCon.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// @a filePath point to a file for handling secure virtual resources.
/// The file that is CBOR(Concise Binary Object Representation)-format must already exist
/// http://tizen.org/privilege/network.get \n
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="filePath">The file path to point to storage for handling secure virtual resources.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <post>
/// You must call Deinitialize() if IoTCon API is no longer needed.
/// </post>
/// <summary>
/// Deinitializes IoTCon.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// This API must be called if IoTCon API is no longer needed.
/// </remarks>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// Initialize() should be called to initialize.
/// </pre>
/// <summary>
/// Registers a resource in IoTCon server
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="resource">The resource to register</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// Initialize() should be called to initialize.
/// </pre>
/// <summary>
/// Unregisters a resource in IoTCon server
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="resource">The resource to unregister</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// Initialize() should be called to initialize.
/// </pre>
/// <summary>
/// Starts presence of a server
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// Use this API to send server's announcements to clients.
/// Server can call this API when online for the first time or come back from offline to online.\n
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="time">The interval of announcing presence in seconds.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// Initialize() should be called to initialize.
/// </pre>
/// <summary>
/// Stops presence of a server.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// Use this API to stop sending server's announcements to clients.
/// Server can call this API when terminating, entering to offline or out of network.
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// Initialize() should be called to initialize.
/// </pre>
/// <summary>
/// Sets the device name
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// This API sets the name of the local device (the device calling the API).\n
/// If the device name is set, clients can get the name using <see cref="IoTConnectivityClientManager.StartFindingDeviceInformation()"/>.
/// </remarks>
/// <param name="deviceName">The device name</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="IoTConnectivityClientManager.DeviceInformationFound"/>
/// <seealso cref="IoTConnectivityClientManager.StartFindingDeviceInformation()"/>
/// <seealso cref="DeviceInformationFoundEventArgs"/>
/// It provides APIs to encapsulate resources.
/// This class is accessed by using a constructor to create a new instance of this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class LiteResource : Resource
{
/// <summary>
/// The LiteResource constructor
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// Creates a lite resource which can then be registered in server using <see cref="IoTConnectivityServerManager.RegisterResource()"/>.\n
/// When client requests some operations, it send a response to client, automatically.\n
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="uri">The uri path of the lite resource</param>
/// <param name="types">The type of the resource</param>
/// <param name="policy">Policy of the resource</param>
/// <param name="attribs">Optional attributes of the resource</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// IoTConnectivityServerManager.Initialize() should be called to initialize
/// </pre>
/// <summary>
/// Gets or sets the attributes of the lite resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The attributes of the lite resource.</value>
/// <code>
/// List<string> list = new List<string>() { "org.tizen.light" };
/// LiteResource res = new LiteResource("/light/1", new ResourceTypes(list), ResourcePolicy.Discoverable);
/// <summary>
/// Decides whether to accept or reject a post request.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// Child classes of this class can override this method to accept or reject post request.
/// </remarks>
The Tizen.Network.IoTConnectivity namespace provides classes to manage
Resource, RemoteResource, Request, Response and so on which are based on IoTivity project.
</summary>
-<remark>
+<remarks>
The Tizen.Network.IoTConnectivity namespace provides classes to manage
Resource, RemoteResource, Request, Response and so on which are based on IoTivity project.
-</remark>
+</remarks>
*/
namespace Tizen.Network.IoTConnectivity {}
/// <summary>
/// Enumeration for policy of observation
/// </summary>
+ /// <since_tizen>3</since_tizen>
public enum ObservePolicy
{
/// <summary>
/// Indicates observation request for most up-to-date notifications only
/// </summary>
+ /// <since_tizen>3</since_tizen>
IgnoreOutOfOrder = 0,
/// <summary>
- /// Indicates observation request for all notifications including stale notifications
+ /// Indicates observation request for all notifications including state notifications
/// </summary>
+ /// <since_tizen>3</since_tizen>
AcceptOutOfOrder
}
}
/// <summary>
/// Enumeration for type of observation
/// </summary>
+ /// <since_tizen>3</since_tizen>
public enum ObserveType
{
/// <summary>
/// No observe action
/// </summary>
+ /// <since_tizen>3</since_tizen>
NoType = 0,
/// <summary>
/// Indicates action of registering observation
/// </summary>
+ /// <since_tizen>3</since_tizen>
Register = 1,
/// <summary>
/// Indicates action of unregistering observation
/// </summary>
+ /// <since_tizen>3</since_tizen>
Deregister = 2,
}
}
namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class is an event arguments of the ObserverNotified event.
+ /// This class represents event arguments of the ObserverNotified event.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class ObserverNotifiedEventArgs : EventArgs
{
internal ObserverNotifiedEventArgs() { }
/// <summary>
/// Result of the observe response
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Result of the observe response.</value>
public ResponseCode Result { get; internal set; }
/// <summary>
/// Representation of the resource being observed.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Representation of the resource being observed.</value>
public Representation Representation { get; internal set; }
}
}
namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class is an event arguments of the PlatformInformationFound event.
+ /// This class represents event arguments of the PlatformInformationFound event.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class PlatformInformationFoundEventArgs
{
internal PlatformInformationFoundEventArgs() { }
/// <summary>
/// Indicates the request id
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The request id.</value>
public int RequestId { get; internal set; }
/// <summary>
/// Indicates to continuously receive the event for finding platform information.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Continuously receive the event for finding platform information.</value>
public bool EventContinue { get; set; }
/// <summary>
/// Indicates the platform identifier
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The platform identifier.</value>
public string PlatformId { get; internal set; }
/// <summary>
/// Indicates the name of manufacturer
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The name of manufacturer.</value>
public string ManufacturerName { get; internal set; }
/// <summary>
/// Indicates URL of the manufacturer
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>URL of the manufacturer.</value>
public string ManufacturerURL { get; internal set; }
/// <summary>
/// Indicates model number as designated by manufacturer
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Model number as designated by manufacturer.</value>
public string ModelNumber { get; internal set; }
/// <summary>
/// Indicates manufacturing date of the device
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Manufacturing date of the device.</value>
public string DateOfManufacture { get; internal set; }
/// <summary>
/// Indicates version of platfrom defined by manufacturer
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Version of platfrom defined by manufacturer.</value>
public string PlatformVersion { get; internal set; }
/// <summary>
/// Indicates version of platfrom resident OS
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Version of platfrom resident OS.</value>
public string OsVersion { get; internal set; }
/// <summary>
/// Indicates version of platform Hardware
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Version of platform Hardware.</value>
public string HardwareVersion { get; internal set; }
/// <summary>
/// Indicates version of device firmware
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Version of device firmware.</value>
public string FirmwareVersion { get; internal set; }
/// <summary>
/// Indicates URL that points to support information from manufacturer
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>URL that points to support information from manufacturer.</value>
public string SupportUrl { get; internal set; }
/// <summary>
/// Indicates reference time of the device
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Reference time of the device.</value>
public string SystemTime { get; internal set; }
}
}
/// <summary>
/// Enumeration for operation of presence response.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public enum PresenceEventType
{
/// <summary>
/// Indicates for resource creation operation of server
/// </summary>
+ /// <since_tizen>3</since_tizen>
ResourceCreated = 0,
/// <summary>
/// Indicates for resource updation operation of server
/// </summary>
+ /// <since_tizen>3</since_tizen>
ResourceUpdated,
/// <summary>
/// Indicates for resource destruction operation of server
/// </summary>
+ /// <since_tizen>3</since_tizen>
ResourceDestroyed
}
}
namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class is an event arguments of the PresenceReceived event.
+ /// This class represents event arguments of the PresenceReceived event.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class PresenceReceivedEventArgs : EventArgs
{
internal PresenceReceivedEventArgs() { }
/// <summary>
/// Indicates request id of presence event.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Request id of presence event.</value>
public int PresenceId { get; internal set; }
/// <summary>
/// Indicates event type
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Event type.</value>
public PresenceEventType EventType { get; internal set; }
/// <summary>
/// Indicates host address of resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Host address of resource.</value>
public string HostAddress { get; internal set; }
/// <summary>
/// Indicates type of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Type of the resource.</value>
public string Type { get; internal set; }
}
}
/// <summary>
/// Enumeration for states of remote resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public enum QualityOfService
{
/// <summary>
/// Indicates low quality of service
/// </summary>
+ /// <since_tizen>3</since_tizen>
Low = 0,
/// <summary>
/// Indicates high quality of service
/// </summary>
+ /// <since_tizen>3</since_tizen>
High
}
}
/// This class represents a remote resource.
/// It provides APIs to manage remote resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class RemoteResource : IDisposable
{
internal const int TimeOutMax = 3600;
/// <summary>
/// Creates a remote resource instance
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// To use this API, you should provide all of the details required to correctly contact and
/// observe the object.\n
/// <param name="policy">The policies of the resource</param>
/// <param name="resourceTypes">The resource types of the resource</param>
/// <param name="resourceInterfaces">The resource interfaces of the resource</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// Event that is invoked with cached resource attributes
/// </summary>
+ /// <since_tizen>3</since_tizen>
public event EventHandler<CacheUpdatedEventArgs> CacheUpdated;
/// <summary>
/// Observe event on the resource sent by the server
/// </summary>
+ /// <since_tizen>3</since_tizen>
public event EventHandler<ObserverNotifiedEventArgs> ObserverNotified;
/// <summary>
/// Event that is called when remote resource's state are changed
/// </summary>
+ /// <since_tizen>3</since_tizen>
public event EventHandler<StateChangedEventArgs> StateChanged
{
add
/// <summary>
/// The host address of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The host address of the resource.</value>
public string HostAddress { get; private set; }
/// <summary>
/// The URI path of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The URI path of the resource.</value>
public string UriPath { get; private set; }
/// <summary>
/// The resource types of the remote resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The resource types of the remote resource.</value>
public IEnumerable<string> Types { get; private set; }
/// <summary>
/// The interfaces of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The interfaces of the resource.</value>
public IEnumerable<string> Interfaces { get; private set; }
/// <summary>
/// The policy of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The policy of the resource.</value>
public ResourcePolicy Policy { get; private set; }
/// <summary>
/// The header options of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The header options of the resource.</value>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
public ResourceOptions Options
/// <summary>
/// Indicates the CacheEnabled status of the remote resource.
/// </summary>
- /// <remarks>
+ /// <since_tizen>3</since_tizen>
+ /// <value>
/// Client can start caching only when this is set true. Set it to false to stop caching the resource attributes.
- /// </remarks>
+ /// </value>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
/// <summary>
/// Time interval of monitoring and caching API
/// </summary>
- /// <remarks>
- /// Default time interval is 10 seconds.\n
+ /// <since_tizen>3</since_tizen>
+ /// <value>
+ /// Default time interval is 10 seconds.
/// Seconds for time interval (must be in range from 1 to 3600)
- /// </remarks>
+ /// </value>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
public int TimeInterval
/// <summary>
/// The device id of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The device id of the resource.</value>
public string DeviceId { get; private set; }
/// <summary>
/// Gets cached representation from the remote resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <returns>cached representation from the remote resource</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public Representation CachedRepresentation()
{
IntPtr handle;
/// <summary>
/// Starts observing on the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// When server sends notification message, <see cref="ObserverNotified"/> will be called.
/// </remarks>
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="policy">The type to specify how client wants to observe</param>
/// <param name="query">The query to send to server</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when app does not have privilege to access</exception>
/// <summary>
/// Stops observing on the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when app does not have privilege to access</exception>
/// <summary>
/// Gets the attributes of a resource, asynchronously
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="query">The ResourceQuery to send to server</param>
/// <returns>Remote response with result and representation</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public async Task<RemoteResponse> GetAsync(ResourceQuery query = null)
{
TaskCompletionSource<RemoteResponse> tcsRemoteResponse = new TaskCompletionSource<RemoteResponse>();
/// <summary>
/// Puts the representation of a resource, asynchronously.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="representation">Resource representation to put</param>
/// <param name="query">The ResourceQuery to send to server</param>
/// <returns>Remote response with result and representation</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public async Task<RemoteResponse> PutAsync(Representation representation, ResourceQuery query = null)
{
TaskCompletionSource<RemoteResponse> tcsRemoteResponse = new TaskCompletionSource<RemoteResponse>();
/// <summary>
/// Post request on a resource, asynchronously
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="representation">Resource representation of request</param>
/// <param name="query">The ResourceQuery to send to server</param>
/// <returns>Remote response with result and representation</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public async Task<RemoteResponse> PostAsync(Representation representation, ResourceQuery query = null)
{
TaskCompletionSource<RemoteResponse> tcsRemoteResponse = new TaskCompletionSource<RemoteResponse>();
/// <summary>
/// Deletes the resource, asynchronously
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <returns>Remote response with result and representation</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public async Task<RemoteResponse> DeleteAsync()
{
TaskCompletionSource<RemoteResponse> tcsRemoteResponse = new TaskCompletionSource<RemoteResponse>();
/// <summary>
/// Releases any unmanaged resources used by this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
protected virtual void Dispose(bool disposing)
{
if (_disposed)
namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class represents remote response.
+ /// This class represents a remote response.
/// It represents the response of all CRUD operations.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class RemoteResponse
{
internal RemoteResponse() { }
/// <summary>
/// Indicates the result of the response
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The result of the response.</value>
public ResponseCode Result { get; internal set; }
/// <summary>
/// Indicates representation of the response
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Representation of the response.</value>
public Representation Representation { get; internal set; }
/// <summary>
/// Indicates header options of the response
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Header options of the response.</value>
public ResourceOptions Options { get; internal set; }
}
}
namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class provides API to manage representation.
+ /// This class provides APIs to manage representation.
/// A representation is a payload of a request or a response.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class Representation : IDisposable
{
internal IntPtr _representationHandle = IntPtr.Zero;
/// <summary>
/// The Representation constructor
/// </summary>
- /// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// The URI path of resource
/// </summary>
- /// <remarks>
+ /// <since_tizen>3</since_tizen>
+ /// <value>
+ /// The URI path of resource.
/// Setter can throw exceptions
- /// </remarks>
+ /// </value>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
/// <summary>
/// The type of resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The type of resource.</value>
/// <seealso cref="ResourceTypes"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// The interface of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The interface of the resource.</value>
/// <seealso cref="ResourceInterfaces"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// Current attributes of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Current attributes of the resource.</value>
/// <seealso cref="Attributes"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// List of Child resource representation
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>List of Child resource representation.</value>
/// <code>
/// Representation repr = new Representation();
/// Representation child1 = new Representation();
/// <summary>
/// Releases any unmanaged resources used by this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
protected virtual void Dispose(bool disposing)
{
if (_disposed)
/// Class respresenting request to a resource.
/// It provides APIs to manage client's request.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class Request : IDisposable
{
private bool _disposed = false;
/// <summary>
/// The host address of the request
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The host address of the request.</value>
public string HostAddress { get; internal set; }
/// <summary>
/// The representation of the request
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The representation of the request.</value>
public Representation Representation { get; internal set; }
/// <summary>
/// The query of the request
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The query of the request.</value>
public ResourceQuery Query { get; internal set; }
/// <summary>
/// The options related to the request
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The options related to the request.</value>
public ResourceOptions Options { get; internal set; }
/// <summary>
/// Releases any unmanaged resources used by this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
protected virtual void Dispose(bool disposing)
{
if (_disposed)
/// Abstract class respresenting a resource.
/// All resources need to inherit from this class.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public abstract class Resource : IDisposable
{
private IntPtr _resourceHandle = IntPtr.Zero;
/// <summary>
/// The constructor
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// @a uri format would be relative URI path like '/a/light'
/// and its length must be less than 128.
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="uri">The URI path of the resource</param>
/// <param name="types">Resource types</param>
/// <param name="interfaces">Resource interfaces</param>
/// <param name="policy">The policies of the resoruce</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// IoTConnectivityServerManager.Initialize() should be called to initialize
/// </pre>
/// <summary>
/// Type details of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Type details of the resource.</value>
public ResourceTypes Types { get; internal set; }
/// <summary>
/// Interface details of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Interface details of the resource.</value>
public ResourceInterfaces Interfaces { get; internal set; }
/// <summary>
/// The policies of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The policies of the resource.</value>
public ResourcePolicy Policy { get; internal set; }
/// <summary>
/// URI path of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>URI path of the resource.</value>
public string UriPath { get; internal set; }
/// <summary>
/// List of Child resources
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>List of Child resources.</value>
public ICollection<Resource> Children
{
get
/// <summary>
/// Notify the specified representation and qos.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <privilege>
/// http://tizen.org/privilege/internet
/// </privilege>
+ /// <privlevel>public</privlevel>
/// <param name="representation">Representation.</param>
/// <param name="qos">The quality of service for message transfer.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <pre>
/// IoTConnectivityServerManager.Initialize() should be called to initialize
/// </pre>
/// <summary>
/// This is Called when the client performs get operation on this resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="request">A request from client</param>
/// <returns>A response having the representation and the result</returns>
protected abstract Response OnGet(Request request);
/// <summary>
/// This is Called when the client performs put operation on this resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="request">A request from client</param>
/// <returns>A response</returns>
protected abstract Response OnPut(Request request);
/// <summary>
/// This is Called when the client performs post operation on this resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="request">A request from client</param>
/// <returns>A response having the representation and the result</returns>
protected abstract Response OnPost(Request request);
/// <summary>
/// This is Called when the client performs delete operation on this resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="request">A request from client</param>
/// <returns>A response</returns>
protected abstract Response OnDelete(Request request);
/// <summary>
/// Called on the observing event.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="request">A request from client</param>
/// <param name="type">Observer type</param>
/// <param name="observeId">Observe identifier.</param>
/// <summary>
/// Releases any unmanaged resources used by this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
protected virtual void Dispose(bool disposing)
{
if (_disposed)
namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class is an event arguments of the ResourceFound event.
+ /// This class represents event arguments of the ResourceFound event.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class ResourceFoundEventArgs : EventArgs
{
internal ResourceFoundEventArgs() { }
/// Indicates the request id.
/// This is the same request id returned by the <see cref="IoTConnectivityClientManager.StartFindingResource()"/> API.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The request id.</value>
public int RequestId { get; internal set; }
/// <summary>
/// Indicates to continuously receive the event for finding resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Continuously receive the event for finding resource.</value>
public bool EventContinue { get; set; }
/// <summary>
/// Remote resource which is found after <see cref="IoTConnectivityClientManager.StartFindingResource()"/>.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Remote resource which is found after <see cref="IoTConnectivityClientManager.StartFindingResource()"/>.</value>
/// <seealso cref="IoTConnectivityClientManager.ResourceFound"/>
/// <seealso cref="IoTConnectivityClientManager.StartFindingResource()"/>
public RemoteResource Resource { get; internal set; }
/// This class contains resource interfaces and provides APIs to manage, add, remove those interfaces.
/// A resource interface indicates a class or category of resources.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class ResourceInterfaces : IEnumerable<string>, IDisposable
{
/// <summary>
/// Default Interface
/// </summary>
+ /// <since_tizen>3</since_tizen>
public const string DefaultInterface = "oic.if.baseline";
/// <summary>
/// List Links Interface which is used to list the references to other resources contained in a resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public const string LinkInterface = "oic.if.ll";
/// <summary>
/// Batch Interface which is used to manipulate (GET, PUT, POST, DELETE) on other resource contained in a resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public const string BatchInterface = "oic.if.b";
/// <summary>
/// Group Interface which is used to manipulate (GET, PUT, POST) a group of remote resources.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public const string GroupInterface = "oic.mi.grp";
/// <summary>
/// Read-Only Interface which is used to limit the methods that can be applied to a resource to GET only.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public const string ReadonlyInterface = "oic.if.r";
private readonly IntPtr _resourceInterfacesHandle = IntPtr.Zero;
/// <summary>
/// Constructor of ResourceInterfaces
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Add()"/>
/// <seealso cref="Remove()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <summary>
/// Constructor of ResourceInterfaces using list of interfaces
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="ifaces">List of resource interfaces</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// Indicates count of interfaces in the list
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Count of interfaces in the list.</value>
/// <code>
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
/// <summary>
/// Adds a resource interface into the list.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// @a item could be a value such as <see cref="DefaultInterface"/>
/// </remarks>
/// <param name="item">The string data to insert into the resource interfaces</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Remove()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
/// <summary>
/// Removes a resource interface from the list
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The string data to delete from the resource ifaces</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Add()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// Return enumerator for the list of interfaces
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <returns>The enumerator</returns>
/// <code>
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// <summary>
/// Return enumerator for the list of interfaces
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <returns>The enumerator</returns>
/// <code>
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// <summary>
/// Releases any unmanaged resources used by this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
protected virtual void Dispose(bool disposing)
{
if (_disposed)
/// The iotcon options API provides methods for managing vendor specific options of coap packet.\n
/// See more about coap packet in http://tools.ietf.org/html/rfc7252.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class ResourceOptions : IDictionary<ushort, string>, IDisposable
{
internal const int MaxSize = 2;
/// <summary>
/// The resource options constructor
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Add()"/>
/// <seealso cref="Remove()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <summary>
/// Contains all the Option keys
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>All the Option keys.</value>
/// <code>
/// ResourceOptions options = new ResourceOptions();
/// options.Add(2050, "sample-data");
/// <summary>
/// Contains all the Option values
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>All the Option values.</value>
/// <code>
/// ResourceOptions options = new ResourceOptions();
/// options.Add(2050, "sample-data");
/// <summary>
/// Gets the number of options
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The number of options.</value>
/// <code>
/// ResourceOptions options = new ResourceOptions();
/// options.Add(2050, "sample-data");
/// <summary>
/// Represents whether the collection is readonly
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Whether the collection is readonly.</value>
/// <code>
/// ResourceOptions options = new ResourceOptions();
/// if (options.IsReadOnly)
/// <summary>
/// Gets or sets the option data
/// </summary>
- /// <remarks>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The option data.</value>
/// <param name="key">The option id to get or set.</param>
/// <returns>The option with the specified id.</returns>
/// <code>
/// <summary>
/// Checks whether the given key exists in Options collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="key">The key to look for</param>
/// <returns>true if exists. Otherwise, false</returns>
/// <code>
/// <summary>
/// Adds a new id and a correspoding data into the options.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// ResourceOptions can have up to 2 options. \n
/// key is always situated between 2048 and 3000. \n
/// </remarks>
/// <param name="key">The id of the option to insert</param>
/// <param name="value">The string data to insert into the options</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Remove()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// Removes the id and its associated data from the options.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="key">The id of the option to delete</param>
/// <returns>True if operation is successful. Otherwise, false</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Add()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// Gets the value associated with the specified key.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="key">The option id</param>
/// <param name="value">Value corresponding to option id</param>
/// <returns>True if the key exists, false otherwise</returns>
/// <summary>
/// Adds options key and value as a key value pair
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The key value pair</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Remove()"/>
/// <code>
/// ResourceOptions options = new ResourceOptions();
/// <summary>
/// Clears the Options collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <code>
/// ResourceOptions options = new ResourceOptions();
/// <summary>
/// Checks if the given option pair exists
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The key value pair</param>
/// <returns>True if exists. Otherwise, false</returns>
/// <code>
/// <summary>
/// Copies the elements of the options collection to an Array, starting at a particular index.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="array">The destination array</param>
/// <param name="arrayIndex">Index parameter</param>
/// <code>
/// <summary>
/// Remove the given key value pair from the options
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The key value pair to remove</param>
/// <returns>True if operation is successful. Otherwise, false</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Add()"/>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <code>
/// <summary>
/// Get the enumerator to options collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <returns>Enumerator to option pairs</returns>
/// <code>
/// ResourceOptions options = new ResourceOptions();
/// <summary>
/// Releases any unmanaged resources used by this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Get the enumerator to options collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <returns>Enumerator to option pairs</returns>
/// <code>
/// ResourceOptions options = new ResourceOptions();
/// <summary>
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
protected virtual void Dispose(bool disposing)
{
if (_disposed)
/// <summary>
/// Enumeration for policy which can be held in a resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public enum ResourcePolicy
{
/// <summary>
/// Indicates resource uninitialized
/// </summary>
+ /// <since_tizen>3</since_tizen>
NoProperty = 0,
/// <summary>
/// Indicates resource that is allowed to be discovered
/// </summary>
+ /// <since_tizen>3</since_tizen>
Discoverable = (1 << 0),
/// <summary>
/// Indicates resource that is allowed to be observed
/// </summary>
+ /// <since_tizen>3</since_tizen>
Observable = (1 << 1),
/// <summary>
/// Indicates resource initialized and activated
/// </summary>
+ /// <since_tizen>3</since_tizen>
Active = (1 << 2),
/// <summary>
/// Indicates resource which takes some delay to respond
/// </summary>
+ /// <since_tizen>3</since_tizen>
Slow = (1 << 3),
/// <summary>
/// Indicates secure resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
Secure = (1 << 4),
/// <summary>
/// When this bit is set, the resource is allowed to be discovered only if discovery request contains an explicit querystring.
/// </summary>
+ /// <since_tizen>3</since_tizen>
ExplicitDiscoverable = (1 << 5),
}
}
/// <summary>
/// This class provides APIs to manage query of request.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class ResourceQuery : IDictionary<string, string>, IDisposable
{
internal const int QueryMaxLenth = 64;
/// <summary>
/// The resource query constructor
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Add()"/>
/// <seealso cref="Remove()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <summary>
/// Gets and sets the resource type of the query
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The resource type of the query.</value>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
/// <summary>
/// Gets and sets the resource interface of the query
/// </summary>
- /// <remarks>
+ /// <since_tizen>3</since_tizen>
+ /// <value>
+ /// The resource interface of the query.
/// Setter value could be a value such as <see cref="ResourceInterfaces.DefaultInterface"/>
- /// </remarks>
+ /// </value>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
/// <summary>
/// Contains all the query keys
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>All the query keys.</value>
/// <code>
/// ResourceQuery query = new ResourceQuery();
/// query.Add("key", "value");
/// <summary>
/// Contains all the query values
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>All the query values.</value>
/// <code>
/// ResourceQuery query = new ResourceQuery();
/// query.Add("key", "value");
/// <summary>
/// Gets the number of query elements
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The number of query elements.</value>
/// <code>
/// ResourceQuery query = new ResourceQuery();
/// query.Add("key", "value");
/// <summary>
/// Represents whether the collection is readonly
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Whether the collection is readonly.</value>
/// <code>
/// ResourceQuery query = new ResourceQuery();
/// if (query.IsReadOnly)
/// <summary>
/// Gets or sets the query data
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The query data.</value>
/// <param name="key">The query key to get or set.</param>
/// <returns>The query with the specified key.</returns>
/// <code>
/// <summary>
/// Checks whether the given key exists in Query collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="key">The key to look for</param>
/// <returns>true if exists. Otherwise, false</returns>
/// <code>
/// <summary>
/// Adds a new key and correspoding value into the query.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// The full length of query should be less than or equal to 64.
/// </remarks>
/// <param name="key">The key of the query to insert</param>
/// <param name="value">The string data to insert into the query</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Remove()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// Removes the key and its associated value from the query.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="key">The id of the query to delete</param>
/// <returns>True if operation is successful. Otherwise, false</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Add()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// Gets the value associated with the specified key.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="key">The query key</param>
/// <param name="value">Value corresponding to query key</param>
/// <returns>True if the key exists, false otherwise</returns>
}
/// <summary>
- /// Adds query key and value as a key value pair
+ /// Adds query key and value as a key value pair
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The key value pair</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Remove()"/>
/// <code>
/// ResourceQuery query = new ResourceQuery();
/// <summary>
/// Clears the Query collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
/// <code>
/// <summary>
/// Checks if the given query pair exists
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The key value pair</param>
/// <returns>True if exists. Otherwise, false</returns>
/// <code>
/// <summary>
/// Copies the elements of the query collection to an Array, starting at a particular index.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="array">The destination array</param>
/// <param name="arrayIndex">Index parameter</param>
/// <code>
/// <summary>
/// Remove the given key value pair from the query
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The key value pair to remove</param>
/// <returns>True if operation is successful. Otherwise, false</returns>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Add()"/>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <code>
/// <summary>
/// Get the enumerator to query collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <returns>Enumerator to query pairs</returns>
/// <code>
/// ResourceQuery query = new ResourceQuery();
/// <summary>
/// Get the enumerator to query collection
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <returns>Enumerator to query pairs</returns>
/// <code>
/// ResourceQuery query = new ResourceQuery();
/// <summary>
/// Releases any unmanaged resources used by this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
protected virtual void Dispose(bool disposing)
{
if (_disposed)
/// <summary>
/// Enumeration for states of remote resource.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public enum ResourceState
{
/// <summary>
/// Indicates remote resource is alive
/// </summary>
+ /// <since_tizen>3</since_tizen>
Alive = 0,
/// <summary>
/// Indicates remote resource is lost
/// </summary>
+ /// <since_tizen>3</since_tizen>
LostSignal
}
}
/// This class contains resource types and provides APIs to manage, add, remove those types.
/// A resource type indicates a class or category of resources.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class ResourceTypes : IEnumerable<string>, IDisposable
{
internal const int MaxLength = 61;
/// <summary>
/// Constructor of ResourceTypes
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Add()"/>
/// <seealso cref="Remove()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <summary>
/// Constructor of ResourceTypes using list of types
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="types">List of resource types</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <code>
/// ResourceTypes types = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// <summary>
/// Indicates count of types in the list
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>Count of types in the list.</value>
/// <code>
/// ResourceTypes types = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// Console.WriteLine("There are {0} items", types.Count);
/// <summary>
/// Adds a resource type into the list.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <remarks>
/// The length of @a item should be less than or equal to 61.\n
/// The @a item must start with a lowercase alphabetic character, followed by a sequence
/// Duplicate strings are not allowed.
/// </remarks>
/// <param name="item">The string data to insert into the resource types</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Remove()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// Removes a resource type from the list
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="item">The string data to delete from the resource types</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <seealso cref="Add()"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <summary>
/// Return enumerator for the list of types
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <returns>The enumerator</returns>
/// <code>
/// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// <summary>
/// Return enumerator for the list of types
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <returns>The enumerator</returns>
/// <code>
/// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// <summary>
/// Releases any unmanaged resources used by this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
+ /// <feature>http://tizen.org/feature/iot.ocf</feature>
protected virtual void Dispose(bool disposing)
{
if (_disposed)
/// This class represents response from a resource.
/// It provides APIs to manage response.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class Response : IDisposable
{
private bool _disposed = false;
/// <summary>
/// Constructor of Response
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <code>
/// Response response = new Response();
/// </code>
/// <summary>
/// Gets or sets the result from/into the reponse
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The result from/into the reponse.</value>
public ResponseCode Result { get; set; }
/// <summary>
/// Gets or sets the representation from/into the reponse
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The representation from/into the reponse.</value>
public Representation Representation { get; set; }
/// <summary>
/// Gets or sets the options from/into the reponse
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The options from/into the reponse.</value>
public ResourceOptions Options { get; set; }
/// <summary>
/// Releases any unmanaged resources used by this object.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
+ /// <since_tizen>3</since_tizen>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
protected virtual void Dispose(bool disposing)
{
/// <summary>
/// Enumeration for result of response
/// </summary>
+ /// <since_tizen>3</since_tizen>
public enum ResponseCode
{
/// <summary>
/// Indicates result of response for success
/// </summary>
+ /// <since_tizen>3</since_tizen>
Ok = 0,
/// <summary>
/// Indicates result of response for some error
/// </summary>
+ /// <since_tizen>3</since_tizen>
Error,
/// <summary>
/// Indicates result of response for created resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
Created,
/// <summary>
- /// Indicates result of response for deleted resource
+ /// Indicates result of response for deleted resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
Deleted,
/// <summary>
- /// Indicates result of response for changed resource
+ /// Indicates result of response for changed resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
Changed,
/// <summary>
/// Indicates result of response for slow resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
Slow,
/// <summary>
/// Indicates result of response for accessing unauthorized resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
Forbidden
}
}
namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class is an event arguments of the StateChanged event.
+ /// This class represents event arguments of the StateChanged event.
/// </summary>
+ /// <since_tizen>3</since_tizen>
public class StateChangedEventArgs : EventArgs
{
internal StateChangedEventArgs() { }
/// <summary>
/// Indicates the new state of the resource
/// </summary>
+ /// <since_tizen>3</since_tizen>
+ /// <value>The new state of the resource.</value>
public ResourceState State { get; internal set; }
}
}