2014-07-12 09:46:14 +02:00
|
|
|
#include "stdafx.h"
|
2015-02-22 09:50:26 +01:00
|
|
|
#include "Emu/Memory/Memory.h"
|
|
|
|
|
#include "Emu/System.h"
|
|
|
|
|
#include "Emu/SysCalls/Modules.h"
|
2015-02-22 15:50:11 +01:00
|
|
|
#include "cellSearch.h"
|
2013-09-28 04:36:57 +02:00
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
extern Module cellSearch;
|
2013-09-28 04:36:57 +02:00
|
|
|
|
2015-02-22 15:50:11 +01:00
|
|
|
struct cellSearchInternal
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-02-22 15:50:11 +01:00
|
|
|
bool m_bInitialized;
|
|
|
|
|
|
|
|
|
|
cellSearchInternal()
|
|
|
|
|
: m_bInitialized(false)
|
|
|
|
|
{
|
|
|
|
|
}
|
2013-09-28 04:36:57 +02:00
|
|
|
};
|
|
|
|
|
|
2015-02-22 15:50:11 +01:00
|
|
|
cellSearchInternal cellSearchInstance;
|
|
|
|
|
|
|
|
|
|
s32 cellSearchInitialize(CellSearchMode mode, u32 container, CellSearchSystemCallback func, vm::ptr<u32> userData)
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-02-22 15:50:11 +01:00
|
|
|
cellSearch.Todo("cellSearchInitialize()");
|
|
|
|
|
|
|
|
|
|
if (cellSearchInstance.m_bInitialized)
|
|
|
|
|
return CELL_SEARCH_ERROR_ALREADY_INITIALIZED;
|
|
|
|
|
if (mode != 0)
|
|
|
|
|
return CELL_SEARCH_ERROR_UNKNOWN_MODE;
|
|
|
|
|
if (!func)
|
|
|
|
|
return CELL_SEARCH_ERROR_PARAM;
|
|
|
|
|
|
|
|
|
|
cellSearchInstance.m_bInitialized = true;
|
|
|
|
|
|
|
|
|
|
// TODO: Store the arguments somewhere so we can use them later.
|
|
|
|
|
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchFinalize()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-02-22 15:50:11 +01:00
|
|
|
cellSearch.Log("cellSearchFinalize()");
|
|
|
|
|
|
|
|
|
|
if (!cellSearchInstance.m_bInitialized)
|
|
|
|
|
return CELL_SEARCH_ERROR_NOT_INITIALIZED;
|
|
|
|
|
|
|
|
|
|
cellSearchInstance.m_bInitialized = false;
|
|
|
|
|
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchStartListSearch()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchStartContentSearchInList()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchStartContentSearch()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchStartSceneSearchInVideo()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchStartSceneSearch()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchGetContentInfoByOffset()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchGetContentInfoByContentId()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchGetOffsetByContentId()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchGetContentIdByOffset()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchGetContentInfoGameComment()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchGetMusicSelectionContext()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchGetMusicSelectionContextOfSingleTrack()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchGetContentInfoPath()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchGetContentInfoPathMovieThumb()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchPrepareFile()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchGetContentInfoDeveloperData()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchCancel()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
s32 cellSearchEnd()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSearch);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 09:50:26 +01:00
|
|
|
Module cellSearch("cellSearch", []()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-02-20 14:58:40 +01:00
|
|
|
REG_FUNC(cellSearch, cellSearchInitialize);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchFinalize);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchStartListSearch);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchStartContentSearchInList);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchStartContentSearch);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchStartSceneSearchInVideo);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchStartSceneSearch);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchGetContentInfoByOffset);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchGetContentInfoByContentId);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchGetOffsetByContentId);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchGetContentIdByOffset);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchGetContentInfoGameComment);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchGetMusicSelectionContext);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchGetMusicSelectionContextOfSingleTrack);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchGetContentInfoPath);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchGetContentInfoPathMovieThumb);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchPrepareFile);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchGetContentInfoDeveloperData);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchCancel);
|
|
|
|
|
REG_FUNC(cellSearch, cellSearchEnd);
|
2015-02-22 12:38:14 +01:00
|
|
|
});
|