Name: csapi-tizenfx
Summary: Assemblies of Tizen .NET
-Version: 4.0.0.286
+Version: 4.0.0.295
Release: 1
Group: Development/Libraries
License: Apache-2.0
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
./build.sh --full
./build.sh --dummy
-./build.sh --pack 4.0.0-preview1-00286
+./build.sh --pack 4.0.0-preview1-00295
%install
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
{
internal IntPtr Handle;
internal string Id;
- protected static readonly string LogTag = typeof(WidgetBase).Namespace;
+ private const string LogTag = "Tizen.Applications.WidgetBase";
/// <summary>
/// Window object for this widget instance.
/// </summary>
public class WidgetControl : IDisposable
{
- protected static readonly string LogTag = "WidgetControl";
+ private const string LogTag = "Tizen.Applications.WidgetControl";
/// <summary>
/// Class for the widget instance.
/// </summary>
[DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_date_taken", CallingConvention = CallingConvention.Cdecl)]
internal static extern MediaContentError GetDateTaken(IntPtr handle, out IntPtr dateTaken);
- [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_burst_id", CallingConvention = CallingConvention.Cdecl)]
- internal static extern MediaContentError GetBurstId(IntPtr handle, out IntPtr burstId);
-
[DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_exposure_time", CallingConvention = CallingConvention.Cdecl)]
internal static extern MediaContentError GetExposureTime(IntPtr handle, out IntPtr exposureTime);
[DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_model", CallingConvention = CallingConvention.Cdecl)]
internal static extern MediaContentError GetModel(IntPtr handle, out IntPtr model);
- [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_is_burst_shot", CallingConvention = CallingConvention.Cdecl)]
- internal static extern MediaContentError IsBurstShot(IntPtr handle, out bool isBurstShot);
-
[DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_media_id", CallingConvention = CallingConvention.Cdecl)]
internal static extern MediaContentError GetMediaId(IntPtr handle, out IntPtr mediaId);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void InsertCompletedCallback(MediaContentError error, IntPtr userData);
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void InsertBurstShotCompletedCallback(MediaContentError error, IntPtr userData);
-
[DllImport(Libraries.MediaContent, EntryPoint = "media_info_insert_to_db")]
internal static extern MediaContentError Insert(string filePath, out MediaInfoHandle info);
internal static extern MediaContentError BatchInsert(string[] filePathArray, int arrayLength,
InsertCompletedCallback callback, IntPtr userData = default(IntPtr));
- [DllImport(Libraries.MediaContent, EntryPoint = "media_info_insert_burst_shot_to_db")]
- internal static extern MediaContentError BurstShotInsert(string[] filePathArray, int arrayLength,
- InsertBurstShotCompletedCallback callback, IntPtr userData = default(IntPtr));
-
[DllImport(Libraries.MediaContent, EntryPoint = "media_info_delete_from_db")]
internal static extern MediaContentError Delete(string mediaId);
- [DllImport(Libraries.MediaContent, EntryPoint = "media_info_delete_batch_from_db")]
- internal static extern MediaContentError BatchDelete(FilterHandle filter);
-
[DllImport(Libraries.MediaContent, EntryPoint = "media_info_destroy")]
internal static extern MediaContentError Destroy(IntPtr handle);
[DllImport(Libraries.MediaContent, EntryPoint = "media_info_cancel_thumbnail")]
internal static extern MediaContentError CancelThumbnail(MediaInfoHandle mediaInformationHandle);
-
[DllImport(Libraries.MediaContent, EntryPoint = "media_info_start_face_detection")]
internal static extern MediaContentError StartFaceDetection(MediaInfoHandle handle,
FaceDetectionCompletedCallback callback, IntPtr userData = default(IntPtr));
public static string Orientation => "MEDIA_ORIENTATION";
/// <summary>
- /// Gets the column name for the burst ID of media.
- /// </summary>
- /// <value>The column name for the burst ID of media.</value>
- /// <remarks>
- /// The value type is string.
- /// </remarks>
- /// <seealso cref="ImageInfo.BurstId"/>
- public static string BurstId => "BURST_ID";
-
- /// <summary>
/// Gets the column name for the rating of media.
/// </summary>
/// <value>The column name for the rating of media.</value>
/// <seealso cref="MediaInfo.Category"/>
public static string Category => "MEDIA_CATEGORY";
-
/// <summary>
/// Gets the column name for the location tag of media.
/// </summary>
public static string Model => "MEDIA_MODEL";
}
-
/// <summary>
/// Provides the folder column names that can be used for Select and Count commands.
/// </summary>
Orientation = InteropHelper.GetValue<Orientation>(imageHandle, Interop.ImageInfo.GetOrientation);
DateTaken = InteropHelper.GetString(imageHandle, Interop.ImageInfo.GetDateTaken);
- BurstId = InteropHelper.GetString(imageHandle, Interop.ImageInfo.GetBurstId);
ExposureTime = InteropHelper.GetString(imageHandle, Interop.ImageInfo.GetExposureTime);
FNumber = InteropHelper.GetValue<double>(imageHandle, Interop.ImageInfo.GetFNumber);
Model = InteropHelper.GetString(imageHandle, Interop.ImageInfo.GetModel);
- IsBurstShot = InteropHelper.GetValue<bool>(imageHandle, Interop.ImageInfo.IsBurstShot);
-
}
finally
{
public string DateTaken { get; }
/// <summary>
- /// Gets the burst shot ID.
- /// </summary>
- /// <value>The burst shot ID if it is a burst shot, otherwise an empty string.</value>
- /// <seealso cref="IsBurstShot"/>
- public string BurstId { get; }
-
- /// <summary>
/// Gets the exposure time from EXIF.
/// </summary>
/// <value>The exposure time from EXIF.</value>
/// <summary>
/// Gets the FNumber from EXIF.
/// </summary>
- /// <value>The FNumber from exif.</value>
+ /// <value>The FNumber from EXIF.</value>
public double FNumber { get; }
/// <summary>
/// </summary>
/// <value>The model from EXIF.</value>
public string Model { get; }
-
- /// <summary>
- /// Gets the value indicating whether the media is a burst shot image.
- /// </summary>
- /// <value>true if the media is a burst shot image, otherwise false.</value>
- public bool IsBurstShot { get; }
}
}
}
}
-
private static readonly Interop.Content.MediaContentDBUpdatedCallback _folderUpdatedCb = (
MediaContentError error, int pid, ItemType updateItem, OperationType updateType,
MediaType mediaType, string uuid, string filePath, string mimeType, IntPtr _) =>
/// </summary>
Altitude,
/// <summary>
- /// Burst shot.
- /// </summary>
- BurstImage,
- /// <summary>
/// Rating.
/// </summary>
Rating = 20,
Bookmark.FromHandle);
}
-
/// <summary>
/// Retrieves the number of the face information added to or detected from the media.
/// </summary>
Tag.FromHandle);
}
-
/// <summary>
/// Retrieves the number of the media information.
/// </summary>
}
}
- /// <summary>
- /// Adds burst shot images into the media database.
- /// </summary>
- /// <param name="paths">The paths of the burst shot images to add.</param>
- /// <returns>A task that represents the asynchronous add operation.</returns>
- /// <remarks>
- /// The paths that already exist in the database.\n
- /// At most 300 items can be added at once.
- /// \n
- /// If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.\n
- /// If you want to access external storage, you should add privilege http://tizen.org/privilege/externalstorage.
- /// </remarks>
- /// <privilege>http://tizen.org/privilege/content.write</privilege>
- /// <privilege>http://tizen.org/privilege/mediastorage</privilege>
- /// <privilege>http://tizen.org/privilege/externalstorage</privilege>
- /// <exception cref="InvalidOperationException">The <see cref="MediaDatabase"/> is disconnected.</exception>
- /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
- /// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
- /// <exception cref="ArgumentNullException"><paramref name="paths"/> is null.</exception>
- /// <exception cref="ArgumentException">
- /// <paramref name="paths"/> contains null.\n
- /// -or-\n
- /// <paramref name="paths"/> contains the invalid path.\n
- /// -or-\n
- /// The number of <paramref name="paths"/> is 300 or more items.
- /// </exception>
- /// <exception cref="FileNotFoundException"><paramref name="paths"/> contains a path that does not exist.</exception>
- /// <exception cref="UnauthorizedAccessException">The caller has no required privilege.</exception>
- public async Task AddBurstShotImagesAsync(IEnumerable<string> paths)
- {
- ValidateDatabase();
-
- ValidatePaths(paths);
-
- var tcs = new TaskCompletionSource<bool>(TaskContinuationOptions.RunContinuationsAsynchronously);
- string[] pathArray = paths.ToArray();
-
- Interop.MediaInfo.InsertBurstShotCompletedCallback callback = (error, _) =>
- {
- if (error == MediaContentError.None)
- {
- tcs.TrySetResult(true);
- }
- else
- {
- tcs.TrySetException(error.AsException("Failed to add burst shot images"));
- }
- };
-
- using (ObjectKeeper.Get(callback))
- {
- Interop.MediaInfo.BurstShotInsert(pathArray, pathArray.Length, callback).
- ThrowIfError("Failed to add burst shots to db");
-
- await tcs.Task;
- }
- }
-
private static void SetUpdateValue<T>(Interop.MediaInfoHandle handle, T value,
Func<Interop.MediaInfoHandle, T, MediaContentError> func)
{
}
}
-
private static void SetUpdateValue<T>(Interop.MediaInfoHandle handle, Nullable<T> value,
Func<Interop.MediaInfoHandle, T, MediaContentError> func) where T : struct
{
RegisterStateChangedCallback();
}
+ /// <summary>
+ /// Finalizes an instance of the AudioCaptureBase class.
+ /// </summary>
~AudioCaptureBase()
{
Dispose(false);
RegisterStateChangedCallback();
}
+ /// <summary>
+ /// Finalizes an instance of the AudioPlayback class.
+ /// </summary>
~AudioPlayback()
{
Dispose(false);
}
/// <summary>
- /// Destructor of the camera class.
+ /// Finalizes an instance of the Camera class.
/// </summary>
~Camera()
{
}
}
+ /// <summary>
+ /// Finalizes an instance of the MediaCodec class.
+ /// </summary>
~MediaCodec()
{
Dispose(false);
Interop.MetadataEditor.RemovePicture(Handle, index).ThrowIfError("Failed to remove picture");
}
+ /// <summary>
+ /// Finalizes an instance of the MetadataEditor class.
+ /// </summary>
~MetadataEditor()
{
Dispose(false);
}
}
+ /// <summary>
+ /// Finalizes an instance of the MetadataExtractor class.
+ /// </summary>
~MetadataExtractor()
{
Dispose(false);
using System;
using System.Linq;
+using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Tizen.System;
using static Tizen.Multimedia.Interop.Radio;
try
{
- SetScanCompletedCb(_handle, ScanCompleteCallback).ThrowIfFailed("Failed to initialize radio");
- SetInterruptedCb(_handle, InterruptedCallback).ThrowIfFailed("Failed to initialize radio");
+ _scanCompletedCallback = _ => ScanCompleted?.Invoke(this, EventArgs.Empty);
+ _interruptedCallback = (reason, _) => Interrupted?.Invoke(this, new RadioInterruptedEventArgs(reason));
+ _scanUpdatedCallback = (frequency, _) => ScanUpdated?.Invoke(this, new ScanUpdatedEventArgs(frequency));
+ _scanStoppedCallback = _ => ScanStopped?.Invoke(this, EventArgs.Empty);
+
+ SetScanCompletedCb(_handle, _scanCompletedCallback).ThrowIfFailed("Failed to initialize radio");
+ SetInterruptedCb(_handle, _interruptedCallback).ThrowIfFailed("Failed to initialize radio");
}
catch (Exception)
{
}
}
+ private ScanUpdatedCallback _scanUpdatedCallback;
+
+ private ScanStoppedCallback _scanStoppedCallback;
+
+ private ScanCompletedCallback _scanCompletedCallback;
+
+ private InterruptedCallback _interruptedCallback;
+
/// <summary>
/// Occurs when the radio scanning information is updated.
/// </summary>
{
ValidateRadioState(RadioState.Ready, RadioState.Playing);
- ScanStart(Handle, ScanUpdatedCallback);
+ ScanStart(Handle, _scanUpdatedCallback).ThrowIfFailed("Failed to start scanning");
}
/// <summary>
{
ValidateRadioState(RadioState.Scanning);
- ScanStop(Handle, ScanStoppedCallback);
+ ScanStop(Handle, _scanStoppedCallback).ThrowIfFailed("Failed to stop scanning");
}
/// <summary>
/// It can be -1 if the seeking operation has failed.
/// </returns>
/// <remarks>The radio must be in the <see cref="RadioState.Playing"/> state.</remarks>
- /// <exception cref="InvalidOperationException">The radio is not in the valid state.</exception>
- public async Task<int> SeekUpAsync()
+ /// <exception cref="InvalidOperationException">
+ /// The radio is not in the valid state.\n
+ /// -or-\n
+ /// Seeking is in progress.
+ /// </exception>
+ public Task<int> SeekUpAsync()
{
- ValidateRadioState(RadioState.Playing);
-
- TaskCompletionSource<int> tcs = new TaskCompletionSource<int>();
- SeekCompletedCallback callback = (currentFrequency, _) =>
- {
- tcs.TrySetResult(currentFrequency);
- };
-
- SeekUp(Handle, callback);
- return await tcs.Task;
+ return SeekAsync(SeekUp);
}
/// <summary>
/// It can be -1 if the seeking operation has failed.
/// </returns>
/// <remarks>The radio must be in the <see cref="RadioState.Playing"/> state.</remarks>
- /// <exception cref="InvalidOperationException">The radio is not in the valid state.</exception>
- public async Task<int> SeekDownAsync()
+ /// <exception cref="InvalidOperationException">
+ /// The radio is not in the valid state.\n
+ /// -or-\n
+ /// Seeking is in progress.
+ /// </exception>
+ public Task<int> SeekDownAsync()
+ {
+ return SeekAsync(SeekDown);
+ }
+
+ private async Task<int> SeekAsync(Func<Interop.RadioHandle, SeekCompletedCallback, IntPtr, RadioError> func)
{
ValidateRadioState(RadioState.Playing);
- TaskCompletionSource<int> tcs = new TaskCompletionSource<int>();
- SeekCompletedCallback callback = (currentFrequency, _) =>
+ var tcs = new TaskCompletionSource<int>();
+ SeekCompletedCallback callback = (currentFrequency, _) => tcs.TrySetResult(currentFrequency);
+
+ GCHandle gcHandle;
+ try
{
- tcs.TrySetResult(currentFrequency);
- };
+ gcHandle = GCHandle.Alloc(callback);
- SeekDown(Handle, callback);
- return await tcs.Task;
+ func(Handle, callback, IntPtr.Zero).ThrowIfFailed("Failed to seek");
+ return await tcs.Task;
+ }
+ finally
+ {
+ gcHandle.Free();
+ }
}
private void ValidateFeatureSupported(string featurePath)
{
- bool supported = false;
- Information.TryGetValue(featurePath, out supported);
-
- if (supported == false)
+ if (Information.TryGetValue(featurePath, out bool supported) == false || supported == false)
{
throw new NotSupportedException($"The feature({featurePath}) is not supported.");
}
}
- private void ScanUpdatedCallback(int frequency, IntPtr data)
- {
- ScanUpdated?.Invoke(this, new ScanUpdatedEventArgs(frequency));
- }
-
- private void ScanStoppedCallback(IntPtr data)
- {
- ScanStopped?.Invoke(this, EventArgs.Empty);
- }
-
- private void ScanCompleteCallback(IntPtr data)
- {
- ScanCompleted?.Invoke(this, EventArgs.Empty);
- }
-
- private void InterruptedCallback(RadioInterruptedReason reason, IntPtr data)
- {
- Interrupted?.Invoke(this, new RadioInterruptedEventArgs(reason));
- }
-
private void ValidateRadioState(params RadioState[] required)
{
RadioState curState = State;
RegisterStateChangedEvent();
}
+ /// <summary>
+ /// Finalizes an instance of the ScreenMirroring class.
+ /// </summary>
~ScreenMirroring()
{
Dispose(false);
EngineConfig.Create(out _handle).Validate("Failed to create media vision engine.");
}
+ /// <summary>
+ /// Finalizes an instance of the EngineConfiguration class.
+ /// </summary>
~EngineConfiguration()
{
Dispose(false);
Validate("Failed to load FaceRecognitionModel from file");
}
+ /// <summary>
+ /// Finalizes an instance of the FaceRecognitionModel class.
+ /// </summary>
~FaceRecognitionModel()
{
Dispose(false);
InteropModel.Load(modelPath, out _handle).Validate("Failed to load FaceTrackingModel from file.");
}
+ /// <summary>
+ /// Finalizes an instance of the FaceTrackingModel class.
+ /// </summary>
~FaceTrackingModel()
{
Dispose(false);
InteropImage.Load(path, out _handle).Validate("Failed to load image object from file");
}
+ /// <summary>
+ /// Finalizes an instance of the ImageObject class.
+ /// </summary>
~ImageObject()
{
Dispose(false);
InteropModel.Load(modelPath, out _handle).Validate("Failed to load ImageTrackingModel from file");
}
+ /// <summary>
+ /// Finalizes an instance of the ImageTrackingModel class.
+ /// </summary>
~ImageTrackingModel()
{
Dispose(false);
{
}
+ /// <summary>
+ /// Finalizes an instance of the MediaVisionSource class.
+ /// </summary>
~MediaVisionSource()
{
Dispose(false);
}
}
+ /// <summary>
+ /// Releases all resources used by the current instance.
+ /// </summary>
public void Dispose()
{
Dispose(true);
EventTriggerCreate(eventType, out _handle).Validate("Failed to create surveillance event trigger.");
}
+ /// <summary>
+ /// Finalizes an instance of the SurveillanceEngine class.
+ /// </summary>
~SurveillanceEngine()
{
Dispose(false);
}
}
+ /// <summary>
+ /// Finalizes an instance of the MediaPacket class.
+ /// </summary>
~MediaPacket()
{
Dispose(false);
-/// Copyright 2016 by Samsung Electronics, Inc.,
-///
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
/// <since_tizen> 3 </since_tizen>
/// <param name="item">The key value pair to add.</param>
/// <feature>http://tizen.org/feature/iot.ocf</feature>
- /// <code>
+ /// <code><![CDATA[
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes();
/// attributes.Add(new KeyValuePair<string, object> ("state", "ON"));
- /// </code>
+ /// ]]></code>
public void Add(KeyValuePair<string, object> item)
{
Add(item.Key, item.Value);
/// <since_tizen> 3 </since_tizen>
/// <param name="item">The status key value pair.</param>
/// <returns>true if exists. Otherwise, false.</returns>
- /// <code>
+ /// <code><![CDATA[
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// { "dim", 10 }
/// };
/// if (attributes.Contains(new KeyValuePair<string, object> ("dim", 10))
/// Console.WriteLine("Attribute conatins pair ('dim', 10)");
- /// </code>
+ /// ]]></code>
public bool Contains(KeyValuePair<string, object> item)
{
return _attributes.Contains(item);
/// <since_tizen> 3 </since_tizen>
/// <param name="array">The destination array.</param>
/// <param name="arrayIndex">The zero-based index in an array at which copying begins.</param>
- /// <code>
+ /// <code><![CDATA[
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// { "dim", 10 }
/// int index = 0;
/// attributes.CopyTo(dest, index);
/// Console.WriteLine("Dest conatins ({0}, {1})", dest[0].Key, dest[0].Value);
- /// </code>
+ /// ]]></code>
public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
{
_attributes.CopyTo(array, arrayIndex);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns> An enumerator that can be used to iterate through the collection.</returns>
- /// <code>
+ /// <code><![CDATA[
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// { "dim", 10 }
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
{
return _attributes.GetEnumerator();
/// <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>
- /// <code>
+ /// <code><![CDATA[
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// { "dim", 10 }
/// };
/// if (attributes.Remove(new KeyValuePair<string, object>("dim", 10)))
/// Console.WriteLine("Remove was successful");
- /// </code>
+ /// ]]></code>
public bool Remove(KeyValuePair<string, object> item)
{
return Remove(item.Key);
/// When the resource receive presence, <see cref="PresenceReceived"/> event handler will be invoked.\n
/// You must destroy presence by calling StopReceivingPresence() if presence event is no longer needed.
/// </post>
- /// <seealso cref="IoTConnectivityServerManager.StartSendingPresence()"/>
+ /// <seealso cref="IoTConnectivityServerManager.StartSendingPresence(uint)"/>
/// <seealso cref="IoTConnectivityServerManager.StopSendingPresence()"/>
- /// <seealso cref="StopReceivingPresence()"/>
+ /// <seealso cref="StopReceivingPresence(int)"/>
/// <seealso cref="PresenceReceived"/>
/// <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>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// EventHandler<PresenceReceivedEventArgs> handler = (sender, e) => {
/// Console.Log("PresenceReceived, presence id :" + e.PresenceId);
/// }
/// IoTConnectivityClientManager.FindingErrorOccurred += errorHandler;
/// // Do not forget to remove these event handlers when they are not required any more.
/// int id = IoTConnectivityClientManager.StartReceivingPresence(IoTConnectivityClientManager.MulticastAddress, "oic.iot.door");
- /// </code>
+ /// ]]></code>
public static int StartReceivingPresence(string hostAddress, string resourceType)
{
Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
/// <pre>
/// Initialize() should be called to initialize.
/// </pre>
- /// <seealso cref="IoTConnectivityServerManager.StartSendingPresence()"/>
+ /// <seealso cref="IoTConnectivityServerManager.StartSendingPresence(uint)"/>
/// <seealso cref="IoTConnectivityServerManager.StopSendingPresence()"/>
- /// <seealso cref="StartReceivingPresence()"/>
+ /// <seealso cref="StartReceivingPresence(string, string)"/>
/// <seealso cref="PresenceReceived"/>
/// <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>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// EventHandler<PresenceReceivedEventArgs> handler = (sender, e) => {
/// Console.Log("PresenceReceived, presence id :" + e.PresenceId);
/// }
/// IoTConnectivityClientManager.PresenceReceived -= handler;
/// IoTConnectivityClientManager.FindingErrorOccurred -= errorHandler;
/// IoTConnectivityClientManager.StopReceivingPresence(id);
- /// </code>
+ /// ]]></code>
public static void StopReceivingPresence(int presenceId)
{
if (!s_presenceHandlesMap.ContainsKey((IntPtr)presenceId))
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// EventHandler<ResourceFoundEventArgs> handler = (sender, e) => {
/// Console.Log("Found resource at host address :" + e.Resource.HostAddress + ", uri :" + e.Resource.UriPath);
/// }
/// query.Type = "oic.iot.door";
/// // Do not forget to remove these event handlers when they are not required any more.
/// int id = IoTConnectivityClientManager.StartFindingResource(null, query);
- /// </code>
+ /// ]]></code>
public static int StartFindingResource(string hostAddress, ResourceQuery query = null)
{
Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
/// <post>
/// <see cref="DeviceInformationFound" /> event handler will be invoked.
/// </post>
- /// <seealso cref="IoTConnectivityServerManager.SetDeviceName()"/>
+ /// <seealso cref="IoTConnectivityServerManager.SetDeviceName(string)"/>
/// <seealso cref="DeviceInformationFound"/>
/// <seealso cref="DeviceInformationFoundEventArgs"/>
/// <seealso cref="TimeOut"/>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// EventHandler<DeviceInformationFoundEventArgs> handler = (sender, e) => {
/// Console.Log("Device information found, id : " + e.RequestId + ", name : " + e.Name);
/// }
/// IoTConnectivityClientManager.FindingErrorOccurred += errorHandler;
/// // Do not forget to remove these event handlers when they are not required any more.
/// int id = IoTConnectivityClientManager.StartFindingDeviceInformation(IoTConnectivityClientManager.MulticastAddress);
- /// </code>
+ /// ]]></code>
public static int StartFindingDeviceInformation(string hostAddress, ResourceQuery query = null)
{
Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// EventHandler<PlatformInformationFoundEventArgs> handler = (sender, e) => {
/// Console.Log("PlatformInformationFound :" + e.RequestId);
/// }
/// IoTConnectivityClientManager.FindingErrorOccurred += errorHandler;
/// // Do not forget to remove these event handlers when they are not required any more.
/// int id = IoTConnectivityClientManager.StartFindingPlatformInformation(IoTConnectivityClientManager.MulticastAddress);
- /// </code>
+ /// ]]></code>
public static int StartFindingPlatformInformation(string hostAddress, ResourceQuery query = null)
{
Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes types = new ResourceTypes(new List<string>(){ "org.tizen.light" });
/// Attributes attributes = new Attributes { { "state", "ON" }};
/// Resource res = new LiteResource("/room/1", types, ResourcePolicy.Discoverable, attributes);
/// } catch(Exception ex) {
/// Console.Log("Exception caught : " + ex.Message);
/// }
- /// </code>
+ /// ]]></code>
public static void RegisterResource(Resource resource)
{
Log.Info(IoTConnectivityErrorFactory.LogTag, "...");
/// <seealso cref="LiteResource"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes types = new ResourceTypes(new List<string>(){ "org.tizen.light" });
/// Attributes attributes = new Attributes { { "state", "ON" }};
/// Resource res = new LiteResource("/room/1", types, ResourcePolicy.Discoverable, attributes);
/// } catch(Exception ex) {
/// Console.Log("Exception caught : " + ex.Message);
/// }
- /// </code>
+ /// ]]></code>
public static void UnregisterResource(Resource resource)
{
if (resource != null)
* limitations under the License.
*/
+using System;
+using System.ComponentModel;
namespace Tizen.Network.IoTConnectivity
{
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <remarks>
- /// Creates a lite resource, which can then be registered in server using <see cref="IoTConnectivityServerManager.RegisterResource()"/>.\n
+ /// Creates a lite resource, which can then be registered in server using <see cref="IoTConnectivityServerManager.RegisterResource(Resource)"/>.\n
/// When client requests some operations, it sends a response to client automatically.\n
/// @a uri length must be less than 128.
/// </remarks>
/// <seealso cref="ResourceTypes"/>
/// <seealso cref="ResourcePolicy"/>
/// <seealso cref="Attributes"/>
- /// <code>
+ /// <code><![CDATA[
/// List<string> list = new List<string>() { "org.tizen.light" };
/// Attributes attributes = new Attributes() {
/// { "state", "ON" }
/// };
/// LiteResource res = new LiteResource("/light/1", new ResourceTypes(list), ResourcePolicy.Discoverable, attributes);
- /// </code>
+ /// ]]></code>
public LiteResource(string uri, ResourceTypes types, ResourcePolicy policy, Attributes attribs = null)
: base(uri, types, new ResourceInterfaces(new string[] { ResourceInterfaces.DefaultInterface }), policy)
{
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>The attributes of the lite resource.</value>
- /// <code>
+ /// <code><![CDATA[
/// List<string> list = new List<string>() { "org.tizen.light" };
/// LiteResource res = new LiteResource("/light/1", new ResourceTypes(list), ResourcePolicy.Discoverable);
/// Attributes attributes = new Attributes() {
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
public Attributes Attributes { get; set; }
/// <summary>
return true;
}
- // The code block untill @endcond should not appear in doxygen spec.
- /// @cond
+ /// <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>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override Response OnGet(Request request)
{
Representation representation = new Representation()
return response;
}
+ /// <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>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override Response OnPut(Request request)
{
Response response = new Response();
return response;
}
+ /// <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>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override Response OnPost(Request request)
{
if (OnPost(request.Representation.Attributes))
};
}
+ /// <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>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override Response OnDelete(Request request)
{
Response response = new Response();
return response;
}
+ /// <summary>
+ /// Called on the observing event.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <param name="request">A request from client.</param>
+ /// <param name="observeType">Observer type.</param>
+ /// <param name="observeId">Observe identifier.</param>
+ /// <returns>Returns true.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool OnObserving(Request request, ObserveType observeType, int observeId)
{
return true;
}
- /// @endcond
}
}
/// <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>
- /// <code>
+ /// <code><![CDATA[
/// Representation repr = new Representation();
/// ResourceTypes types = new ResourceTypes (new List<string>(){ "org.tizen.light" });
/// repr.Type = types;
/// {
/// Console.WriteLine("Type is {0}", item);
/// }
- /// </code>
+ /// ]]></code>
public ResourceTypes Type
{
get
/// <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>
- /// <code>
+ /// <code><![CDATA[
/// Representation repr = new Representation();
/// ResourceInterfaces ifaces = new ResourceInterfaces (new List<string>(){ ResourceInterfaces.DefaultInterface });
/// repr.Interface = ifaces;
/// {
/// Console.WriteLine("Interface is {0}", iface);
/// }
- /// </code>
+ /// ]]></code>
public ResourceInterfaces Interface
{
get
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>List of Child resource representation.</value>
- /// <code>
+ /// <code><![CDATA[
/// Representation repr = new Representation();
/// Representation child1 = new Representation();
/// ResourceTypes types1 = new ResourceTypes(new List<string>() { "org.tizen.light" });
/// {
/// Console.WriteLine("Exception caught : " + ex.Message);
/// }
- /// </code>
+ /// ]]></code>
public ICollection<Representation> Children
{
get
/// <seealso cref="ResourcePolicy"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// // Create a class which inherits from Resource
/// public class DoorResource : Resource
/// {
/// ResourceInterfaces ifaces = new ResourceInterfaces(new List<string>(){ ResourceInterfaces.DefaultInterface });
/// ResourceTypes types = new ResourceTypes(new List<string>(){ "oic.iot.door.new" });
/// Resource resource = new DoorResource("/door/uri1", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
- /// </code>
+ /// ]]></code>
protected Resource(string uri, ResourceTypes types, ResourceInterfaces interfaces, ResourcePolicy policy)
{
UriPath = uri;
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces ifaces = new ResourceInterfaces(new List<string>(){ ResourceInterfaces.DefaultInterface });
/// ResourceTypes types = new ResourceTypes(new List<string>(){ "oic.iot.door.new.notify" });
/// Resource resource = new DoorResource("/door/uri/new/notify", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
/// _attribute, 1 }
/// };
/// resource.Notify(repr, QualityOfService.High);
- /// </code>
+ /// ]]></code>
public void Notify(Representation representation, QualityOfService qos)
{
int ret = (int)IoTConnectivityError.None;
/// <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>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
- /// </code>
+ /// ]]></code>
public ResourceInterfaces(IEnumerable<string> ifaces)
{
int ret = Interop.IoTConnectivity.Common.ResourceInterfaces.Create(out _resourceInterfacesHandle);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>Count of interfaces in the list.</value>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
/// Console.WriteLine("There are {0} interfaces", resourceInterfaces.Count);
- /// </code>
+ /// ]]></code>
public int Count
{
get
/// <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()"/>
+ /// <seealso cref="Add(string)"/>
/// <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>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>(){ ResourceInterfaces.BatchInterface });
/// resourceInterfaces.Add(ResourceInterfaces.BatchInterface);
- /// </code>
+ /// ]]></code>
public void Remove(string item)
{
bool isRemoved = _resourceInterfaces.Remove(item);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The enumerator.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
/// foreach(string item in resourceInterfaces)
/// {
/// Console.WriteLine("Interface : {0}", item);
/// }
- /// </code>
+ /// ]]></code>
public IEnumerator<string> GetEnumerator()
{
return _resourceInterfaces.GetEnumerator();
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The enumerator.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
/// foreach(string item in resourceInterfaces)
/// {
/// Console.WriteLine("Interface : {0}", item);
/// }
- /// </code>
+ /// ]]></code>
IEnumerator IEnumerable.GetEnumerator()
{
return _resourceInterfaces.GetEnumerator();
/// <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>
+ /// <seealso cref="Remove(KeyValuePair{ushort, string})"/>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
- /// </code>
+ /// ]]></code>
public void Add(KeyValuePair<ushort, string> item)
{
Add(item.Key, item.Value);
/// <since_tizen> 3 </since_tizen>
/// <param name="item">The key value pair.</param>
/// <returns>True if exists. Otherwise, false.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
/// var isPresent = options.Contains(new KeyValuePair<ushort, string>(2050, "12345"));
/// if (isPresent)
/// Console.WriteLine("Key value pair is present");
- /// </code>
+ /// ]]></code>
public bool Contains(KeyValuePair<ushort, string> item)
{
return _options.Contains(item);
/// <since_tizen> 3 </since_tizen>
/// <param name="array">The destination array.</param>
/// <param name="arrayIndex">Index parameter.</param>
- /// <code>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
/// KeyValuePair<ushort, string>[] dest = new KeyValuePair<ushort, string>[options.Count];
/// options.CopyTo(dest, 0);
/// Console.WriteLine("Dest conatins ({0}, {1})", dest[0].Key, dest[0].Value);
- /// </code>
+ /// ]]></code>
public void CopyTo(KeyValuePair<ushort, string>[] array, int arrayIndex)
{
_options.CopyTo(array, arrayIndex);
/// <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()"/>
+ /// <seealso cref="Add(KeyValuePair{ushort, string})"/>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
/// var result = options.Remove(new KeyValuePair<ushort, string>(2050, "12345"));
- /// </code>
+ /// ]]></code>
public bool Remove(KeyValuePair<ushort, string> item)
{
return Remove(item.Key);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>Enumerator to option pairs.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "sample1"));
/// options.Add(new KeyValuePair<ushort, string>(2055, "sample2"));
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
public IEnumerator<KeyValuePair<ushort, string>> GetEnumerator()
{
return _options.GetEnumerator();
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>Enumerator to option pairs.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "sample1"));
/// options.Add(new KeyValuePair<ushort, string>(2055, "sample2"));
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
IEnumerator IEnumerable.GetEnumerator()
{
return _options.GetEnumerator();
/// <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>
+ /// <seealso cref="Remove(KeyValuePair{string, string})"/>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
- /// </code>
+ /// ]]></code>
public void Add(KeyValuePair<string, string> item)
{
Add(item.Key, item.Value);
/// <since_tizen> 3 </since_tizen>
/// <param name="item">The key value pair.</param>
/// <returns>True if exists. Otherwise, false.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
/// var isPresent = query.Contains(new KeyValuePair<string, string>("key1", "value1"));
/// if (isPresent)
/// Console.WriteLine("Key value pair is present");
- /// </code>
+ /// ]]></code>
public bool Contains(KeyValuePair<string, string> item)
{
return _query.Contains(item);
/// <since_tizen> 3 </since_tizen>
/// <param name="array">The destination array.</param>
/// <param name="arrayIndex">Index parameter.</param>
- /// <code>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
/// KeyValuePair<string, string>[] dest = new KeyValuePair<string, string>[query.Count];
/// query.CopyTo(dest, 0);
/// Console.WriteLine("Dest conatins ({0}, {1})", dest[0].Key, dest[0].Value);
- /// </code>
+ /// ]]></code>
public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
{
_query.CopyTo(array, arrayIndex);
/// <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()"/>
+ /// <seealso cref="Add(KeyValuePair{string, string})"/>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
/// var result = query.Remove(new KeyValuePair<string, string>("key1", "value1"));
- /// </code>
+ /// ]]></code>
public bool Remove(KeyValuePair<string, string> item)
{
return Remove(item.Key);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>Enumerator to query pairs.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
/// query.Add(new KeyValuePair<string, string>("key2", "value2"));
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
{
return _query.GetEnumerator();
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The enumerator to the query pairs.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
/// query.Add(new KeyValuePair<string, string>("key2", "value2"));
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
IEnumerator IEnumerable.GetEnumerator()
{
return _query.GetEnumerator();
/// <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>
+ /// <code><![CDATA[
/// ResourceTypes types = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
- /// </code>
+ /// ]]></code>
public ResourceTypes(IEnumerable<string> types)
{
int ret = Interop.IoTConnectivity.Common.ResourceTypes.Create(out _resourceTypeHandle);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>Count of types in the list.</value>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes types = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// Console.WriteLine("There are {0} items", types.Count);
- /// </code>
+ /// ]]></code>
public int Count
{
get
/// <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()"/>
+ /// <seealso cref="Add(string)"/>
/// <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>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// resourceTypes.Remove("oic.if.room");
- /// </code>
+ /// ]]></code>
public void Remove(string item)
{
int ret = Interop.IoTConnectivity.Common.ResourceTypes.Remove(_resourceTypeHandle, item);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The enumerator.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// foreach(string item in resourceTypes)
/// {
/// Console.WriteLine("Type : {0}", item);
/// }
- /// </code>
+ /// ]]></code>
public IEnumerator<string> GetEnumerator()
{
return _resourceTypes.GetEnumerator();
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The enumerator.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// foreach(string item in resourceTypes)
/// {
/// Console.WriteLine("Type : {0}", item);
/// }
- /// </code>
+ /// ]]></code>
IEnumerator IEnumerable.GetEnumerator()
{
return _resourceTypes.GetEnumerator();
_deviceHandle = handle;
}
+ /// <summary>
+ /// MtpDevice destructor.
+ /// </summary>
~MtpDevice()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
/// <since_tizen> 5 </since_tizen>
public enum MtpError
{
+ /// <summary>
+ /// Successful.
+ /// </summary>
None = ErrorCode.None,
+ /// <summary>
+ /// I/O Error.
+ /// </summary>
IoError = ErrorCode.IoError,
+ /// <summary>
+ /// Invalid Parameter.
+ /// </summary>
InvalidParameterError = ErrorCode.InvalidParameter,
+ /// <summary>
+ /// Out of memory.
+ /// </summary>
OutOfMemoryError = ErrorCode.OutOfMemory,
+ /// <summary>
+ /// Permission Denied.
+ /// </summary>
PermissionDeniedError = ErrorCode.PermissionDenied,
+ /// <summary>
+ /// Not Supported.
+ /// </summary>
NotSupportedError = ErrorCode.NotSupported,
-
+ /// <summary>
+ /// Not available communication with Mtp framework.
+ /// </summary>
CommunicationError = MtpErrorValue.Base | 0x01,
+ /// <summary>
+ /// Controller Error.
+ /// </summary>
ControllerError = MtpErrorValue.Base | 0x02,
+ /// <summary>
+ /// No device.
+ /// </summary>
NoDeviceError = MtpErrorValue.Base | 0x03,
+ /// <summary>
+ /// Not Initialized.
+ /// </summary>
NotInitializedError = MtpErrorValue.Base | 0x04,
+ /// <summary>
+ /// Not Activated.
+ /// </summary>
NotActivatedError = MtpErrorValue.Base | 0x05,
+ /// <summary>
+ /// Not Activated Communication.
+ /// </summary>
NotActivatedCommunicationError = MtpErrorValue.Base | 0x06,
+ /// <summary>
+ /// Plugin Fail.
+ /// </summary>
PluginFailError = MtpErrorValue.Base | 0x07
}
_objectHandle = objectHandle;
}
+ /// <summary>
+ /// MtpObject destructor.
+ /// </summary>
~MtpObject()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
_storageHandle = storageHandle;
}
+ /// <summary>
+ /// MtpStorage destructor.
+ /// </summary>
~MtpStorage()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
{
}
+ /// <summary>
+ /// NfcCardEmulationAdpater destructor.
+ /// </summary>
~NfcCardEmulationAdapter()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
/// <since_tizen> 3 </since_tizen>
public enum NfcError
{
+ /// <summary>
+ /// Successful.
+ /// </summary>
None = ErrorCode.None,
+ /// <summary>
+ /// I/O Error.
+ /// </summary>
IoError = ErrorCode.IoError,
+ /// <summary>
+ /// Invalid Parameter.
+ /// </summary>
InvalidParameterError = ErrorCode.InvalidParameter,
+ /// <summary>
+ /// Out of Memory.
+ /// </summary>
OutOfMemoryError = ErrorCode.OutOfMemory,
+ /// <summary>
+ /// Timed Out.
+ /// </summary>
TimedOutError = ErrorCode.TimedOut,
+ /// <summary>
+ /// Device Busy.
+ /// </summary>
DeviceBusyError = ErrorCode.ResourceBusy,
+ /// <summary>
+ /// Not Supported.
+ /// </summary>
NotSupportedError = ErrorCode.NotSupported,
+ /// <summary>
+ /// Permission Denied.
+ /// </summary>
PermissionDeniedError = ErrorCode.PermissionDenied,
+ /// <summary>
+ /// Operation Failed.
+ /// </summary>
OperationFailedError = -0x01C20000 | 0x01,
+ /// <summary>
+ /// Invalied Ndef Message.
+ /// </summary>
InvalidNdefMessageError = -0x01C20000 | 0x02,
+ /// <summary>
+ /// Invalid Record Type.
+ /// </summary>
InvalidRecordTypeError = -0x01C20000 | 0x03,
+ /// <summary>
+ /// No Device.
+ /// </summary>
NoDeviceError = -0x01C20000 | 0x04,
+ /// <summary>
+ /// Not Activated.
+ /// </summary>
NotActivatedError = -0x01C20000 | 0x05,
+ /// <summary>
+ /// Already Activated.
+ /// </summary>
AlreadyActivatedError = -0x01C20000 | 0x06,
+ /// <summary>
+ /// Already Deactivated.
+ /// </summary>
AlreadyDeactivatedError = -0x01C20000 | 0x07,
+ /// <summary>
+ /// Read Only Ndef.
+ /// </summary>
ReadOnlyNdefError = -0x01C20000 | 0x08,
+ /// <summary>
+ /// No Space On Ndef.
+ /// </summary>
NoSpaceOnNdefError = -0x01C20000 | 0x09,
+ /// <summary>
+ /// No Ndef Message
+ /// </summary>
NoNdefMessageError = -0x01C20000 | 0x0a,
+ /// <summary>
+ /// No Ndef Format
+ /// </summary>
NotNdefFormatError = -0x01C20000 | 0x0b,
+ /// <summary>
+ /// Security Restricted
+ /// </summary>
SecurityRestrictedError = -0x01C20000 | 0x0c,
+ /// <summary>
+ /// Illegal State
+ /// </summary>
IllegalStateError = -0x01C20000 | 0x0d,
+ /// <summary>
+ /// Not Initialized
+ /// </summary>
NotInitializedError = -0x01C20000 | 0x0e,
+ /// <summary>
+ /// Tag Not Supported
+ /// </summary>
TagNotSupportedError = -0x01C20000 | 0x0f,
+ /// <summary>
+ /// Aid Already Registered
+ /// </summary>
AidAlreadyRegisteredError = -0x01C20000 | 0x10
}
_messageHandle = messageHandle;
}
+ /// <summary>
+ /// NfcNdefMessage destructor.
+ /// </summary>
~NfcNdefMessage()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
NfcErrorFactory.ThrowNfcException(ret);
}
}
-
+
+ /// <summary>
+ /// NfcNdefRecord destructor.
+ /// </summary>
~NfcNdefRecord()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
RegisterP2pDataReceivedEvent();
}
+ /// <summary>
+ /// NfcP2p destructor.
+ /// </summary>
~NfcP2p()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
_snepHandle = handle;
}
+ /// <summary>
+ /// NfcSnep Distructor
+ /// </summary>
~NfcSnep()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
RegisterP2pTargetDiscoveredEvent();
}
+ /// <summary>
+ /// NfcP2pAdapter destructor
+ /// </summary>
~NfcP2pAdapter()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
_secureElementHandle = handle;
}
+ /// <summary>
+ /// NfcSecureElement destructor.
+ /// </summary>
~NfcSecureElement()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
_tagHandle = handle;
}
+ /// <summary>
+ /// NfcTag destructor.
+ /// </summary>
~NfcTag()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
RegisterTagDiscoveredEvent();
}
+ /// <summary>
+ /// NfcTagAdapter destructor.
+ /// </summary>
~NfcTagAdapter()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
_channelHandle = channelHandle;
}
+ /// <summary>
+ /// SmartcardChannel destructor.
+ /// </summary>
~SmartcardChannel()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
_readerHandle = handle;
}
+ /// <summary>
+ /// SmartcardReader destructor.
+ /// </summary>
~SmartcardReader()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
_sessionHandle = sessionHandle;
}
+ /// <summary>
+ /// SmartcardSession destructor.
+ /// </summary>
~SmartcardSession()
{
Dispose(false);
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
public void Dispose()
{
Dispose(true);
the format of the messages which pass over the channel, or the protocols used by specific
Trusted Applications.
+For security reasons, each device vendor usually uses their own TEE solution.
+If you intend your LibTeec application to be used on a real device,
+you must test your application on the TEE solution provided by the specific vendor.
+When developing and installing your trusted application, refer to the documentation provided by the vendor.
+
## Example
The following example demonstrates how to invoke command on Trused Application.
private const string LogTag = "Tizen.System.Feedback";
private readonly FeedbackPattern[] Pattern = new FeedbackPattern[39];
+
+ /// <summary>
+ /// Constructor of Feedback class
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <exception cref="NotSupportedException">Thrown when failed becuase the device (haptic, sound) is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when failed because of a system error.</exception>
+ /// <privilege>http://tizen.org/privilege/haptic</privilege>
+ /// <example>
+ /// <code>
+ /// Feedback feedback = new Feedback();
+ /// </code>
+ /// </example>
public Feedback()
{
Pattern[0].PatternNumber = 0;
}
}
+ /// <summary>
+ /// Finalizes an instance of the Feedback class.
+ /// </summary>
~Feedback()
{
Interop.Feedback.FeedbackError res = (Interop.Feedback.FeedbackError)Interop.Feedback.Deinitialize();
/// <summary>
/// EventArgs type for the IncomingCallRingtoneChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class IncomingCallRingtoneChangedEventArgs : EventArgs
{
private readonly string _incomingCallRingtone = null;
/// <summary>
/// EventArgs type for the WallpaperHomeScreenChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class WallpaperHomeScreenChangedEventArgs : EventArgs
{
private readonly string _wallpaperHomeScreen = null;
/// <summary>
/// EventArgs type for the WallpaperLockScreenChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class WallpaperLockScreenChangedEventArgs : EventArgs
{
private readonly string _wallpaperLockScreen = null;
/// <summary>
/// EventArgs type for the FontSizeChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class FontSizeChangedEventArgs : EventArgs
{
private readonly SystemSettingsFontSize _fontSize;
/// <summary>
/// EventArgs type for the FontTypeChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class FontTypeChangedEventArgs : EventArgs
{
private readonly string _fontType = null;
/// <summary>
/// EventArgs type for the MotionActivationChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class MotionActivationSettingChangedEventArgs : EventArgs
{
private readonly bool _motionActivation;
/// <summary>
/// EventArgs type for the EmailAlertRingtoneChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class EmailAlertRingtoneChangedEventArgs : EventArgs
{
private readonly string _emailAlertRingtone = null;
/// <summary>
/// EventArgs type for the UsbDebuggingSettingChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class UsbDebuggingSettingChangedEventArgs : EventArgs
{
private readonly bool _usbDebuggingEnabled;
/// <summary>
/// EventArgs type for the Data3GNetworkSettingChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class Data3GNetworkSettingChangedEventArgs : EventArgs
{
private readonly bool _data3GNetworkEnabled;
/// <summary>
/// EventArgs type for the LockscreenAppChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class LockscreenAppChangedEventArgs : EventArgs
{
private readonly string _lockscreenApp = null;
/// <summary>
/// EventArgs type for the LocaleCountryChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class LocaleCountryChangedEventArgs : EventArgs
{
private readonly string _localeCountry = null;
/// <summary>
/// EventArgs type for the LocaleLanguageChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class LocaleLanguageChangedEventArgs : EventArgs
{
private readonly string _localeLanguage = null;
/// <summary>
/// EventArgs type for the LocaleTimeFormat24HourChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class LocaleTimeFormat24HourSettingChangedEventArgs : EventArgs
{
private readonly bool _localeTimeFormat24Hour;
/// <summary>
/// EventArgs type for the LocaleTimeZoneChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class LocaleTimeZoneChangedEventArgs : EventArgs
{
private readonly string _localeTimeZone = null;
/// <summary>
/// EventArgs type for the TimeChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class TimeChangedEventArgs : EventArgs
{
private readonly int _time;
/// <summary>
/// EventArgs type for the SoundLockChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class SoundLockSettingChangedEventArgs : EventArgs
{
private readonly bool _soundLock;
/// <summary>
/// EventArgs type for the SoundSilentModeChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class SoundSilentModeSettingChangedEventArgs : EventArgs
{
private readonly bool _soundSilentMode;
/// <summary>
/// EventArgs type for the SoundTouchChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class SoundTouchSettingChangedEventArgs : EventArgs
{
private readonly bool _soundTouch;
/// <summary>
/// EventArgs type for the DisplayScreenRotationAutoChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class DisplayScreenRotationAutoSettingChangedEventArgs : EventArgs
{
private readonly bool _displayScreenRotationAuto;
/// <summary>
/// EventArgs type for the DeviceNameChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class DeviceNameChangedEventArgs : EventArgs
{
private readonly string _deviceName = null;
/// <summary>
/// EventArgs type for the MotionSettingChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class MotionSettingChangedEventArgs : EventArgs
{
private readonly bool _motionEnabled;
/// <summary>
/// EventArgs type for the NetworkWifiNotificationChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class NetworkWifiNotificationSettingChangedEventArgs : EventArgs
{
private readonly bool _networkWifiNotification;
/// <summary>
/// EventArgs type for the NetworkFlightModeChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class NetworkFlightModeSettingChangedEventArgs : EventArgs
{
private readonly bool _networkFlightMode;
/// <summary>
/// EventArgs type for the ScreenBacklightTimeChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class ScreenBacklightTimeChangedEventArgs : EventArgs
{
private readonly int _screenBacklightTime;
/// <summary>
/// EventArgs type for the SoundNotificationChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class SoundNotificationChangedEventArgs : EventArgs
{
private readonly string _soundNotification = null;
/// <summary>
/// EventArgs type for the SoundNotificationRepetitionPeriodChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class SoundNotificationRepetitionPeriodChangedEventArgs : EventArgs
{
private readonly int _soundNotificationRepetitionPeriod;
/// <summary>
/// EventArgs type for the LockStateChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class LockStateChangedEventArgs : EventArgs
{
private readonly SystemSettingsIdleLockState _lockState;
/// <summary>
/// EventArgs type for the AdsIdChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class AdsIdChangedEventArgs : EventArgs
{
private readonly string _adsId = null;
/// <summary>
/// EventArgs type for the UltraDataSaveChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class UltraDataSaveChangedEventArgs : EventArgs
{
private readonly SystemSettingsUdsState _ultraDataSave = SystemSettingsUdsState.UdsOff;
/// <summary>
/// EventArgs type for the UltraDataSavePackageListChanged event.
/// </summary>
+ /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ /// <privlevel>platform</privlevel>
public class UltraDataSavePackageListChangedEventArgs : EventArgs
{
private readonly string _ultraDataSavePackageList = null;