throw MediaContentErrorFactory.CreateException(res, "Failed to get the content collection");
}
if (_handle != IntPtr.Zero)
- contentCollection = new MediaFolder(_handle);
+ contentCollection = new PlayList(_handle);
}
else if (typeof(T) == typeof(Album))
{
throw MediaContentErrorFactory.CreateException(res, "Failed to get the content collection");
}
if (_handle != IntPtr.Zero)
- contentCollection = new Storage(_handle);
+ contentCollection = new Album(_handle);
}
else if (typeof(T) == typeof(Tag))
{
throw MediaContentErrorFactory.CreateException(res, "Failed to get the content collection");
}
if (_handle != IntPtr.Zero)
- contentCollection = new Storage(_handle);
+ contentCollection = new Tag(_handle);
}
return (T)contentCollection;
}
{
private IntPtr _filterHandle;
private bool _disposedValue = false;
+ private ContentOrder _order = ContentOrder.Asc;
+ private string _orderKey = "MEDIA_ID";
+ private ContentCollation _collationType = ContentCollation.Default;
internal IntPtr Handle
{
get
res = (MediaContentError)Interop.Filter.GetOffset(_filterHandle, out offset, out count);
if (res != MediaContentError.None)
{
- Log.Warn(MediaContentErrorFactory.LogTag, "Failed to Setoffset");
+ Log.Warn(MediaContentErrorFactory.LogTag, "Failed to Get offset");
}
return offset;
}
{
throw MediaContentErrorFactory.CreateException(res, "Failed to Create Filter handle.");
}
+ res = (MediaContentError)Interop.Filter.SetOrder(_filterHandle,(int) _order, _orderKey, (int) _collationType);
}
/// <summary>
/// The number of items to be searched with respect to the offset
{
//TOD: check if we can convert this as method to club offset and count.
MediaContentError res;
- res = (MediaContentError)Interop.Filter.SetOffset(_filterHandle, value, this.Count);
+ res = (MediaContentError)Interop.Filter.SetOffset(_filterHandle, this.Offset, value);
if (res != MediaContentError.None)
{
throw MediaContentErrorFactory.CreateException(res, "Failed to Setoffset/Count");
{
Log.Warn(MediaContentErrorFactory.LogTag, "Failed to GetOrder");
}
+ if ( orderKey.Length == 0)
+ {
+ orderKey = _orderKey;
+ }
return (ContentOrder)orderType;
}
set
{
Log.Warn(MediaContentErrorFactory.LogTag, "Failed to GetOrder");
}
- return (ContentCollation)collatetType;
+ return (ContentCollation)collatetType;
}
set
{
+ _collationType = value;
//TOD: check if we can convert this as method to club offset and count.
MediaContentError res;
res = (MediaContentError)Interop.Filter.SetOrder(_filterHandle, (int)this.Order, this.OrderKey, (int)value);
MediaContentError res;
int collatetType;
res = (MediaContentError)Interop.Filter.GetCondition(_filterHandle, out conditionVal, out collatetType);
+ _collationType = (ContentCollation)collatetType;
if (res != MediaContentError.None)
{
Log.Warn(MediaContentErrorFactory.LogTag, "Failed to GetCondition");
{
//TOD: check if we can convert this as method to club offset and count.
MediaContentError res;
- res = (MediaContentError)Interop.Filter.SetCondition(_filterHandle, value, (int)this.CollationType);
+ res = (MediaContentError)Interop.Filter.SetCondition(_filterHandle, value, (int) _collationType);
if (res != MediaContentError.None)
{
throw MediaContentErrorFactory.CreateException(res, "Failed to SetCondition");
{
Log.Warn(MediaContentErrorFactory.LogTag, "Failed to GetOrder");
}
+ if (orderKey.Length == 0)
+ {
+ orderKey = _orderKey;
+ }
return orderKey;
}
set
{
+ _orderKey = value;
//TOD: check if we can convert this as method to club offset and count.
MediaContentError res;
res = (MediaContentError)Interop.Filter.SetOrder(_filterHandle, (int)this.Order, value, (int)this.CollationType);