the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 64 lines 1.8 kB view raw
1#pragma once 2 3 4#include "Common\Network\Sony\sceRemoteStorage\header\sceRemoteStorage.h" 5 6class SonyRemoteStorage_PS3 : public SonyRemoteStorage 7{ 8public: 9 10 11 virtual bool init(CallbackFunc cb, LPVOID lpParam); 12 13 virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam); 14 virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam); 15 16 virtual void abort(); 17 virtual bool setDataInternal(); 18 19 bool isWaitingForTicket() { return m_waitingForTicket; } 20 void npauthhandler(int event, int result, void *arg); 21 22 void SetSecureID(char* id) { memcpy(m_secureFileId, id, CELL_SAVEDATA_SECUREFILEID_SIZE); } 23 24 void CompressSaveData(); 25 bool dataCompressDone() { return (m_compressedSaveState == e_state_Idle);} 26private: 27 int reqId; 28 void * psnTicket; 29 size_t psnTicketSize; 30 bool m_waitingForTicket; 31 bool initialized; 32 SceRemoteStorageStatus* outputGetStatus; 33 SceRemoteStorageData outputGetData; 34 35 enum CompressSaveState 36 { 37 e_state_LoadingSave, 38 e_state_CompressedSave, 39 e_state_SavingSave, 40 e_state_Idle 41 }; 42 43 CompressSaveState m_compressedSaveState; 44 char m_secureFileId[CELL_SAVEDATA_SECUREFILEID_SIZE]; 45 46 int32_t m_lastErrorCode; 47 int m_getDataProgress; 48 int m_setDataProgress; 49 char m_saveFilename[SCE_REMOTE_STORAGE_DATA_NAME_MAX_LEN]; 50 char m_saveFileDesc[SCE_REMOTE_STORAGE_DATA_DESCRIPTION_MAX_LEN]; 51 char m_remoteFilename[SCE_REMOTE_STORAGE_DATA_NAME_MAX_LEN]; 52 int initPreconditions(); 53 static void staticInternalCallback(const SceRemoteStorageEvent event, int32_t retCode, void * userData); 54 void internalCallback(const SceRemoteStorageEvent event, int32_t retCode); 55 56 virtual void runCallback(); 57 58 59 static int SaveCompressCallback(LPVOID lpParam,bool bRes); 60 static int LoadCompressCallback(void *pParam,bool bIsCorrupt, bool bIsOwner); 61 62 63}; 64