|
bool | CreateAutopatcherTables (void) |
|
bool | DestroyAutopatcherTables (void) |
|
bool | AddApplication (const char *applicationName, const char *userName) |
|
bool | RemoveApplication (const char *applicationName) |
|
bool | UpdateApplicationFiles (const char *applicationName, const char *applicationDirectory, const char *userName, FileListProgress *cb) |
|
virtual bool | GetChangelistSinceDate (const char *applicationName, FileList *addedFiles, FileList *deletedFiles, double sinceDate) |
|
virtual bool | GetPatches (const char *applicationName, FileList *input, FileList *patchList) |
|
virtual bool | GetMostRecentChangelistWithPatches (RakNet::RakString &applicationName, FileList *patchedFiles, FileList *updatedFiles, FileList *updatedFileHashes, FileList *deletedFiles, double *priorRowPatchTime, double *mostRecentRowPatchTime) |
|
virtual const char * | GetLastError (void) const |
| If any of the above functions fail, the error string is stored internally. Call this to get it.
|
|
virtual unsigned int | GetFilePart (const char *filename, unsigned int startReadBytes, unsigned int numBytesToRead, void *preallocatedDestination, FileListNodeContext context) |
|
virtual const int | GetIncrementalReadChunkSize (void) const |
|
bool | Connect (const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag) |
| Calls mysql_real_connect with the implicit mySqlConnection.
|
|
void | Disconnect (void) |
| Disconnect from the database.
|
|
bool | IsConnected (void) const |
| Returns if we are connected to the database.
|
|
virtual const char * | GetLastError (void) const |
| If any of the above functions fail, the error string is stored internally. Call this to get it.
|
|
char * | GetLocalTimestamp (void) |
| Returns the result of SELECT LOCALTIMESTAMP.
|
|
An implementation of the AutopatcherRepositoryInterface to use MySQL to store the relevant data
virtual bool RakNet::AutopatcherMySQLRepository::GetMostRecentChangelistWithPatches |
( |
RakNet::RakString & |
applicationName, |
|
|
FileList * |
patchedFiles, |
|
|
FileList * |
updatedFiles, |
|
|
FileList * |
updatedFileHashes, |
|
|
FileList * |
deletedFiles, |
|
|
double * |
priorRowPatchTime, |
|
|
double * |
mostRecentRowPatchTime |
|
) |
| |
|
virtual |
For the most recent update, return files that were patched, added, or deleted. For files that were patched, return both the patch in patchedFiles and the current version in updatedFiles The cache will be used if the client last patched between priorRowPatchTime and mostRecentRowPatchTime No files changed will be returned to the client if the client last patched after mostRecentRowPatchTime
- Parameters
-
[in,out] | applicationName | Name of the application to get patches for. If empty, uses the most recently updated application, and the string will be updated to reflect this name. |
[out] | patchedFiles | Given the most recent update, if a file was patched, add it to this list. The context data for each file will be PC_HASH_WITH_PATCH. The first 4 bytes of data should be a hash of the file being patched. The second 4 bytes should be the hash of the file after the patch. The remaining bytes should be the patch itself. |
[out] | updatedFiles | The current value of the file. List should have the same length and order as patchedFiles |
[out] | updatedFileHashes | The hash of the current value of the file. List should have the same length and order as patchedFiles |
[out] | deletedFiles | Files that were deleted in the last patch. |
[out] | priorRowPatchTime | When the patch before the most recent patch took place. 0 means never. |
[out] | mostRecentRowPatchTime | When the most recent patch took place. 0 means never. |
- Returns
- true on success, false on failure
Implements RakNet::AutopatcherRepositoryInterface.