idstorage: add prototypes in idstorage_int.h and idstorage.h

This commit is contained in:
Clément G 2014-04-30 21:19:44 +02:00
parent 6557cfb975
commit 758158240c
3 changed files with 47 additions and 7 deletions

32
include/idstorage.h Normal file
View File

@ -0,0 +1,32 @@
/** Copyright (C) 2014 The uOFW team
See the file COPYING for copying permission.
*/
#ifndef IDSTORAGE_H
#define IDSTORAGE_H
#include "common_header.h"
typedef void (*sceIdStorageEnumCB)(u16 id, s32 ppn, void *opt);
s32 sceIdStorageInit(void);
s32 sceIdStorageEnd(void);
s32 sceIdStorageGetLeafSize(void);
s32 sceIdStorageIsFormatted(void);
s32 sceIdStorageIsReadOnly(void);
s32 sceIdStorageIsDirty(void);
s32 sceIdStorageFormat(void);
s32 sceIdStorageUnformat(void);
s32 sceIdStorageReadLeaf(u16 id, void *buf);
s32 sceIdStorageWriteLeaf(u16 id, void *buf);
s32 sceIdStorageFlush(void);
s32 sceIdStorageGetFreeLeaves(void);
s32 sceIdStorageEnumId(sceIdStorageEnumCB cb, void *opt);
s32 sceIdStorageCreateLeaf(u16 id);
s32 sceIdStorageCreateAtomicLeaves(u16 *ids, s32 size);
s32 sceIdStorageDeleteLeaf(u16 id);
s32 sceIdStorageLookup(u16 id, u32 offset, void *buf, u32 len);
s32 sceIdStorageUpdate(u16 id, u32 offset, void *buf, u32 len);
#endif /* IDSTORAGE_H */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011, 2012, 2013, 2014 The uOFW team
/* Copyright (C) 2014 The uOFW team
See the file COPYING for copying permission.
*/
@ -7,6 +7,7 @@
*/
#include "idstorage_int.h"
#include <common_imp.h>
#include <lowio_sysreg.h>
#include <lowio_nand.h>
#include <sysmem_sysevent.h>
@ -16,8 +17,6 @@
#include <usersystemlib_kernel.h>
#include <modulemgr.h>
static s32 _sceIdStorageSysEventHandler(s32 id, char* name, void *param, s32 *res);
SCE_MODULE_INFO(
"sceIdStorage_Service",
SCE_MODULE_KERNEL |
@ -652,7 +651,7 @@ s32 sceIdStorageWriteLeaf(u16 id, void *buf)
}
//0xCC8
s32 _sceIdStorageFlushCB(void *arg)
static s32 _sceIdStorageFlushCB(void *arg)
{
(void)arg;
u16 index[512]; //sp+0
@ -880,7 +879,7 @@ s32 sceIdStorageGetFreeLeaves(void)
return count;
}
s32 sceIdStorageEnumId(void (*cb)(u16 id, s32 ppn, void *opt), void *opt)
s32 sceIdStorageEnumId(sceIdStorageEnumCB cb, void *opt)
{
s32 res;
s32 i;

View File

@ -2,6 +2,15 @@
See the file COPYING for copying permission.
*/
//#include <idstorage.h>
#include <common_imp.h>
#include <idstorage.h>
static s32 _sceIdStorageSysEventHandler(s32 id, char* name, void *param, s32 *res);
static s32 _sceIdStorageLockMutex(void);
static s32 _sceIdStorageUnlockMutex(void);
static s32 _sceIdStorageFindFreeBlock(void);
static s32 _sceIdStorageFindKeyPos(u16 id);
static s32 _sceIdStorageKeyStoreFind(u16 id);
static s32 _sceIdStorageKeyStoreInsert(u16 id);
static s32 _sceIdStorageKeyStoreClear(void);
static s32 _sceIdStorageFlushCB(void *arg);