</PropertyGroup>
<ItemGroup>
+ <ProjectReference Include="..\Tizen.System.Storage\Tizen.System.Storage.csproj" />
<ProjectReference Include="..\Tizen\Tizen.csproj" />
<ProjectReference Include="..\Tizen.Log\Tizen.Log.csproj" />
<ProjectReference Include="..\Tizen.System.Information\Tizen.System.Information.csproj" />
-/*
+/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the License);
/// </remarks>
/// <seealso cref="MediaInfo.StorageType"/>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public static string StorageType => "MEDIA_STORAGE_TYPE";
/// <summary>
/// </remarks>
/// <seealso cref="Folder.StorageType"/>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public static string StorageType => "FOLDER_STORAGE_TYPE";
}
/// <seealso cref="StorageCommand.Count(CountArguments)"/>
/// <seealso cref="StorageCommand.Select(SelectArguments)"/>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public static class StorageColumns
{
/// <summary>
/// </remarks>
/// <seealso cref="Storage.Id"/>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public static string Id => "STORAGE_ID";
/// <summary>
/// </remarks>
/// <seealso cref="Storage.Path"/>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public static string Path => "STORAGE_PATH";
/// <summary>
/// </remarks>
/// <seealso cref="Storage.Type"/>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public static string Type => "MEDIA_STORAGE_TYPE";
}
}
/// </summary>
/// <value>The <see cref="StorageType"/> of the storage that the folder exists.</value>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public StorageType StorageType { get; }
/// <summary>
/// </summary>
/// <value>The storage ID of the storage that the folder exists.</value>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public string StorageId { get; }
/// <summary>
/// </summary>
/// <value>The storage ID of the storage that the media is stored on.</value>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public string StorageId { get; }
/// <summary>
/// </summary>
/// <value>The storage type of the storage that the media is stored on.</value>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public StorageType StorageType { get; }
/// <summary>
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using Tizen.System;
namespace Tizen.Content.MediaContent
{
using (handle)
{
- if (InteropHelper.GetValue<StorageType>(handle, Interop.MediaInfo.GetStorageType) == StorageType.ExternalUsb)
+ var path = InteropHelper.GetString(handle, Interop.MediaInfo.GetFilePath);
+
+ foreach (var extendedInternal in StorageManager.Storages.Where(s => s.StorageType == StorageArea.ExtendedInternal))
{
- throw new UnsupportedContentException("The media is in external usb storage.");
+ if (path.Contains(extendedInternal.RootDirectory))
+ {
+ throw new UnsupportedContentException("The media is in external usb storage.");
+ }
}
- var path = InteropHelper.GetString(handle, Interop.MediaInfo.GetFilePath);
-
if (File.Exists(path) == false)
{
throw new FileNotFoundException($"The media file does not exist. Path={path}.", path);
/// <value>The storage ID to restrict storage to search, or null for all storages.</value>
/// <exception cref="ArgumentException"><paramref name="value"/> is a zero-length string, contains only white space.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public string StorageId
{
get => _storageId;
/// in each of the storage by using the storage ID.
/// </remarks>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public class Storage
{
internal Storage(IntPtr handle)
/// </summary>
/// <value>The unique ID of the storage.</value>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public string Id { get; }
/// <summary>
/// </summary>
/// <value>The path of the storage.</value>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public string Path { get; }
/// <summary>
/// </summary>
/// <value>The type of the storage.</value>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public StorageType Type { get; }
/// <summary>
/// </summary>
/// <returns>A string representation of the current storage.</returns>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public override string ToString() =>
$"Id={Id}, Path={Path}, Type={Type}";
}
/// </remarks>
/// <seealso cref="Storage"/>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public class StorageCommand : MediaCommand
{
/// <summary>
/// <exception cref="ArgumentNullException"><paramref name="database"/> is null.</exception>
/// <exception cref="ObjectDisposedException"><paramref name="database"/> has already been disposed of.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public StorageCommand(MediaDatabase database) : base(database)
{
}
/// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
/// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public int Count() => Count(arguments: null);
/// <summary>
/// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
/// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public int Count(CountArguments arguments)
{
ValidateDatabase();
/// <exception cref="ArgumentNullException"><paramref name="storageId"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="storageId"/> is a zero-length string, contains only white space.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public Storage Select(string storageId)
{
ValidateDatabase();
/// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
/// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public MediaDataReader<Storage> Select() => Select(arguments: null);
/// <summary>
/// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
/// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public MediaDataReader<Storage> Select(SelectArguments arguments)
{
ValidateDatabase();
/// <exception cref="ArgumentNullException"><paramref name="storageId"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="storageId"/> is a zero-length string, contains only white space.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public int CountMedia(string storageId) => CountMedia(storageId, null);
/// <summary>
/// <exception cref="ArgumentNullException"><paramref name="storageId"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="storageId"/> is a zero-length string, contains only white space.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public int CountMedia(string storageId, CountArguments arguments)
{
if (Exists(storageId) == false)
/// <exception cref="ArgumentNullException"><paramref name="storageId"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="storageId"/> is a zero-length string, contains only white space.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public MediaDataReader<MediaInfo> SelectMedia(string storageId) => SelectMedia(storageId, null);
/// <summary>
/// <exception cref="ArgumentNullException"><paramref name="storageId"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="storageId"/> is a zero-length string, contains only white space.</exception>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Please do not use! this will be deprecated in level 6")]
public MediaDataReader<MediaInfo> SelectMedia(string storageId, SelectArguments filter)
{
if (Exists(storageId) == false)