if (sortOrder == SORT_ORDER_ASCENDING)
{
- ret = media_filter_set_order(*(__pFilterHandle.get()), MEDIA_CONTENT_ORDER_ASC, MEDIA_PATH, MEDIA_CONTENT_COLLATE_DEFAULT);
+ ret = media_filter_set_order(*(__pFilterHandle.get()), MEDIA_CONTENT_ORDER_ASC, MEDIA_PATH, MEDIA_CONTENT_COLLATE_NOCASE);
r = MapCoreErrorToNativeResult(ret);
SysTryReturn(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, null, r,
"[%s] Failed to perform media_filter_set_order operation.", GetErrorMessage(r));
}
else if (sortOrder == SORT_ORDER_DESCENDING)
{
- ret = media_filter_set_order(*(__pFilterHandle.get()), MEDIA_CONTENT_ORDER_DESC, MEDIA_PATH, MEDIA_CONTENT_COLLATE_DEFAULT);
+ ret = media_filter_set_order(*(__pFilterHandle.get()), MEDIA_CONTENT_ORDER_DESC, MEDIA_PATH, MEDIA_CONTENT_COLLATE_NOCASE);
r = MapCoreErrorToNativeResult(ret);
SysTryReturn(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, null, r,
"[%s] Failed to perform media_filter_set_order operation.", GetErrorMessage(r));
r = CreateFolderFilter(__isMultiContentType, detachedPath);
SysTryReturn(NID_CNT, !IsFailed(r), null, E_SYSTEM, "[E_SYSTEM] Failed to perform CreateFolderFilter operation.");
- if ((!column.IsEmpty()) && (sortOrder != SORT_ORDER_NONE))
- {
- //__inputColumnName (osp column name) is replaced with slpColumn (slp column name).
- r = GetSlpColumnName(slpColumn, column);
- SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[%s] Failed to perform GetSlpColumnName operation.", GetErrorMessage(r));
-
- //CopyToCharArrayN: utility function, converts a osp string to char*
- std::unique_ptr<char[]> pSortCol(_StringConverter::CopyToCharArrayN(slpColumn));
- SysTryReturn(NID_CNT, pSortCol, null, E_OUT_OF_MEMORY, "The memory is insufficient.");
-
- if (sortOrder == SORT_ORDER_ASCENDING)
- {
- ret = media_filter_set_order(*(__pFilterHandle.get()), MEDIA_CONTENT_ORDER_ASC, pSortCol.get(), MEDIA_CONTENT_COLLATE_DEFAULT);
- r = MapCoreErrorToNativeResult(ret);
- SysTryReturn(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, null, r,
- "[%s] Failed to perform media_filter_set_order operation.", GetErrorMessage(r));
- }
- else if (sortOrder == SORT_ORDER_DESCENDING)
- {
- ret = media_filter_set_order(*(__pFilterHandle.get()), MEDIA_CONTENT_ORDER_DESC, pSortCol.get(), MEDIA_CONTENT_COLLATE_DEFAULT);
- r = MapCoreErrorToNativeResult(ret);
- SysTryReturn(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, null, r,
- "[%s] Failed to perform media_filter_set_order operation.", GetErrorMessage(r));
- }
- }
-
pTempList = pItemList.get();
ret = media_folder_foreach_folder_from_db(*(__pFilterHandle.get()), MediaFoldersCb, &pTempList);
r = MapCoreErrorToNativeResult(ret);
SysLog(NID_CNT, "totalCount [%d] totalPageCount[%d] __countPerPage[%d] __pageNo[%d] offset[%d]",
totalCount, totalPageCount, countPerPage, pageNo, offset);
+ if ((!column.IsEmpty()) && (sortOrder != SORT_ORDER_NONE))
+ {
+ //__inputColumnName (osp column name) is replaced with slpColumn (slp column name).
+ r = GetSlpColumnName(slpColumn, column);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[%s] Failed to perform GetSlpColumnName operation.", GetErrorMessage(r));
+
+ //CopyToCharArrayN: utility function, converts a osp string to char*
+ std::unique_ptr<char[]> pSortCol(_StringConverter::CopyToCharArrayN(slpColumn));
+ SysTryReturn(NID_CNT, pSortCol, null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+
+ if (sortOrder == SORT_ORDER_ASCENDING)
+ {
+ ret = media_filter_set_order(*(__pFilterHandle.get()), MEDIA_CONTENT_ORDER_ASC, pSortCol.get(), MEDIA_CONTENT_COLLATE_NOCASE);
+ r = MapCoreErrorToNativeResult(ret);
+ SysTryReturn(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, null, r,
+ "[%s] Failed to perform media_filter_set_order operation.", GetErrorMessage(r));
+ }
+ else if (sortOrder == SORT_ORDER_DESCENDING)
+ {
+ ret = media_filter_set_order(*(__pFilterHandle.get()), MEDIA_CONTENT_ORDER_DESC, pSortCol.get(), MEDIA_CONTENT_COLLATE_NOCASE);
+ r = MapCoreErrorToNativeResult(ret);
+ SysTryReturn(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, null, r,
+ "[%s] Failed to perform media_filter_set_order operation.", GetErrorMessage(r));
+ }
+ }
+
ret = media_filter_set_offset(*(__pFilterHandle.get()),offset,countPerPage);
r = MapCoreErrorToNativeResult(ret);
SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[%s] Failed to perform media_filter_set_offset operation.", GetErrorMessage(r));