Name: csapi-tizenfx
Summary: Assemblies of Tizen .NET
-Version: 4.0.0.243
+Version: 4.0.0.249
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-00243
+./build.sh --pack 4.0.0-preview1-00249
%install
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
Tizen.Content.MediaContent.dll #common #mobile #mobile-emul #tv #ivi #wearable
Tizen.Content.MimeType.dll #common #mobile #mobile-emul #tv #ivi #wearable
Tizen.Context.dll #mobile #mobile-emul #wearable
-Tizen.Convergence.dll #common #mobile #mobile-emul #ivi #wearable
Tizen.dll #common #mobile #mobile-emul #tv #ivi #wearable
Tizen.Location.dll #mobile #mobile-emul #tv #ivi #wearable
Tizen.Location.Geofence.dll #mobile #mobile-emul
Tizen.Content.MediaContent
Tizen.Content.MimeType
Tizen.Context
-Tizen.Convergence
Tizen.Location
Tizen.Location.Geofence
Tizen.Log
}
}
+ /// <summary>
+ /// Gets the inlined image object of the image widget.
+ /// This property allows one to get the underlying EvasObject of type Image from this elementary widget. It can be useful to do things like save the image to a file, etc.
+ /// </summary>
+ /// <remarks>Be careful to not manipulate it, as it is under the control of widget.</remarks>
public EvasImage ImageObject
{
get
{
MessagePortErrorFactory.ThrowException((int)MessagePortError.InvalidOperation, "Should start listen before send");
}
- if (message == null)
+ if (message == null || message.SafeBundleHandle == null || message.SafeBundleHandle.IsInvalid)
{
MessagePortErrorFactory.ThrowException((int)MessagePortError.InvalidParameter, "message is null", "Message");
}
widgetAddResult = new Interop.Shortcut.ResultCallback(WidgetAddResultCallback);
}
- err = Interop.Shortcut.AddToWidget(shortcut.ShortcutName, shortcut.WidgetSize, shortcut.WidgetId, shortcut.IconPath, shortcut.Period, Convert.ToInt32(shortcut.IsAllowDuplicate), null, IntPtr.Zero);
+ err = Interop.Shortcut.AddToWidget(shortcut.ShortcutName, shortcut.WidgetSize, shortcut.WidgetId, shortcut.IconPath, shortcut.Period, Convert.ToInt32(shortcut.IsAllowDuplicate), widgetAddResult, IntPtr.Zero);
if (err != Interop.Shortcut.ErrorCode.None)
{
- throw ShortcutErrorFactory.GetException(err, "unable to add shortcut");
+ throw ShortcutErrorFactory.GetException(err, "unable to add widget");
}
}
catch (Exception e)
OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,
InvalidContext = -0x01100000 | 0x01,
NoSuchFile = Tizen.Internals.Errors.ErrorCode.NoSuchFile,
+ NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported,
AlreadyRunning = Tizen.Internals.Errors.ErrorCode.AlreadyInProgress
}
[DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_region_format")]
internal static extern Tizen.Internals.Errors.ErrorCode AppEventGetRegionFormat(IntPtr handle, out string region);
-
}
-}
+}
\ No newline at end of file
<ItemGroup>
<ProjectReference Include="..\Tizen.Applications.Common\Tizen.Applications.Common.csproj" />
<ProjectReference Include="..\ElmSharp\ElmSharp.csproj" />
+ <ProjectReference Include="..\Tizen.System.Information\Tizen.System.Information.csproj" />
</ItemGroup>
</Project>

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26430.12
+VisualStudioVersion = 15.0.26730.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.WatchApplication", "Tizen.Applications.WatchApplication.csproj", "{8BF860DC-DCBC-4889-938F-7515C5282D95}"
EndProject
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp", "..\ElmSharp\ElmSharp.csproj", "{66EC3D92-AD41-4906-A1A9-3C414B2107F5}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.Information", "..\Tizen.System.Information\Tizen.System.Information.csproj", "{F3138394-755D-4055-9561-999823C76BD2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
{66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F3138394-755D-4055-9561-999823C76BD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F3138394-755D-4055-9561-999823C76BD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F3138394-755D-4055-9561-999823C76BD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F3138394-755D-4055-9561-999823C76BD2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {C24ED662-71DD-4A20-8F6E-C0A16FC8DE1C}
+ EndGlobalSection
EndGlobal
/// Gets the current time
/// </summary>
/// <returns>WatchTime</returns>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to get current time because of invalid parameter.</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed to get current time because memory is not enough.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
throw new InvalidOperationException("Failed to get current time. err : " + err);
else if (err == Interop.Watch.ErrorCode.OutOfMemory)
throw new OutOfMemoryException("Failed to get current time. err : " + err);
+ else if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get current time. err : " + err);
}
return new WatchTime(handle);
}
/// Gets the type of periodic ambient tick.
/// </summary>
/// <returns>AmbientTickType</returns>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to get ambient tick type.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if(err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to get ambient tick type. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get ambient tick type. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to get ambient tick type. err : " + err);
}
return ambientTickType;
/// If SetAmbientTickType is not called, OnAmbientTick will be called every minute.
/// </summary>
/// <param name="ambientTickType">the type of ambient tick</param>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to set ambient tick type.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if(err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to set ambient tick type. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to set ambient tick type. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to set ambient tick type. err : " + err);
}
}
/// </summary>
/// <param name="ticks">Ticks the number of ticks per given resolution type</param>
/// <param name="type">Type of the resolution type</param>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to set time tick frequency.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if (err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to set time tick frequency. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to set time tick frequency. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to set time tick frequency. err : " + err);
}
}
/// </summary>
/// <param name="ticks">Ticks the number of ticks per given resolution type</param>
/// <param name="type">Type of the resolution type</param>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to get time tick frequency.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if (err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to get time tick frequency. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get time tick frequency. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to get time tick frequency. err : " + err);
}
}
}
/// <summary>
/// The information of year
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Year
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Year err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Year. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Year err : " + err);
}
return year;
}
/// <summary>
/// The information fo month
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Month
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Month err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Month. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Month err : " + err);
}
return month;
}
/// <summary>
/// The information of day
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Day
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Day err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Day. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Day err : " + err);
}
return day;
}
/// <summary>
/// The information of day of week
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int DayOfWeek
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Second err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get DayOfWeek. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get DayOfWeek err : " + err);
}
return dayOfWeek;
}
/// <summary>
/// The information of hour
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Hour
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Hour err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Hour. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Hour err : " + err);
}
return hour;
}
/// <summary>
/// The information of hour for 24 hour form
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Hour24
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Hour24 err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Hour24. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Hour24 err : " + err);
}
return hour24;
}
/// <summary>
/// The information of Minute
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Minute
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Minute err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Minute. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Minute err : " + err);
}
return minute;
}
/// <summary>
/// The information of second
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Second
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Second err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Second. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Second err : " + err);
}
return second;
}
/// <summary>
/// The information of millisecond
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Millisecond
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Second err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Millisecond. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Millisecond err : " + err);
}
return ms;
}
/// <summary>
/// The information of timezone
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public string TimeZone
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Second err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get TimeZone. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get TimeZone err : " + err);
}
return zone;
}
/// <summary>
/// The information of UTC time stamp
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public DateTime UtcTimestamp
{
get
{
long ts = 0;
-
Interop.Watch.ErrorCode err = Interop.Watch.WatchTimeGetUtcTimestamp(_handle, out ts);
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get UtcTimestamp err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get UtcTimestamp. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get UtcTimestamp err : " + err);
}
-
return (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).AddSeconds(ts).ToLocalTime();
}
}
+++ /dev/null
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal abstract class TizenSafeHandle : SafeHandle
- {
- public abstract void Destroy();
-
- public TizenSafeHandle() : base(IntPtr.Zero, true)
- {
- }
-
- public TizenSafeHandle(IntPtr handle) : base(handle, true)
- {
- }
-
- public override bool IsInvalid
- {
- get
- {
- return handle == IntPtr.Zero;
- }
- }
-
- protected override bool ReleaseHandle()
- {
- Destroy();
- SetHandle(IntPtr.Zero);
- return true;
- }
- }
-}
+++ /dev/null
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen;
-using Tizen.Convergence;
-
-internal static partial class Interop
-{
- internal static partial class Internal
- {
- internal static partial class ConvChannel
- {
- [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_create")]
- internal static extern int Create(out ConvChannelHandle /* conv_channel_h */ handle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_destroy")]
- internal static extern int Destroy(IntPtr /* conv_channel_h */ handle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_get_string")]
- internal static extern int GetString(ConvChannelHandle /* conv_channel_h */ handle, string key, out IntPtr value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_set_string")]
- internal static extern int SetString(ConvChannelHandle /* conv_channel_h */ handle, string key, string value);
- }
-
- internal class ConvChannelHandle : TizenSafeHandle
- {
- private bool _ownsHandle = true;
-
- public ConvChannelHandle(): base()
- {
-
- }
-
- public ConvChannelHandle(IntPtr handle)
- : base(handle)
- {
- }
-
- public ConvChannelHandle(IntPtr handle, bool ownsHandle)
- : base(handle)
- {
- _ownsHandle = ownsHandle;
- }
-
- public override void Destroy()
- {
- if (_ownsHandle && handle != IntPtr.Zero)
- {
- var err = ConvChannel.Destroy(this.handle);
- if (err != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to destroy conv channel handle");
- throw ErrorFactory.GetException(err);
- }
- }
- }
- }
- }
-}
+++ /dev/null
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen;
-using Tizen.Convergence;
-
-internal static partial class Interop
-{
- internal static partial class Internal
- {
- internal static partial class ConvDevice
- {
- [DllImport(Libraries.Convergence, EntryPoint = "conv_device_clone")]
- internal static extern int Clone(IntPtr /* conv_device_h */ originalHandle, out ConvDeviceHandle /* conv_device_h */ targetHandle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_device_destroy")]
- internal static extern int Destroy(IntPtr /* conv_device_h */ handle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_device_get_property_string")]
- internal static extern int GetPropertyString(ConvDeviceHandle /* conv_device_h */ handle, string key, out IntPtr value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_device_foreach_service")]
- internal static extern int ForeachService(ConvDeviceHandle /* conv_device_h */ handle, ConvServiceForeachCallback cb, IntPtr /* void */ userData);
-
- [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
- internal delegate void ConvServiceForeachCallback(IntPtr serviceHandle, IntPtr /* void */ userData);
- }
-
- internal class ConvDeviceHandle : TizenSafeHandle
- {
- public ConvDeviceHandle() : base()
- {
-
- }
-
- public ConvDeviceHandle(IntPtr handle)
- : base(handle)
- {
- }
-
- public override void Destroy()
- {
- if (handle != IntPtr.Zero)
- {
- var err = ConvDevice.Destroy(this.handle);
- if (err != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to destroy conv device handle");
- throw ErrorFactory.GetException(err);
- }
- }
- }
- }
- }
-}
+++ /dev/null
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen;
-using Tizen.Convergence;
-
-internal static partial class Interop
-{
- internal static partial class Internal
- {
- public enum ConvDiscoveryResult
- {
- /// <summary>
- /// Discovery Error
- /// </summary>
- Error = -1,
- /// <summary>
- /// Discovery Success
- /// </summary>
- Success = 0,
- /// <summary>
- /// Discovery finished
- /// </summary>
- Finished,
- /// <summary>
- /// Discovery lost
- /// </summary>
- Lost,
- }
-
- internal static partial class ConvManager
- {
- [DllImport(Libraries.Convergence, EntryPoint = "conv_create")]
- internal static extern int ConvCreate(out ConvManagerHandle /* conv_h */ handle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_destroy")]
- internal static extern int ConvDestroy(IntPtr /* conv_h */ handle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_discovery_start")]
- internal static extern int ConvDiscoveryStart(ConvManagerHandle /* conv_h */ handle, int timeoutSeconds, ConvDiscoveryCallback callback, IntPtr /* void */ userData);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_discovery_stop")]
- internal static extern int ConvDiscoveryStop(ConvManagerHandle /* conv_h */ handle);
-
- [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
- internal delegate void ConvDiscoveryCallback(IntPtr /* conv_device_h */ deviceHandle, ConvDiscoveryResult /* conv_discovery_result_e */ result, IntPtr /* void */ userData);
- }
-
- internal class ConvManagerHandle : TizenSafeHandle
- {
- public ConvManagerHandle() : base()
- {
-
- }
-
- public ConvManagerHandle(IntPtr handle)
- : base(handle)
- {
- }
-
- public override void Destroy()
- {
- var err = ConvManager.ConvDestroy(this.handle);
- if (err != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to destroy conv manager handle");
- throw ErrorFactory.GetException(err);
- }
- }
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen;
-using Tizen.Convergence;
-
-internal static partial class Interop
-{
- internal static partial class Internal
- {
- internal static partial class ConvPayload
- {
- [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_create")]
- internal static extern int Create(out ConvPayloadHandle /* conv_payload_h */ handle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_destroy")]
- internal static extern int Destroy(IntPtr /* conv_payload_h */ handle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_string")]
- internal static extern int SetString(ConvPayloadHandle /* conv_payload_h */ handle, string key, string value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_string")]
- internal static extern int GetString(ConvPayloadHandle /* conv_payload_h */ handle, string key, out IntPtr value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_byte")]
- internal static extern int SetByte(ConvPayloadHandle /* conv_payload_h */ handle, string key, int length, byte[] value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_byte")]
- internal static extern int GetByte(ConvPayloadHandle /* conv_payload_h */ handle, string key, out int length, out IntPtr value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_binary")]
- internal static extern int SetBinary(ConvPayloadHandle /* conv_payload_h */ handle, int length, byte[] value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_binary")]
- internal static extern int GetBinary(ConvPayloadHandle /* conv_payload_h */ handle, out int length, out IntPtr value);
- }
-
- internal class ConvPayloadHandle : TizenSafeHandle
- {
- private bool _ownsHandle = true;
-
- public ConvPayloadHandle(): base()
- {
-
- }
-
- public ConvPayloadHandle(IntPtr handle)
- : base(handle)
- {
- }
-
- public ConvPayloadHandle(IntPtr handle, bool ownsHandle)
- : base(handle)
- {
- _ownsHandle = ownsHandle;
- }
-
- public override void Destroy()
- {
- if (_ownsHandle && handle != IntPtr.Zero)
- {
- var err = ConvPayload.Destroy(this.handle);
- if (err != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to destroy conv payload handle");
- throw ErrorFactory.GetException(err);
- }
- }
- }
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen;
-using Tizen.Convergence;
-
-internal static partial class Interop
-{
- internal static partial class Internal
- {
- internal enum ServiceType
- {
- /// <summary>
- /// Undefined service
- /// </summary>
- None = -1,
-
- /// <summary>
- /// App-to-app communication service
- /// </summary>
- AppCommunication = 0,
-
- /// <summary>
- /// Remote app-control service
- /// </summary>
- RemoteAppControl,
- }
-
- internal static partial class ConvService
- {
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_create")]
- internal static extern int Create(out ConvServiceHandle /* conv_service_h */ handle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_clone")]
- internal static extern int Clone(IntPtr /* conv_service_h */ originalHandle, out ConvServiceHandle /* conv_service_h */ targetHandle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_destroy")]
- internal static extern int Destroy(IntPtr /* conv_service_h */ handle);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_get_property_string")]
- internal static extern int GetPropertyString(ConvServiceHandle /* conv_service_h */ handle, string key, out IntPtr value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_property_string")]
- internal static extern int SetPropertyString(ConvServiceHandle /* conv_service_h */ handle, string key, string value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_get_type")]
- internal static extern int GetType(IntPtr /* conv_service_h */ handle, out int /* conv_service_e */ value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_type")]
- internal static extern int SetType(ConvServiceHandle /* conv_service_h */ handle, int /* conv_service_e */ value);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_start")]
- internal static extern int Start(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_read")]
- internal static extern int Read(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_publish")]
- internal static extern int Publish(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_stop")]
- internal static extern int Stop(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_listener_cb")]
- internal static extern int SetListenerCb(ConvServiceHandle /* conv_service_h */ handle, ConvServiceListenerCallback callback, IntPtr /* void */ userData);
-
- [DllImport(Libraries.Convergence, EntryPoint = "conv_service_unset_listener_cb")]
- internal static extern int UnsetListenerCb(ConvServiceHandle /* conv_service_h */ handle);
-
- [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
- internal delegate void ConvServiceListenerCallback(IntPtr /* conv_service_h */ serviceHandle, IntPtr channelHandle, int error, IntPtr result, IntPtr /* void */ userData);
- }
-
- internal class ConvServiceHandle : TizenSafeHandle
- {
- public ConvServiceHandle(): base()
- {
-
- }
-
- public ConvServiceHandle(IntPtr handle)
- : base(handle)
- {
- }
-
- public override void Destroy()
- {
- if (handle != IntPtr.Zero)
- {
- var err = ConvService.Destroy(this.handle);
- if (err != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to destroy conv service handle");
- throw ErrorFactory.GetException(err);
- }
- }
- }
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class Libc
- {
- [DllImport(Libraries.Libc, EntryPoint = "free", CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Free(IntPtr ptr);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-internal static partial class Interop
-{
- /// <summary>
- /// Wrapper class for maintaining names of dependent native libraries.
- /// </summary>
- internal static partial class Libraries
- {
- public const string Convergence = "libd2d-conv-manager.so.0";
- public const string Glib = "libglib-2.0.so.0";
- public const string Libc = "libc.so.6";
- }
-}
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>netstandard2.0</TargetFramework>
- </PropertyGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\Tizen\Tizen.csproj" />
- <ProjectReference Include="..\Tizen.Log\Tizen.Log.csproj" />
- </ItemGroup>
-
-</Project>
+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26430.12
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Convergence", "Tizen.Convergence.csproj", "{2678DBBD-A00B-45EC-970B-10177D421F37}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen", "..\Tizen\Tizen.csproj", "{7E7B653C-4119-43C6-A753-7FF659836862}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Log", "..\Tizen.Log\Tizen.Log.csproj", "{0860A84B-7FAD-434F-9EEB-D59D0FEC145E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2678DBBD-A00B-45EC-970B-10177D421F37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2678DBBD-A00B-45EC-970B-10177D421F37}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2678DBBD-A00B-45EC-970B-10177D421F37}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2678DBBD-A00B-45EC-970B-10177D421F37}.Release|Any CPU.Build.0 = Release|Any CPU
- {7E7B653C-4119-43C6-A753-7FF659836862}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7E7B653C-4119-43C6-A753-7FF659836862}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7E7B653C-4119-43C6-A753-7FF659836862}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7E7B653C-4119-43C6-A753-7FF659836862}.Release|Any CPU.Build.0 = Release|Any CPU
- {0860A84B-7FAD-434F-9EEB-D59D0FEC145E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0860A84B-7FAD-434F-9EEB-D59D0FEC145E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0860A84B-7FAD-434F-9EEB-D59D0FEC145E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0860A84B-7FAD-434F-9EEB-D59D0FEC145E}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.ComponentModel;
-using Tizen.Internals.Errors;
-
-namespace Tizen.Convergence
-{
- /// <summary>
- /// The class provides APIs to support App to App communication service which relies on a remote server.
- /// The initialization and execution of a server app (the app on the side with the Remote Server, e.g. TV) and a client app (e.g. the app on the mobile or wearable device) are slightly different.
- /// On the server side an instance of the App Communication Service should be created and started by the app. Note, on the client side the service handle shouldn’t be created, but obtained during discovery.
- /// For more information, refer Tizen D2D convergence specification
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class InternalAppCommunicationService : InternalService
- {
- /// <summary>
- /// The constructor
- /// </summary>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- public InternalAppCommunicationService() :
- base(Interop.Internal.ServiceType.AppCommunication)
- {
-
- }
-
- internal InternalAppCommunicationService(IntPtr serviceHandle) :
- base(serviceHandle)
- {
-
- }
-
- /// <summary>
- /// Starts and initiates the service
- /// </summary>
- /// <param name="channel">Channel to specify a logical session for the service</param>
- /// <param name="payload">Contains additional data for start request. Refer D2D Convergence specification for more information</param>
- /// <privilege>http://tizen.org/privilege/internet</privilege>
- /// <privilege>http://tizen.org/privilege/bluetooth</privilege>
- /// <privilege>http://tizen.org/privilege/d2d.datasharing</privilege>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="InvalidOperationException">Thrown when the request is not supported as per Tizen D2D convergence specification </exception>
- /// <exception cref="ArgumentNullException">Thrown when any of the arugments are null</exception>
- /// <seealso cref="Service.ServiceEventOccurred"> The result of the request is delivered through this event</seealso>
- public void Start(InternalChannel channel, InternalPayload payload)
- {
- if (channel == null)
- {
- throw new ArgumentNullException();
- }
-
- Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle;
- int ret = Interop.Internal.ConvService.Start(_serviceHandle, channel._channelHandle, handle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Interop: Failed to start app communication service:" + ErrorFacts.GetErrorMessage(ret));
- throw ErrorFactory.GetException(ret);
- }
- }
-
- /// <summary>
- /// Reads data from the channel opened on the service
- /// </summary>
- /// <param name="channel">Channel representing a logical session on the service</param>
- /// <param name="payload">Contains additional data for start request. Refer D2D Convergence specification for more information</param>
- /// <privilege>http://tizen.org/privilege/internet</privilege>
- /// <privilege>http://tizen.org/privilege/bluetooth</privilege>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="InvalidOperationException">Thrown when the request is not supported as per Tizen D2D convergence specification </exception>
- /// <exception cref="ArgumentNullException">Thrown when any of the arugments are null</exception>
- /// <seealso cref="Service.ServiceEventOccurred"> The result of the request is delivered through this event</seealso>
- public void Read(InternalChannel channel, InternalPayload payload)
- {
- if (channel == null)
- {
- throw new ArgumentNullException();
- }
-
- Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle;
- int ret = Interop.Internal.ConvService.Read(_serviceHandle, channel._channelHandle, handle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Interop: Failed to read app communication service:" + ErrorFacts.GetErrorMessage(ret));
- throw ErrorFactory.GetException(ret);
- }
- }
-
- /// <summary>
- /// Publishes a message to the remote server application
- /// </summary>
- /// <param name="channel">Channel representing a logical session on the service</param>
- /// <param name="payload">Contains additional data for start request. Refer D2D Convergence specification for more information</param>
- /// <privilege>http://tizen.org/privilege/internet</privilege>
- /// <privilege>http://tizen.org/privilege/bluetooth</privilege>
- /// <privilege>http://tizen.org/privilege/d2d.datasharing</privilege>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="InvalidOperationException">Thrown when the request is not supported as per Tizen D2D convergence specification </exception>
- /// <exception cref="ArgumentNullException">Thrown when any of the arugments are null</exception>
- /// <seealso cref="Service.ServiceEventOccurred"> The result of the request is delivered through this event</seealso>
- public void Publish(InternalChannel channel, InternalPayload payload)
- {
- if (channel == null)
- {
- throw new ArgumentNullException();
- }
-
- Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle;
- int ret = Interop.Internal.ConvService.Publish(_serviceHandle, channel._channelHandle, handle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Interop: Failed to publish app communication service:" + ErrorFacts.GetErrorMessage(ret));
- throw ErrorFactory.GetException(ret);
- }
- }
-
- /// <summary>
- /// Stops the channel opened on the remote server application
- /// </summary>
- /// <param name="channel">Channel representing a logical session on the service</param>
- /// <param name="payload">Contains additional data for start request. Refer D2D Convergence specification for more information</param>
- /// <privilege>http://tizen.org/privilege/internet</privilege>
- /// <privilege>http://tizen.org/privilege/bluetooth</privilege>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="InvalidOperationException">Thrown when the request is not supported as per Tizen D2D convergence specification </exception>
- /// <exception cref="ArgumentNullException">Thrown when any of the arugments are null</exception>
- /// <seealso cref="Service.ServiceEventOccurred"> The result of the request is delivered through this event</seealso>
- public void Stop(InternalChannel channel, InternalPayload payload)
- {
- if (channel == null)
- {
- throw new ArgumentNullException();
- }
-
- Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle;
- int ret = Interop.Internal.ConvService.Stop(_serviceHandle, channel._channelHandle, handle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Interop: Failed to start stop communication service:" + ErrorFacts.GetErrorMessage(ret));
- throw ErrorFactory.GetException(ret);
- }
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Runtime.InteropServices;
-using System.ComponentModel;
-
-namespace Tizen.Convergence
-{
- /// <summary>
- /// The Channel class provies a logical session for communicating with AppCommunicationService.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class InternalChannel : IDisposable
- {
- internal Interop.Internal.ConvChannelHandle _channelHandle;
- internal const string ChannelUriKey = "uri";
- internal const string ChannelIdKey = "channel_id";
-
- /// <summary>
- /// The constructor
- /// </summary>
- /// <param name="uri">Uri of the server side app</param>
- /// <param name="id">Unique identifier</param>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="ArgumentNullException">Throws when the arguments passed are null</exception>
- public InternalChannel(string uri, string id)
- {
- if (uri == null || id == null)
- {
- throw new ArgumentNullException();
- }
-
- int ret = Interop.Internal.ConvChannel.Create(out _channelHandle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to create channel");
- throw ErrorFactory.GetException(ret);
- }
-
- ret = Interop.Internal.ConvChannel.SetString(_channelHandle, ChannelUriKey, uri);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to create channel");
- throw ErrorFactory.GetException(ret);
- }
-
- ret = Interop.Internal.ConvChannel.SetString(_channelHandle, ChannelIdKey, id);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to create channel");
- throw ErrorFactory.GetException(ret);
- }
-
- Uri = uri;
- Id = id;
- }
-
- internal InternalChannel(IntPtr channelHandle)
- {
- _channelHandle = new Interop.Internal.ConvChannelHandle(channelHandle, false);
-
- IntPtr stringPtr = IntPtr.Zero;
- int ret = Interop.Internal.ConvChannel.GetString(_channelHandle, ChannelUriKey, out stringPtr);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to create channel");
- throw ErrorFactory.GetException(ret);
- }
- Uri = Marshal.PtrToStringAnsi(stringPtr);
- Interop.Libc.Free(stringPtr);
-
- ret = Interop.Internal.ConvChannel.GetString(_channelHandle, ChannelIdKey, out stringPtr);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to create channel");
- throw ErrorFactory.GetException(ret);
- }
-
- Id = Marshal.PtrToStringAnsi(stringPtr);
- Interop.Libc.Free(stringPtr);
- }
-
- /// <summary>
- /// Uri of the server side app
- /// </summary>
- public string Uri { get; }
-
- /// <summary>
- /// Unique identifier
- /// </summary>
- public string Id { get; }
-
- /// <summary>
- /// The dispose method
- /// </summary>
- public void Dispose()
- {
- _channelHandle.Dispose();
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-using System.ComponentModel;
-
-namespace Tizen.Convergence
-{
- /// <summary>
- /// The class encapsulates a D2D convergence compliant device information
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class InternalDevice : IDisposable
- {
- internal const string DeviceIdKey = "device_id";
- internal const string DeviceNameKey = "device_name";
- internal const string DeviceTypeKey = "device_type";
- internal Interop.Internal.ConvDeviceHandle _deviceHandle;
- internal List<InternalService> _services = new List<InternalService>();
-
- /// <summary>
- /// The Unique ID of the device
- /// </summary>
- public string Id { get;}
-
- /// <summary>
- /// Name of the device
- /// </summary>
- public string Name { get;}
-
- /// <summary>
- /// The profile of the device
- /// </summary>
- public string Type { get; }
-
- /// <summary>
- /// List of services supported by the device
- /// </summary>
- public IEnumerable<InternalService> Services
- {
- get
- {
- return _services;
- }
- }
-
- internal InternalDevice(IntPtr deviceHandle)
- {
- int ret = Interop.Internal.ConvDevice.Clone(deviceHandle, out _deviceHandle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to clone device");
- throw ErrorFactory.GetException(ret);
- }
-
- IntPtr stringPtr = IntPtr.Zero;
- ret = Interop.Internal.ConvDevice.GetPropertyString(_deviceHandle, DeviceIdKey, out stringPtr);
- if (ret == (int)ConvErrorCode.None)
- {
- Id = Marshal.PtrToStringAnsi(stringPtr);
- Interop.Libc.Free(stringPtr);
- }
-
- ret = Interop.Internal.ConvDevice.GetPropertyString(_deviceHandle, DeviceNameKey, out stringPtr);
- if (ret == (int)ConvErrorCode.None)
- {
- Name = Marshal.PtrToStringAnsi(stringPtr);
- Interop.Libc.Free(stringPtr);
- }
-
- ret = Interop.Internal.ConvDevice.GetPropertyString(_deviceHandle, DeviceTypeKey, out stringPtr);
- if (ret != (int)ConvErrorCode.None)
- {
- Type = Marshal.PtrToStringAnsi(stringPtr);
- Interop.Libc.Free(stringPtr);
- }
-
- Log.Debug(ErrorFactory.LogTag, "Device ID ,Name, and Type:[" + Id +"," + Name +"," + Type +"]");
-
- Interop.Internal.ConvDevice.ConvServiceForeachCallback cb = (IntPtr serviceHandle, IntPtr userData) =>
- {
- _services.Add(InternalService.GetService(serviceHandle));
- };
-
- ret = Interop.Internal.ConvDevice.ForeachService(_deviceHandle, cb, IntPtr.Zero);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to get device services");
- throw ErrorFactory.GetException(ret);
- }
- }
-
- /// <summary>
- /// The dispose method
- /// </summary>
- public void Dispose()
- {
- _deviceHandle.Dispose();
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using Tizen;
-using System.Threading;
-using System.Threading.Tasks;
-using System.ComponentModel;
-
-namespace Tizen.Convergence
-{
- /// <summary>
- /// DeviceFinder provides API to find all nearby Tizen D2D convergence compliant devices
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class InternalDeviceFinder : IDisposable
- {
- internal Interop.Internal.ConvManagerHandle _convManagerHandle;
-
- /// <summary>
- /// The constructor
- /// </summary>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- public InternalDeviceFinder()
- {
- int ret = Interop.Internal.ConvManager.ConvCreate(out _convManagerHandle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to create conv manager handle");
- throw ErrorFactory.GetException(ret);
- }
-
- }
-
- /// <summary>
- /// DeviceFound event is triggered when a device is found during discovery procedure
- /// </summary>
- public event EventHandler<InternalDeviceFoundEventArgs> DeviceFound;
-
- /// <summary>
- /// Starts the discovery of nearby devices
- /// </summary>
- /// <param name="timeOut">Seconds for discovery timeout. 0 will use default timeout value</param>
- /// <param name="cancellationToken">Cancellation token required to cancel the current discovery</param>
- /// <privilege>http://tizen.org/privilege/internet</privilege>
- /// <privilege>http://tizen.org/privilege/bluetooth</privilege>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="InvalidOperationException">Thrown when the request is not supported as per Tizen D2D convergence specification </exception>
- /// <seealso cref="DeviceFound"> Devices found are delivered through this event</seealso>
- /// <returns>Task with discovery result</returns>
- public async Task StartFindingAsync(int timeOut, CancellationToken cancellationToken = default(CancellationToken))
- {
- var task = new TaskCompletionSource<bool>();
- Interop.Internal.ConvManager.ConvDiscoveryCallback discoveredCb = (IntPtr deviceHandle, Interop.Internal.ConvDiscoveryResult result, IntPtr userData) =>
- {
- Log.Debug(ErrorFactory.LogTag, "discovery callback called with result:[" + result + "]");
- switch (result)
- {
- case Interop.Internal.ConvDiscoveryResult.Success:
- {
- InternalDevice device = new InternalDevice(deviceHandle);
- InternalDeviceFoundEventArgs deviceFoundEventArgs = new InternalDeviceFoundEventArgs()
- {
- Device = device
- };
- DeviceFound?.Invoke(this, deviceFoundEventArgs);
- break;
- }
- case Interop.Internal.ConvDiscoveryResult.Error:
- {
- task.TrySetException(new InvalidOperationException("Discovery error occured"));
- break;
- }
- case Interop.Internal.ConvDiscoveryResult.Lost:
- {
- task.TrySetException(new InvalidOperationException("Discovery Lost"));
- break;
- }
- case Interop.Internal.ConvDiscoveryResult.Finished:
- {
- Log.Debug(ErrorFactory.LogTag, "discovery process finished");
- task.TrySetResult(true);
- break;
- }
- }
- };
- int ret = Interop.Internal.ConvManager.ConvDiscoveryStart(_convManagerHandle, timeOut, discoveredCb, IntPtr.Zero);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to start finding devices");
- throw ErrorFactory.GetException(ret);
- }
-
- if (cancellationToken != CancellationToken.None)
- {
- cancellationToken.Register(() =>
- {
- int error = Interop.Internal.ConvManager.ConvDiscoveryStop(_convManagerHandle);
- if (error != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to stop finding devices" + Internals.Errors.ErrorFacts.GetErrorMessage(error));
- throw ErrorFactory.GetException(error);
- }
- task.TrySetCanceled();
- });
- }
- await task.Task;
- }
-
- /// <summary>
- /// The dispose method
- /// </summary>
- public void Dispose()
- {
- _convManagerHandle.Dispose();
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.ComponentModel;
-
-namespace Tizen.Convergence
-{
- /// <summary>
- /// Contains arguments for the event DeviceFound.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class InternalDeviceFoundEventArgs : EventArgs
- {
- internal InternalDeviceFoundEventArgs() { }
-
- /// <summary>
- /// The device found
- /// </summary>
- public InternalDevice Device { get; internal set; }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using Tizen.Internals.Errors;
-using System.Threading.Tasks;
-using System.Threading;
-
-namespace Tizen.Convergence
-{
- internal enum ConvErrorCode
- {
- None = ErrorCode.None,
- OutOfMemory = ErrorCode.OutOfMemory,
- InvalidParameter = ErrorCode.InvalidParameter,
- InvalidOperation = ErrorCode.InvalidOperation,
- NoData = ErrorCode.NoData,
- NotSupported = ErrorCode.NotSupported,
- PermissionDenied = ErrorCode.PermissionDenied,
- }
-
- internal class ErrorFactory
- {
- internal static string LogTag = "Tizen.Convergence";
-
- internal static Exception GetException(int error)
- {
- if ((ConvErrorCode)error == ConvErrorCode.OutOfMemory)
- {
- return new OutOfMemoryException("Out of memory");
- }
- else if ((ConvErrorCode)error == ConvErrorCode.InvalidParameter)
- {
- return new ArgumentException("Invalid parameter");
- }
- else if ((ConvErrorCode)error == ConvErrorCode.InvalidOperation)
- {
- return new InvalidOperationException("Invalid operation");
- }
- else if ((ConvErrorCode)error == ConvErrorCode.NotSupported)
- {
- return new NotSupportedException("Unsupported feature http://tizen.org/feature/convergence.d2d");
- }
- else if ((ConvErrorCode)error == ConvErrorCode.PermissionDenied)
- {
- return new UnauthorizedAccessException("Permission denied. (http://tizen.org/privilege/internet, http://tizen.org/privilege/bluetooth, http://tizen.org/privilege/d2d.datasharing)");
- }
- else if ((ConvErrorCode)error == ConvErrorCode.NoData)
- {
- return new InvalidOperationException("The payload is empty");
- }
- else
- {
- return new Exception("Unknown error");
- }
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Runtime.InteropServices;
-using System.ComponentModel;
-
-namespace Tizen.Convergence
-{
- /// <summary>
- /// Represents a payload used in Tizen D2D convergence
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class InternalPayload : IDisposable
- {
- internal Interop.Internal.ConvPayloadHandle _payloadHandle;
-
- /// <summary>
- /// The constructor
- /// </summary>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- public InternalPayload()
- {
- int ret = Interop.Internal.ConvPayload.Create(out _payloadHandle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to create payload");
- throw ErrorFactory.GetException(ret);
- }
- }
-
- internal InternalPayload(IntPtr payloadHandle)
- {
- _payloadHandle = new Interop.Internal.ConvPayloadHandle(payloadHandle, false);
- }
-
- /// <summary>
- /// Adds a key-value pair to payload
- /// </summary>
- /// <param name="key">The key of the attribute</param>
- /// <param name="value">The value of the attribute</param>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="ArgumentNullException">Thrown if the arguments passed are null </exception>
- public void Set(string key, string value)
- {
- if(key == null || value == null)
- {
- throw new ArgumentNullException();
- }
-
- int ret = 0;
- if (value is string)
- {
- ret = Interop.Internal.ConvPayload.SetString(_payloadHandle, key, value);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to add string to payload");
- throw ErrorFactory.GetException(ret);
- }
- }
- }
-
- /// <summary>
- /// Adds a key-value pair to payload
- /// </summary>
- /// <param name="key">The key of the attribute</param>
- /// <param name="value">The value of the attribute</param>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="ArgumentNullException">Thrown if the arguments passed are null </exception>
- public void Set(string key, byte[] value)
- {
- if (key == null || value == null)
- {
- throw new ArgumentNullException();
- }
-
- int ret = 0;
- ret = Interop.Internal.ConvPayload.SetByte(_payloadHandle, key, value.Length, value);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to add string to payload");
- throw ErrorFactory.GetException(ret);
- }
- }
-
-
- /// <summary>
- /// Sets binary to payload.
- /// </summary>
- /// <param name="value">The binary to set</param>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="ArgumentNullException">Thrown if the arguments passed are null </exception>
- public void Set(byte[] value)
- {
- if (value == null)
- {
- throw new ArgumentNullException();
- }
-
- int ret = 0;
- ret = Interop.Internal.ConvPayload.SetBinary(_payloadHandle, value.Length, value);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to add binary to payload");
- throw ErrorFactory.GetException(ret);
- }
- }
-
- /// <summary>
- /// Gets the value of the key from payload
- /// </summary>
- /// <param name="key">The key of the attribute</param>
- /// <param name="value">The value of the attribute</param>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="ArgumentNullException">Thrown if the arguments passed are null </exception>
- /// <exception cref="ArgumentException">Thrown if the key is not found </exception>
- public void Get(string key, out string value)
- {
- if (key == null)
- {
- throw new ArgumentNullException();
- }
-
- IntPtr stringPtr = IntPtr.Zero;
- int ret = 0;
- ret = Interop.Internal.ConvPayload.GetString(_payloadHandle, key, out stringPtr);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to add string to payload");
- throw ErrorFactory.GetException(ret);
- }
-
- value = Marshal.PtrToStringAnsi(stringPtr);
- Interop.Libc.Free(stringPtr);
- }
-
- /// <summary>
- /// Gets the value of the key from payload
- /// </summary>
- /// <param name="key">The key of the attribute</param>
- /// <param name="value">The value of the attribute</param>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- /// <exception cref="ArgumentNullException">Thrown if the arguments passed are null </exception>
- /// <exception cref="ArgumentException">Thrown if the key is not found </exception>
- public void Get(string key, out byte[] value)
- {
- if (key == null)
- {
- throw new ArgumentNullException();
- }
-
- int ret = 0;
- IntPtr byteArrayPtr;
- int byteArraySize;
- ret = Interop.Internal.ConvPayload.GetByte(_payloadHandle, key, out byteArraySize, out byteArrayPtr);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to add string to payload");
- throw ErrorFactory.GetException(ret);
- }
-
- byte[] byteArray = new byte[byteArraySize];
- Marshal.Copy(byteArrayPtr, byteArray, 0, byteArraySize);
- value = byteArray;
- Interop.Libc.Free(byteArrayPtr);
- }
-
- /// <summary>
- /// Gets binary from payload
- /// </summary>
- /// <param name="value">The result value</param>
- /// <feature>http://tizen.org/feature/convergence.d2d</feature>
- /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
- public void Get(out byte[] value)
- {
- int ret = 0;
- IntPtr byteArrayPtr;
- int byteArraySize;
- ret = Interop.Internal.ConvPayload.GetBinary(_payloadHandle, out byteArraySize, out byteArrayPtr);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to get binary from payload");
- throw ErrorFactory.GetException(ret);
- }
-
- byte[] byteArray = new byte[byteArraySize];
- Marshal.Copy(byteArrayPtr, byteArray, 0, byteArraySize);
- value = byteArray;
- Interop.Libc.Free(byteArrayPtr);
- }
-
- /// <summary>
- /// The dispose method
- /// </summary>
- public void Dispose()
- {
- _payloadHandle.Dispose();
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Runtime.InteropServices;
-using System.ComponentModel;
-
-namespace Tizen.Convergence
-{
- /// <summary>
- /// The class abstracts the features provided by Tizen D2D Convergence.
- /// </summary>
- /// <seealso cref="AppCommunicationService"/>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public abstract class InternalService : IDisposable
- {
- internal Interop.Internal.ConvServiceHandle _serviceHandle;
- internal const string ServiceIdKey = "service_id";
- internal const string ServiceVersionKey = "service_version";
-
- private event EventHandler<InternalServiceEventOccuredEventArgs> _serviceEventOccured;
-
- internal InternalService(Interop.Internal.ServiceType type)
- {
- int ret = Interop.Internal.ConvService.Create(out _serviceHandle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to create service handle");
- throw ErrorFactory.GetException(ret);
- }
-
- ret = Interop.Internal.ConvService.SetType(_serviceHandle, (int)type);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to create service handle");
- throw ErrorFactory.GetException(ret);
- }
- }
-
- internal InternalService(IntPtr existingServiceHandle)
- {
- int ret = Interop.Internal.ConvService.Clone(existingServiceHandle, out _serviceHandle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to clone device");
- throw ErrorFactory.GetException(ret);
- }
-
- IntPtr stringPtr = IntPtr.Zero;
- ret = Interop.Internal.ConvService.GetPropertyString(_serviceHandle, ServiceIdKey, out stringPtr);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to get service Id");
- throw ErrorFactory.GetException(ret);
- }
-
- Id = Marshal.PtrToStringAnsi(stringPtr);
- Interop.Libc.Free(stringPtr);
-
- ret = Interop.Internal.ConvService.GetPropertyString(_serviceHandle, ServiceVersionKey, out stringPtr);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to get service version");
- throw ErrorFactory.GetException(ret);
- }
-
- Version = Marshal.PtrToStringAnsi(stringPtr);
- Interop.Libc.Free(stringPtr);
- }
-
- /// <summary>
- /// The ID of the service
- /// </summary>
- public string Id { get; }
-
- /// <summary>
- /// The Version of the service
- /// </summary>
- public string Version { get; }
-
- /// <summary>
- /// The event handler for Service Events(Start/Publish/Read/Stop)
- /// </summary>
- public event EventHandler<InternalServiceEventOccuredEventArgs> ServiceEventOccurred
- {
- add
- {
- if (_serviceEventOccured == null)
- {
- RegisterServiceEventListener();
- }
- _serviceEventOccured += value;
- }
- remove
- {
- _serviceEventOccured -= value;
- if (_serviceEventOccured == null)
- {
- UnregisterServiceEventListener();
- }
- }
- }
-
- /// <summary>
- /// The event handler for service error events
- /// </summary>
- public event EventHandler<InternalServiceErrorOccuredEventArgs> ServiceErrorOccured;
-
- /// <summary>
- /// The dispose method
- /// </summary>
- public void Dispose()
- {
- _serviceHandle.Dispose();
- }
-
- internal static InternalService GetService(IntPtr serviceHandle)
- {
- InternalService service = null;
- int serviceType;
- int ret = Interop.Internal.ConvService.GetType(serviceHandle, out serviceType);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to get service version");
- throw ErrorFactory.GetException(ret);
- }
- if (serviceType == (int)Interop.Internal.ServiceType.AppCommunication)
- {
- service = new InternalAppCommunicationService(serviceHandle);
- }
-
- return service;
- }
-
- private void RegisterServiceEventListener()
- {
- int ret = Interop.Internal.ConvService.SetListenerCb(_serviceHandle, serviceEventsCb, IntPtr.Zero);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to set listener for service events");
- throw ErrorFactory.GetException(ret);
- }
- }
-
- private void UnregisterServiceEventListener()
- {
- int ret = Interop.Internal.ConvService.UnsetListenerCb(_serviceHandle);
- if (ret != (int)ConvErrorCode.None)
- {
- Log.Error(ErrorFactory.LogTag, "Failed to unset listener for service events");
- throw ErrorFactory.GetException(ret);
- }
- }
-
- private void serviceEventsCb(IntPtr serviceHandle, IntPtr channelHandle, int error, IntPtr resultPayloadHandle, IntPtr userData)
- {
- Log.Debug(ErrorFactory.LogTag, "service event occured. error code :[" + error + "]");
-
- if (error == (int)ConvErrorCode.None)
- {
- var channel = (channelHandle == IntPtr.Zero) ? null : new InternalChannel(channelHandle);
- var payload = (resultPayloadHandle == IntPtr.Zero) ? null : new InternalPayload(resultPayloadHandle);
- _serviceEventOccured?.Invoke(this, new InternalServiceEventOccuredEventArgs()
- {
- Payload = payload,
- Channel = channel
- });
- }
- else
- {
- var eventArgs = new InternalServiceErrorOccuredEventArgs()
- {
- Exception = ErrorFactory.GetException(error)
- };
- ServiceErrorOccured?.Invoke(this, eventArgs);
- }
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.ComponentModel;
-
-namespace Tizen.Convergence
-{
- /// <summary>
- /// Contains arguments for the event ServiceErrorOccured.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class InternalServiceErrorOccuredEventArgs : EventArgs
- {
- internal InternalServiceErrorOccuredEventArgs() { }
-
- /// <summary>
- /// The exception
- /// </summary>
- public Exception Exception { get; internal set; }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.ComponentModel;
-
-namespace Tizen.Convergence
-{
- /// <summary>
- /// Contains arguments for ServiceEventOccured
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class InternalServiceEventOccuredEventArgs : EventArgs
- {
- internal InternalServiceEventOccuredEventArgs() { }
-
- /// <summary>
- /// The channel on which the event occured
- /// </summary>
- public InternalChannel Channel { get; internal set; }
-
- /// <summary>
- /// The payload containing the result
- /// </summary>
- public InternalPayload Payload { get; internal set; }
- }
-}
/// <remarks>
/// The Tizen.PhonenumberUtils namespace provides a class for parsing, formatting and normalizing phone numbers.
/// </remarks>
+/// <since_tizen> 4 </since_tizen>
namespace Tizen.PhonenumberUtils {}
/// <summary>
/// The PhonenumberUtils class provides methods for parsing, formatting and normalizing phone numbers.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class PhonenumberUtils : IDisposable
{
private bool disposed = false;
+ /// <summary>
+ /// Creates a PhonenumberUtils.
+ /// </summary>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
+ /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public PhonenumberUtils()
{
int ret;
/// Releases all resources used by the PhonenumberUtils.
/// It should be called after finished using of the object.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public void Dispose()
{
Dispose(true);
/// <param name="region">The region of number</param>
/// <param name="language">The language of location</param>
/// <returns>The location string</returns>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when phonenumber-utils is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when input coordinates are invalid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
public string GetLocationFromNumber(string number, Region region, Language language)
{
int ret;
/// <param name="number">The number</param>
/// <param name="region">The region of number</param>
/// <returns>The formatted number string</returns>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when phonenumber-utils is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when input coordinates are invalid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
public string GetFormattedNumber(string number, Region region)
{
int ret;
/// <privilege>http://tizen.org/privilege/telephony</privilege>
/// <feature>http://tizen.org/feature/network.telephony</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when phonenumber-utils is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when input coordinates are invalid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
/// Normalized number starts with plus('+') and country code, and excludes the separators such as dash or space.
/// It is a format of E.164 standard including the country code based on current network.
/// </remarks>
+ /// <since_tizen> 4 </since_tizen>
public string GetNormalizedNumber(string number)
{
int ret;
/// <summary>
/// Enumeration for language type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum Language
{
/// <summary>
/// <summary>
/// Current System Value
/// </summary>
- System,
- Max
+ System
}
/// <summary>
/// Enumeration for region type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum Region
{
/// <summary>
/// <summary>
/// Current System Value
/// </summary>
- System,
- Max
+ System
}
}
/// <remarks>
/// This class allows user to access/create/update db operations for contacts information.
/// </remarks>
+ /// <since_tizen> 4 </since_tizen>
public class ContactsDatabase
{
private Object thisLock = new Object();
/// <summary>
/// Enumeration for contacts database status.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum DBStatus
{
/// <summary>
/// <summary>
/// Enumeration for Contacts search range.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
[Flags]
public enum SearchRanges
{
/// <summary>
/// Occurs when contacts database status is changed.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public event EventHandler<DBStatusChangedEventArgs> DBStatusChanged
{
add
/// The current contacts database version.
/// </summary>
/// <value>The current contacts database version.</value>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public int Version
{
/// The last successful changed contacts database version on the current connection.
/// </summary>
/// <value>The last successful changed contacts database version on the current connection.</value>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public int LastChangeVersion
{
/// The contacts database status.
/// </summary>
/// <value>The contacts database status.</value>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public DBStatus Status
{
/// <returns>The ID of inserted record</returns>
/// <privilege>http://tizen.org/privilege/contact.write</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public int Insert(ContactsRecord record)
{
/// <returns>The inserted record ID array</returns>
/// <privilege>http://tizen.org/privilege/contact.write</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public int[] Insert(ContactsList list)
{
/// <returns>The record associated with the record ID</returns>
/// <privilege>http://tizen.org/privilege/contact.read</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsRecord Get(string viewUri, int recordId)
/// <param name="record">The record to update</param>
/// <privilege>http://tizen.org/privilege/contact.write</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public void Update(ContactsRecord record)
{
/// <param name="list">The record list</param>
/// <privilege>http://tizen.org/privilege/contact.write</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public void Update(ContactsList list)
{
/// <param name="recordId">The record ID to delete</param>
/// <privilege>http://tizen.org/privilege/contact.write</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public void Delete(string viewUri, int recordId)
/// <param name="idArray">The record IDs to delete</param>
/// <privilege>http://tizen.org/privilege/contact.write</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public void Delete(string viewUri, int[] idArray)
/// <param name="recordId">the record ID to be replaced</param>
/// <privilege>http://tizen.org/privilege/contact.write</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public void Replace(ContactsRecord record, int recordId)
{
/// <param name="idArray">The record IDs to be replaced</param>
/// <privilege>http://tizen.org/privilege/contact.write</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public void Replace(ContactsList list, int[] idArray)
{
/// </returns>
/// <privilege>http://tizen.org/privilege/contact.read</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsList GetAll(string viewUri, int offset, int limit)
/// </returns>
/// <privilege>http://tizen.org/privilege/contact.read</privilege>
/// <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public ContactsList GetRecordsWithQuery(ContactsQuery query, int offset, int limit)
{
/// The record list
/// </returns>
/// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsList GetChangesByVersion(string viewUri, int addressBookId, int contactsDBVersion, out int currentDBVersion)
/// <param name="limit">The number to limit results(value 0 is used for get all records)</param>
/// <returns>The record list</returns>
/// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsList Search(string viewUri, string keyword, int offset, int limit)
/// <param name="offset">The index from which to get results</param>
/// <param name="limit">The number to limit results(value 0 used for get all records)</param>
/// <returns>The record list</returns>
+ /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public ContactsList Search(ContactsQuery query, string keyword, int offset, int limit)
{
/// <param name="limit">The number to limit results(value 0 is used for get all records)</param>
/// <param name="range">The search range, it should be a element of SearchRange or bitwise OR operation of them</param>
/// <returns>The record list</returns>
+ /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsList Search(string viewUri, string keyword, int offset, int limit, int range)
/// <param name="endMatch">The text which is inserted into the fragment after the keyword(If NULL, default is "]")</param>
/// <param name="tokenNumber">The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home")</param>
/// <returns>The record list</returns>
+ /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsList Search(string viewUri, string keyword, int offset, int limit, string startMatch, string endMatch, int tokenNumber)
/// <param name="endMatch">The text which is inserted into the fragment after the keyword(If NULL, default is "]")</param>
/// <param name="tokenNumber">The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home")</param>
/// <returns>The record list</returns>
+ /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public ContactsList Search(ContactsQuery query, string keyword, int offset, int limit, string startMatch, string endMatch, int tokenNumber)
{
/// <param name="endMatch">The text which is inserted into the fragment after the keyword(If NULL, default is "]")</param>
/// <param name="tokenNumber">The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home")</param>
/// <returns>The record list</returns>
+ /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsList Search(string viewUri, string keyword, int offset, int limit, int range, string startMatch, string endMatch, int tokenNumber)
/// </summary>
/// <param name="viewUri">The view URI</param>
/// <returns>The count of records</returns>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public int GetCount(string viewUri)
/// </summary>
/// <param name="query">The query used for filtering the results</param>
/// <returns>The count of records</returns>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public int GetCount(ContactsQuery query)
{
/// </summary>
/// <param name="viewUri">The view URI of records whose changes are monitored</param>
/// <param name="DBChanged">The EventHandler to register</param>
+ /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public void AddDBChangedEventHandler(string viewUri, EventHandler<DBChangedEventArgs> DBChanged)
{
}
EventHandler<DBChangedEventArgs> handler = null;
- if (!_eventHandlerMap.TryGetValue(viewUri, out handler))
+ if (!_eventHandlerMap.TryGetValue(viewUri, out handler))
_eventHandlerMap.Add(viewUri, null);
_eventHandlerMap[viewUri] = handler + DBChanged;
/// </summary>
/// <param name="viewUri">The view URI of records whose changes are monitored</param>
/// <param name="DBChanged">The EventHandler to deregister</param>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public void RemoveDBChangedEventHandler(string viewUri, EventHandler<DBChangedEventArgs> DBChanged)
{
/// <summary>
/// A filter includes the conditions for the search
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class ContactsFilter:IDisposable
{
internal IntPtr _filterHandle;
/// <param name="propertyId">The property ID to add a condition</param>
/// <param name="matchType">The match flag</param>
/// <param name="matchValue">The match value</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsFilter(string viewUri, uint propertyId, StringMatchType matchType, string matchValue)
{
/// <param name="propertyId">The property ID to add a condition</param>
/// <param name="matchType">The match flag</param>
/// <param name="matchValue">The match value</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, int matchValue)
{
/// <param name="propertyId">The property ID to add a condition</param>
/// <param name="matchType">The match flag</param>
/// <param name="matchValue">The match value</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, long matchValue)
{
/// <param name="propertyId">The property ID to add a condition</param>
/// <param name="matchType">The match flag</param>
/// <param name="matchValue">The match value</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, double matchValue)
{
/// <param name="viewUri">The view URI of a filter</param>
/// <param name="propertyId">The property ID to add a condition</param>
/// <param name="matchValue">The match value</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsFilter(string viewUri, uint propertyId, bool matchValue)
{
/// <summary>
/// Destructor
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
~ContactsFilter()
{
Dispose(false);
/// <summary>
/// Enumeration for the filter match type of a string.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum StringMatchType
{
/// <summary>
/// <summary>
/// Enumeration for the filter match type of an integer.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum IntegerMatchType
{
/// <summary>
/// <summary>
/// Enumeration for a filter operator.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum LogicalOperator
{
/// <summary>
/// Releases all resources used by the ContactsFilter.
/// </summary>
/// <param name="disposing">Disposing by User</param>
+ /// <since_tizen> 4 </since_tizen>
protected virtual void Dispose(bool disposing)
{
if (disposing)
/// Releases all resources used by the ContactsFilter.
/// It should be called after finished using of the object.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public void Dispose()
{
Dispose(true);
/// <param name="propertyId">The property ID to add a condition</param>
/// <param name="matchType">The match flag</param>
/// <param name="matchValue">The match value</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void AddCondition(LogicalOperator logicalOperator, uint propertyId, StringMatchType matchType, string matchValue)
{
int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
/// <param name="propertyId">The property ID to add a condition</param>
/// <param name="matchType">The match flag</param>
/// <param name="matchValue">The match value</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, int matchValue)
{
int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
/// <param name="propertyId">The property ID to add a condition</param>
/// <param name="matchType">The match flag</param>
/// <param name="matchValue">The match value</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, long matchValue)
{
int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
/// <param name="propertyId">The property ID to add a condition</param>
/// <param name="matchType">The match flag</param>
/// <param name="matchValue">The match value</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, double matchValue)
{
int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
/// <param name="logicalOperator">The operator type</param>
/// <param name="propertyId">The property ID to add a condition</param>
/// <param name="matchValue">The match value</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void AddCondition(LogicalOperator logicalOperator, uint propertyId, bool matchValue)
{
int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
/// </summary>
/// <param name="logicalOperator">The operator type</param>
/// <param name="filter">The child filter</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void AddFilter(LogicalOperator logicalOperator, ContactsFilter filter)
{
int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
/// <summary>
/// A list of records with the same type
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class ContactsList:IDisposable
{
private Int64 _memoryPressure = 20;
/// <summary>
/// Creates a contacts record list.
/// </summary>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
public ContactsList()
{
int error = Interop.List.ContactsListCreate(out _listHandle);
/// <summary>
/// Destructor
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
~ContactsList()
{
Dispose(false);
/// The count of contact entity.
/// </summary>
/// <value>The count of contact entity.</value>
+ /// <since_tizen> 4 </since_tizen>
public int Count
{
get
/// Releases all resources used by the ContactsList.
/// </summary>
/// <param name="disposing">Disposing by User</param>
+ /// <since_tizen> 4 </since_tizen>
protected virtual void Dispose(bool disposing)
{
if (disposing)
/// Releases all resources used by the ContactsList.
/// It should be called after finished using of the object.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public void Dispose()
{
Dispose(true);
/// Adds a record to the contacts list.
/// </summary>
/// <param name="record">The record to add</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void AddRecord(ContactsRecord record)
{
int error = Interop.List.ContactsListAdd(_listHandle, record._recordHandle);
/// Removes a record from the contacts list.
/// </summary>
/// <param name="record">The record to remove</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void RemoveRecord(ContactsRecord record)
{
int error = Interop.List.ContactsListRemove(_listHandle, record._recordHandle);
/// <returns>
/// contacts record
/// </returns>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public ContactsRecord GetCurrentRecord()
{
IntPtr handle;
/// <returns>
/// When the cursor is already at the first position, it returns false.
/// </returns>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public bool MovePrevious()
{
int error = Interop.List.ContactsListPrev(_listHandle);
/// <returns>
/// When the cursor is already at the last position, it returns false.
/// </returns>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public bool MoveNext()
{
int error = Interop.List.ContactsListNext(_listHandle);
/// <summary>
/// Moves a contacts list to the first position.
/// </summary>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public void MoveFirst()
{
int error = Interop.List.ContactsListFirst(_listHandle);
/// <summary>
/// Moves a contacts list to the last position.
/// </summary>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public void MoveLast()
{
int error = Interop.List.ContactsListLast(_listHandle);
/// <summary>
/// Enumeration for name display order.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum ContactDisplayOrder
{
/// <summary>
/// <summary>
/// Enumeration for name sorting order.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum ContactSortingOrder
{
/// <summary>
/// <summary>
/// A class for managing contact information. It allows applications to access contacts database.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class ContactsManager : IDisposable
{
private ContactsDatabase _db = null;
/// <summary>
/// Creates a ContactsManager.
/// </summary>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public ContactsManager()
{
int error = Interop.Service.Connect();
/// <summary>
/// Destructor
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
~ContactsManager()
{
Dispose(false);
/// Releases all resources used by the ContactsManager.
/// </summary>
/// <param name="disposing">Disposing by User</param>
+ /// <since_tizen> 4 </since_tizen>
protected virtual void Dispose(bool disposing)
{
if (disposing)
/// Releases all resources used by the ContactsManager.
/// It should be called after finished using of the object.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public void Dispose()
{
Dispose(true);
/// (event) NameDisplayOrderChanged is raised when changing setting value of contacts name display order
/// </summary>
/// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <since_tizen> 4 </since_tizen>
public event EventHandler<NameDisplayOrderChangedEventArgs> NameDisplayOrderChanged
{
add
/// (event) NameSortingOrderChanged is raised when changing setting value of contacts name sorting order
/// </summary>
/// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <since_tizen> 4 </since_tizen>
public event EventHandler<NameSortingOrderChangedEventArgs> NameSortingOrderChanged
{
add
/// A ContactsDatabase
/// </summary>
/// <value>A ContactsDatabase</value>
+ /// <since_tizen> 4 </since_tizen>
public ContactsDatabase Database
{
get
/// </remarks>
/// <privilege>http://tizen.org/privilege/contact.read</privilege>
/// <privilege>http://tizen.org/privilege/contact.write</privilege>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public ContactDisplayOrder NameDisplayOrder
{
/// </remarks>
/// <privilege>http://tizen.org/privilege/contact.read</privilege>
/// <privilege>http://tizen.org/privilege/contact.write</privilege>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public ContactSortingOrder NameSortingOrder
{
/// A query is used to retrieve person, group, speed dial, and log data which satisfies a given criteria, such as an integer property being greater than a given value, or a string property containing a given substring.
/// A query needs a filter which can set the conditions for the search.
/// </remarks>
+ /// <since_tizen> 4 </since_tizen>
public class ContactsQuery : IDisposable
{
internal IntPtr _queryHandle;
/// Creates a query.
/// </summary>
/// <param name="viewUri">The view URI of a query</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsQuery(string viewUri)
{
/// <summary>
/// Destructor
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
~ContactsQuery()
{
Dispose(false);
/// Releases all resources used by the ContactsQuery.
/// </summary>
/// <param name="disposing">Disposing by User</param>
+ /// <since_tizen> 4 </since_tizen>
protected virtual void Dispose(bool disposing)
{
if (disposing)
/// Releases all resources used by the ContactsQuery.
/// It should be called after finished using of the object.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public void Dispose()
{
Dispose(true);
/// Adds property IDs for projection.
/// </summary>
/// <param name="propertyIdArray">The property ID array </param>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void SetProjection(uint[] propertyIdArray)
{
if (propertyIdArray == null)
/// Sets the "distinct" option for projection.
/// </summary>
/// <param name="set">If true it is set, otherwise if false it is unset</param>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public void SetDistinct(bool set)
{
int error = Interop.Query.ContactsQuerySetDistinct(_queryHandle, set);
/// Sets the filter for a query.
/// </summary>
/// <param name="filter">The filter</param>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void SetFilter(ContactsFilter filter)
{
int error = Interop.Query.ContactsQuerySetFilter(_queryHandle, filter._filterHandle);
/// </summary>
/// <param name="propertyId">The property ID to sort</param>
/// <param name="isAscending">If true it sorts in the ascending order, otherwise if false it sorts in the descending order</param>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void SetSort(uint propertyId, bool isAscending)
{
int error = Interop.Query.ContactsQuerySetSort(_queryHandle, propertyId, isAscending);
/// A record can be a complex set of data, containing other data. For example, a contact record contains the address property, which is a reference to an address record.
/// An address record belongs to a contact record, and its ContactId property is set to the identifier of the corresponding contact. In this case, the address is the child record of the contact and the contact is the parent record.
/// </remarks>
+ /// <since_tizen> 4 </since_tizen>
public class ContactsRecord : IDisposable
{
private string _uri = null;
/// Creates a record.
/// </summary>
/// <param name="viewUri">The view URI</param>
- /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
public ContactsRecord(string viewUri)
{
/// <summary>
/// Destructor
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
~ContactsRecord()
{
Dispose(false);
/// The URI of the record
/// </summary>
/// <value>The URI of the record</value>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")]
public string Uri
{
/// Releases all resources used by the ContactsRecord.
/// </summary>
/// <param name="disposing">Disposing by User</param>
+ /// <since_tizen> 4 </since_tizen>
protected virtual void Dispose(bool disposing)
{
if (disposing)
/// Releases all resources used by the ContactsRecord.
/// It should be called after finished using of the object.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public void Dispose()
{
Dispose(true);
/// Makes a clone of a record.
/// </summary>
/// <returns>A cloned record</returns>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <since_tizen> 4 </since_tizen>
public ContactsRecord Clone()
{
IntPtr _clonedRecordHandle;
/// <returns>
/// The value of the property corresponding to property id.
/// </returns>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public T Get<T>(uint propertyId)
{
object parsedValue = null;
/// <summary>
/// Sets a value of the property to a record.
/// </summary>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <param name="propertyId">The property ID</param>
/// <param name="value">The value to set</param>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void Set<T>(uint propertyId, T value)
{
if (typeof(T) == typeof(string))
/// </summary>
/// <param name="propertyId">The property ID</param>
/// <param name="childRecord">The child record to add to parent record</param>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void AddChildRecord(uint propertyId, ContactsRecord childRecord)
{
int error = Interop.Record.AddChildRecord(_recordHandle, propertyId, childRecord._recordHandle);
/// </summary>
/// <param name="propertyId">The property ID</param>
/// <param name="childRecord">The child record to remove from parent record</param>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public void RemoveChildRecord(uint propertyId, ContactsRecord childRecord)
{
int error = Interop.Record.RemoveChildRecord(_recordHandle, propertyId, childRecord._recordHandle);
/// </summary>
/// <param name="propertyId">The property ID</param>
/// <returns>The number of child records corresponding to property ID</returns>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public int GetChildRecordCount(uint propertyId)
{
int count = 0;
/// <param name="propertyId">The property ID</param>
/// <param name="index">The index of child record</param>
/// <returns>The record </returns>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public ContactsRecord GetChildRecord(uint propertyId, int index)
{
IntPtr handle;
/// <returns>
/// The record list
/// </returns>
+ /// <feature>http://tizen.org/feature/contact</feature>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+ /// <since_tizen> 4 </since_tizen>
public ContactsList CloneChildRecordList(uint propertyId)
{
IntPtr listHandle;
/// </summary>
/// <param name="record">The contacts record</param>
/// <returns> true to continue with the next iteration of the loop, otherwise false to break out of the loop</returns>
+ /// <since_tizen> 4 </since_tizen>
public delegate bool ParseCallback(ContactsRecord record);
/// <summary>
/// <remarks>
/// It's based on the vCard v3.0 specification
/// </remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class ContactsVcard
{
/// <summary>
/// The vCard stream.
/// </returns>
/// <privilege>http://tizen.org/privilege/contact.read</privilege>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public static string Compose(ContactsRecord record)
{
int error = 0;
/// <returns>
/// The contacts list
/// </returns>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public static ContactsList Parse(string stream)
{
IntPtr listHandle;
/// </summary>
/// <param name="path">The file path of vCard stream file</param>
/// <param name="callback">The callback function to invoke</param>
+ /// <feature>http://tizen.org/feature/contact</feature>
/// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
/// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+ /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
+ /// <since_tizen> 4 </since_tizen>
public static void ParseForEach(string path, ParseCallback callback)
{
Interop.Vcard.ContactsVcardParseCallback cb = (IntPtr handle, IntPtr data) =>
/// A "record" represents a single row of the views.
/// A record can have basic properties of five types: integer, string, boolean, long, double.
/// </remarks>
+ /// <since_tizen> 4 </since_tizen>
namespace ContactsViews
{
internal static class Property
PhonelogNormalizedAddress = (Phonelog | DataTypeString | ReadOnly) + 7,
PhonelogCleanedAddress = (Phonelog | DataTypeString | ReadOnly) + 8,
PhonelogAddressFilter = (Phonelog | DataTypeString | ReadOnly) + 9,
- PhonelogSIMSlotNo = (Phonelog | DataTypeInt) + 10,
+ PhonelogSimSlotNo = (Phonelog | DataTypeInt) + 10,
/* phonelog_stat */
PhonelogStatLogCount = (PhonelogStat | DataTypeInt | ReadOnly),
PhonelogStatLogType = (PhonelogStat | DataTypeInt | ReadOnly) + 1,
- PhonelogStatSIMSlotNo = (PhonelogStat | DataTypeInt | ReadOnly) + 2,
+ PhonelogStatSimSlotNo = (PhonelogStat | DataTypeInt | ReadOnly) + 2,
/* updated_info : read only */
UpdateInfoId = (UpdateInfo | DataTypeInt),
/// <summary>
/// Enumeration for contact change state.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum ChangeType
{
/// <summary>
/// <summary>
/// Describes properties of a Address book record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class AddressBook
{
/// <summary>
/// <summary>
/// Enumeration for Address book mode.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum ModeValue
{
/// <summary>
/// <summary>
/// Describes properties of a Group record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Group
{
/// <summary>
/// <summary>
/// Describes properties of a Person record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Person
{
/// <summary>
/// <summary>
/// Describes properties of a Contact record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Contact
{
/// <summary>
/// <summary>
/// Enumeration for link mode when inserting contact.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum LinkModeValue
{
/// <summary>
/// <summary>
/// Enumeration for Contact display name source type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum DisplayNameSourceType
{
/// <summary>
/// <summary>
/// Enumeration for contacts data type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum DataType
{
/// <summary>
/// <summary>
/// Describes properties of a Simple contact record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class SimpleContact
{
/// <summary>
/// <summary>
/// Describes properties of a My profile record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class MyProfile
{
/// <summary>
/// <summary>
/// Describes properties of a Name record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Name
{
/// <summary>
/// <summary>
/// Describes properties of a Number record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Number
{
/// <summary>
/// <summary>
/// Enumeration for number type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
[Flags]
public enum Types
{
/// <summary>
/// Describes properties of a Email record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Email
{
/// <summary>
/// <summary>
/// Enumeration for Contact email type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
[Flags]
public enum Types
{
/// <summary>
/// Describes properties of a Address record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Address
{
/// <summary>
/// <summary>
/// Enumeration for Contact address type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
[Flags]
public enum Types
{
/// <summary>
/// Describes properties of a Note record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Note
{
/// <summary>
/// <summary>
/// Describes properties of a URL record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class URL
{
/// <summary>
/// <summary>
/// Enumeration for Contact URL type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum TypeValue
{
/// <summary>
/// <summary>
/// Describes properties of a Event record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords")]
public static class Event
{
/// <summary>
/// Enumeration for Contact event type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum TypeValue
{
/// <summary>
/// <summary>
/// Enumeration for Contact event calendar type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum CalendarType
{
/// <summary>
/// <summary>
/// Describes properties of a Relationship record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Relationship
{
/// <summary>
/// <summary>
/// Enumeration for Contact relationship type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum TypeValue
{
/// <summary>
/// <summary>
/// Describes properties of a Image record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Image
{
/// <summary>
/// <summary>
/// Enumeration for Contact image type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum TypeValue
{
/// <summary>
/// <summary>
/// Describes properties of a Company record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Company
{
/// <summary>
/// <summary>
/// Enumeration for Contact company type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum TypeValue
{
/// <summary>
/// <summary>
/// Describes properties of a Nickname record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Nickname
{
/// <summary>
/// <summary>
/// Describes properties of a Messenger record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Messenger
{
/// <summary>
/// <summary>
/// Enumeration for Contact messenger type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum TypeValue
{
/// <summary>
/// <summary>
/// Describes properties of a Profile record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
[SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces")]
public static class Profile
{
/// <summary>
/// Describes properties of a Sip record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Sip
{
/// <summary>
/// <summary>
/// Enumeration for Contact SIP type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum TypeValue
{
/// <summary>
/// <summary>
/// Describes properties of a Extension record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class Extension
{
/// <summary>
/// <summary>
/// Describes properties of a Group relation record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class GroupRelation
{
/// <summary>
/// <summary>
/// Describes properties of a Speed dial record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class SpeedDial
{
/// <summary>
/// <summary>
/// Describes properties of a Phone log record.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class PhoneLog
{
/// <summary>
/// </summary>
public const uint AddressFilter = (uint)Property.Id.PhonelogAddressFilter;
/// <summary>
- /// You can set the related SIM slot number. SimSlotNo 0 means first SIM card, SimSlotNo 1 means second SIM.
+ /// You can set the related Sim slot number. SimSlotNo 0 means first Sim card, SimSlotNo 1 means second Sim.
/// </summary>
- public const uint SimSlotNo = (uint)Property.Id.PhonelogSIMSlotNo;
+ public const uint SimSlotNo = (uint)Property.Id.PhonelogSimSlotNo;
/// <summary>
/// Enumeration for Phone log type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum Type
{
/// <summary>
/// Describes properties of a Contact updated information record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class ContactUpdatedInfo
{
/// <summary>
/// Describes properties of a My profile updated information record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class MyProfileUpdatedInfo
{
/// <summary>
/// Describes properties of a Group updated information record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class GroupUpdatedInfo
{
/// <summary>
/// Describes properties of a Group Member updated information record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class GroupMemberUpdatedInfo
{
/// <summary>
/// Describes properties of a Relation updated information record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class GroupRelationUpdatedInfo
{
/// <summary>
/// Describes properties of a PersonContact record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class PersonContact
{
/// <summary>
/// Describes properties of a PersonNumber record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class PersonNumber
{
/// <summary>
/// Describes properties of a PersonEmail record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class PersonEmail
{
/// <summary>
/// Describes properties of a PersonGroupRelation record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class PersonGroupRelation
{
/// <summary>
};
/// <summary>
- /// Describes properties of a PersonGroupAssignedrecord.
+ /// Describes properties of a PersonGroupAssigned record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class PersonGroupAssigned
{
/// <summary>
/// Describes properties of a PersonGroupNotAssigned record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class PersonGroupNotAssigned
{
/// <summary>
/// Describes properties of a PersonPhoneLog record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class PersonPhoneLog
{
/// <summary>
/// </summary>
public const uint AddressFilter = (uint)Property.Id.PhonelogAddressFilter;
/// <summary>
- /// It is related to the SIM slot number. SimSlotNo 0 means first SIM card, SimSlotNo 1 means second SIM.
+ /// It is related to the Sim slot number. SimSlotNo 0 means first Sim card, SimSlotNo 1 means second Sim.
/// </summary>
- public const uint SIMSlotNo = (uint)Property.Id.PhonelogSIMSlotNo;
+ public const uint SimSlotNo = (uint)Property.Id.PhonelogSimSlotNo;
};
/// <summary>
/// Describes properties of a Person Usage record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class PersonUsage
{
/// <summary>
/// <summary>
/// Enumeration for Person usage type.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum Type
{
/// <summary>
/// Describes properties of a ContactNumber record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class ContactNumber
{
/// <summary>
/// Describes properties of a ContactEmail record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class ContactEmail
{
/// <summary>
/// Describes properties of a ContactGroupRelation record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class ContactGroupRelation
{
/// <summary>
/// Describes properties of a Phone Log Statistics record.
/// </summary>
/// <remarks>Read only view</remarks>
+ /// <since_tizen> 4 </since_tizen>
public static class PhoneLogStatistics
{
/// <summary>
/// </summary>
public const uint LogType = (uint)Property.Id.PhonelogStatLogType;
/// <summary>
- /// It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
+ /// It is related to the Sim slot number. sim_slot_no 0 means first Sim card, sim_slot_no 1 means second Sim. It is same with handle index of telephony handle list. Refer to the telephony_init()
/// </summary>
- public const uint SIMSlotNo = (uint)Property.Id.PhonelogStatSIMSlotNo;
+ public const uint SimSlotNo = (uint)Property.Id.PhonelogStatSimSlotNo;
};
}
}
/// <summary>
/// Event arguments passed when contacts database is changed
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class DBChangedEventArgs : EventArgs
{
internal DBChangedEventArgs(string viewUri)
/// <summary>
/// The contacts view URI changed.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public string ViewUri
{
get;
/// <summary>
/// Event arguments passed when contacts database status is changed
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class DBStatusChangedEventArgs : EventArgs
{
internal DBStatusChangedEventArgs(DBStatus status)
/// <summary>
/// The contacts database status.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public DBStatus Status
{
get;
/// <summary>
/// Event arguments passed when setting value of contacts name display order is changed
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class NameDisplayOrderChangedEventArgs : EventArgs
{
internal NameDisplayOrderChangedEventArgs(ContactDisplayOrder displayOrder)
/// <summary>
/// A setting value of contacts name display order
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public ContactDisplayOrder NameDisplayOrder
{
get;
/// <summary>
/// Event arguments passed when setting value of contacts name sorting order is changed
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class NameSortingOrderChangedEventArgs : EventArgs
{
internal NameSortingOrderChangedEventArgs(ContactSortingOrder SortingOrder)
/// <summary>
/// A setting value of contacts name sorting order
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public ContactSortingOrder NameSortingOrder
{
get;
/// <remarks>
/// The Tizen.Pims.Contacts namespace provides classes for managing contact information for people.
/// </remarks>
+/// <since_tizen> 4 </since_tizen>
namespace Tizen.Pims.Contacts {}
using System;
using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
namespace Tizen.System
{
[RuntimeInfoKey.AudioJackConnector] = RuntimeInfoStringKeyAudioJackType
};
- [EditorBrowsable(EditorBrowsableState.Never)]
private static bool ConvertStringToRuntimeInfoKey(string key, out RuntimeInfoKey feature)
{
string filteredKey = key.StartsWith(HttpPrefix) ? key.Substring(HttpPrefix.Length) : key;
return StringEnumMapping.TryGetValue(filteredKey, out feature);
}
- [EditorBrowsable(EditorBrowsableState.Never)]
private static bool TryGetRuntimeInfoValue<T>(RuntimeInfoKey key, out T value)
{
value = default(T);
return RuntimeInfo.TryGetValue<T>(key, out value);
}
- [EditorBrowsable(EditorBrowsableState.Never)]
+#pragma warning disable CS0618 // Type or member is obsolete
private static bool TryGetSystemInfoValue<T>(string key, out T value)
{
value = default(T);
return SystemInfo.TryGetValue<T>(key, out value);
}
+#pragma warning restore CS0618 // Type or member is obsolete
/// <summary>
/// Gets the value of the feature.
using System;
using System.IO;
-using System.ComponentModel;
using Tizen.Internals.Errors;
namespace Tizen.System
{
- [EditorBrowsable(EditorBrowsableState.Never)]
internal enum InformationError
{
None = ErrorCode.None,
NoData = ErrorCode.NoData
}
- [EditorBrowsable(EditorBrowsableState.Never)]
internal static class InformationErrorFactory
{
internal const string LogTag = "Tizen.System.Information";
* limitations under the License.
*/
-using System.ComponentModel;
-
namespace Tizen.System
{
- [EditorBrowsable(EditorBrowsableState.Never)]
/// <summary>
/// Enumeration for the runtime information key.
/// </summary>
using System;
using System.Collections.Generic;
-using System.IO;
-using System.ComponentModel;
namespace Tizen.System
{
- [EditorBrowsable(EditorBrowsableState.Never)]
internal static class RuntimeInfo
{
private static RuntimeInfoEventHandler BluetoothEnabled = new RuntimeInfoEventHandler(RuntimeInfoKey.Bluetooth);
*/
using System;
-using System.ComponentModel;
namespace Tizen.System
{
- [EditorBrowsable(EditorBrowsableState.Never)]
internal class RuntimeInfoEventHandler
{
private RuntimeInfoKey Key;
using System;
using System.Collections.Generic;
-using System.ComponentModel;
namespace Tizen.System
{
- [EditorBrowsable(EditorBrowsableState.Never)]
internal static class TvProductHelper
{
private static int is_TV_product = -1;
if (is_TV_product == -1)
{
+#pragma warning disable CS0618 // Type or member is obsolete
is_key_existed = SystemInfo.TryGetValue<string>("http://com.samsung/build_config/product_type", out profile);
+#pragma warning restore CS0618 // Type or member is obsolete
if (is_key_existed && String.Compare(profile, "TV") == 0)
{
is_TV_product = 1;