Signed-off-by: pr.jung <pr.jung@samsung.com>
/// The storage state will be updated before calling the event handler.
/// </remarks>
/// <since_tizen> 3 </since_tizen>
/// The storage state will be updated before calling the event handler.
/// </remarks>
/// <since_tizen> 3 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
/// <example>
/// <code>
/// myStorage.StorageStateChanged += (s, e) =>
/// <example>
/// <code>
/// myStorage.StorageStateChanged += (s, e) =>
/// The storage ID.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// The storage ID.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
public int Id { get; }
/// <summary>
/// The type of storage.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public int Id { get; }
/// <summary>
/// The type of storage.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
public StorageArea StorageType { get { return (StorageArea)_storagetype; } }
/// <summary>
/// The root directory for the storage.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public StorageArea StorageType { get { return (StorageArea)_storagetype; } }
/// <summary>
/// The root directory for the storage.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
public string RootDirectory { get; }
/// <summary>
/// The total storage size in bytes.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public string RootDirectory { get; }
/// <summary>
/// The total storage size in bytes.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
public ulong TotalSpace { get { return _totalSpace; } }
/// <summary>
/// The StorageState.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public ulong TotalSpace { get { return _totalSpace; } }
/// <summary>
/// The StorageState.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
public StorageState State
{
get
public StorageState State
{
get
/// The StorageDevice.
/// </summary>
/// <since_tizen> 5 </since_tizen>
/// The StorageDevice.
/// </summary>
/// <since_tizen> 5 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
/// <exception cref="InvalidOperationException">Thrown when DeviceType is not initialized.</exception>
public StorageDevice DeviceType
{
/// <exception cref="InvalidOperationException">Thrown when DeviceType is not initialized.</exception>
public StorageDevice DeviceType
{
/// The type of file system.
/// </summary>
/// <since_tizen> 5 </since_tizen>
/// The type of file system.
/// </summary>
/// <since_tizen> 5 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
/// <exception cref="InvalidOperationException">Thrown when Fstype is not initialized.</exception>
public string Fstype
{
/// <exception cref="InvalidOperationException">Thrown when Fstype is not initialized.</exception>
public string Fstype
{
/// The UUID of the file system.
/// </summary>
/// <since_tizen> 5 </since_tizen>
/// The UUID of the file system.
/// </summary>
/// <since_tizen> 5 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
/// <exception cref="InvalidOperationException">Thrown when Fsuuid is not initialized.</exception>
public string Fsuuid
{
/// <exception cref="InvalidOperationException">Thrown when Fsuuid is not initialized.</exception>
public string Fsuuid
{
/// Information whether this is a primary partition.
/// </summary>
/// <since_tizen> 5 </since_tizen>
/// Information whether this is a primary partition.
/// </summary>
/// <since_tizen> 5 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
/// <exception cref="InvalidOperationException">Thrown when primary is not initialized.</exception>
public bool Primary
{
/// <exception cref="InvalidOperationException">Thrown when primary is not initialized.</exception>
public bool Primary
{
/// The flags for the storage status.
/// </summary>
/// <since_tizen> 5 </since_tizen>
/// The flags for the storage status.
/// </summary>
/// <since_tizen> 5 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
/// <exception cref="InvalidOperationException">Thrown when flags are not initialized.</exception>
public int Flags
{
/// <exception cref="InvalidOperationException">Thrown when flags are not initialized.</exception>
public int Flags
{
/// The available storage size in bytes.
/// </summary>
/// <since_tizen> 5 </since_tizen>
/// The available storage size in bytes.
/// </summary>
/// <since_tizen> 5 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
public ulong AvailableSpace
{
get
public ulong AvailableSpace
{
get
/// <since_tizen> 3 </since_tizen>
/// <param name="dirType">Directory type.</param>
/// <returns>Absolute path for a given directory type in the storage.</returns>
/// <since_tizen> 3 </since_tizen>
/// <param name="dirType">Directory type.</param>
/// <returns>Absolute path for a given directory type in the storage.</returns>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
/// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory exception.</exception>
/// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory exception.</exception>
- /// <exception cref="NotSupportedException">Thrown when failed if the storage is not supported or the application does not have the permission to access the directory path.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the storage is not supported or the application does not have the permission to access the directory path.</exception>
/// <privilege>http://tizen.org/privilege/mediastorage</privilege>
/// <privilege>http://tizen.org/privilege/systemsettings</privilege>
/// <privilege>http://tizen.org/privilege/externalstorage</privilege>
/// <privilege>http://tizen.org/privilege/mediastorage</privilege>
/// <privilege>http://tizen.org/privilege/systemsettings</privilege>
/// <privilege>http://tizen.org/privilege/externalstorage</privilege>
case Interop.Storage.ErrorCode.OutOfMemory:
throw new OutOfMemoryException("Out of Memory");
case Interop.Storage.ErrorCode.NotSupported:
case Interop.Storage.ErrorCode.OutOfMemory:
throw new OutOfMemoryException("Out of Memory");
case Interop.Storage.ErrorCode.NotSupported:
- throw new NotSupportedException("Operation Not Supported");
+ throw new NotSupportedException("Storage Not Supported");
default:
throw new InvalidOperationException("Error = " + err);
}
default:
throw new InvalidOperationException("Error = " + err);
}
if (err != Interop.Storage.ErrorCode.None)
{
Log.Warn(LogTag, string.Format("Failed to Register changed event callback for external storage. err = {0}", err));
if (err != Interop.Storage.ErrorCode.None)
{
Log.Warn(LogTag, string.Format("Failed to Register changed event callback for external storage. err = {0}", err));
+
+ switch (err)
+ {
+ case Interop.Storage.ErrorCode.NotSupported:
+ throw new NotSupportedException("Storage Not Supported");
+ default:
+ break;
+ }
}
private static void UnregisterChangedEvent(StorageArea type)
}
private static void UnregisterChangedEvent(StorageArea type)
if (err != Interop.Storage.ErrorCode.None)
{
Log.Warn(LogTag, string.Format("Failed to Unreegister changed event callback for external storage. err = {0}", err));
if (err != Interop.Storage.ErrorCode.None)
{
Log.Warn(LogTag, string.Format("Failed to Unreegister changed event callback for external storage. err = {0}", err));
+
+ switch (err)
+ {
+ case Interop.Storage.ErrorCode.NotSupported:
+ throw new NotSupportedException("Storage Not Supported");
+ default:
+ break;
+ }
/// <param name="type">The type of the storage.</param>
/// <param name="handler">An eventhandler to register.</param>
/// <since_tizen> 5 </since_tizen>
/// <param name="type">The type of the storage.</param>
/// <param name="handler">An eventhandler to register.</param>
/// <since_tizen> 5 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
+ /// <exception cref="NotSupportedException">Thrown when the storage is not supported.</exception>
public static void SetChangedEvent(StorageArea type, EventHandler handler)
{
if (type == StorageArea.Internal)
public static void SetChangedEvent(StorageArea type, EventHandler handler)
{
if (type == StorageArea.Internal)
/// <param name="type">The type of the storage.</param>
/// <param name="handler">An eventhandler to unregister.</param>
/// <since_tizen> 5 </since_tizen>
/// <param name="type">The type of the storage.</param>
/// <param name="handler">An eventhandler to unregister.</param>
/// <since_tizen> 5 </since_tizen>
+ /// <feature> http://tizen.org/feature/storage.external </feature>
+ /// <exception cref="NotSupportedException">Thrown when the storage is not supported.</exception>
public static void UnsetChangedEvent(StorageArea type, EventHandler handler)
{
if (type == StorageArea.Internal)
public static void UnsetChangedEvent(StorageArea type, EventHandler handler)
{
if (type == StorageArea.Internal)