1 Module name: Remote Shard Saves Module
3 Associated modules: SAVES
5 Syntax: ModulesAdd remote_saves <shard name> <type>
6 - where <shard name> is the name of the shard that the saves are for
7 - where <type> is 'shard' for character saves, guild saves, etc
8 - where <type> is 'www' for mail and forum saves
9 - where <type> is 'bak' for backups
14 h- CRemoteSavesConnection
15 void processMsgRegister(uint32 sender,CMsgSavesRegister& msgBody);
16 void processMsgInit(uint32 sender,CMsgRSInit& msgBody);
17 void processMsgUpdate(uint32 sender,CMsgRSUpdate& msgBody);
18 void processMsgDownload(uint32 sender,CMsgRSDownload& msgBody);
19 void processMsgGenericReply(uint32 sender,CMsgRSGenericReply& msgBody);
21 h- CRemoteSavesManager
23 - CShardSavesInterface
24 ? getOfflineCommandsFileList();
25 - CBackupSavesInterface
27 - treat moduleUp and moduleDown correctly (for connecting to SAVES modules)
28 - manage pending job queue in CRemoteSavesConnectionModule (include management of servide up and service down...)
30 - Add CRemoteSavesInterface specialisation for incremental backups
31 - test the delete file code
32 - If more than one interface requests the same file only one request should be sent out to the remote module (if possible)
37 This is a module to be run on a local machine in order to access shard saves handled
38 by a SAVES module (most likely on another machine)
41 Remote Saves Interface API Classes
42 ----------------------------------
43 CRemoteSavesInterface:
44 CRemoteSavesInterface(shard name,type,subscribe); // ctor - sets subscription destination and mode
45 isReady(); // flag to say whether the interface is connected or not
47 getShardName(); // get shard name as declared at module instantiation
48 getType(); // get shard type as declared at module instantiation
50 addCallbackObject(ISavesCallbackPtr); // setup a callback object to receive request replies
51 removeCallbackObject(TSavesCallbackPtr);
53 requestFile(); // download a file from the server
54 uploadFile(); // upload a file to the server
55 deleteFile(); // delete a file on the server
57 getFileList(); // get the FDC container for the file list as it currently stands
59 CShardSavesInterface (specialisation of CRemoteSavesInterface):
60 getAccountNamesFile(); // get handle to account_names.txt
61 getCharacterNamesFile(); // get handle to character_names.txt
62 getGameCycleFile(); // get handle to game_cycle.ticks file
63 getGMPendingTPFile(); // get handle to gm_pending_tp.bin file
64 getCharacterFileList(); // get the list of character save files
65 getGuildFileList(); // get the list of guild save files
66 getSaleStoreFileList(); // get the list of files for items for sale in the sale store
67 getOfflineCommandsFileList(); // get the list of files for items for sale in the sale store
69 CMailSavesInterface (specialisation of CRemoteSavesInterface):
70 getEntityFileList(entity_name); // get the set of files for a given entity
71 moveEntityFiles(old_name,new_name,overwrite); // move the files for an entity from one folder to another
73 CBackupSavesInterface (specialisation of CRemoteSavesInterface):
74 getCharacterFileList(charcater_name); // get the set of backup files for a given character
75 getGuildFileList(guild_name); // get the list of backup files for a given guild
80 class CRemoteSavesConnection; // an object that represents the connection to a remote CSaves modules
81 class CRemoteSavesManager; // singleton manager class for all of the local CRemoteSavesConnection objects
84 Responsible for instantiating CRemoteSavesConnection modules as required and for preventing more than one
85 such module from being instantiated for any one given target
86 CRemoteSavesConnection objects are instantiated or removed in function of the CRemoteSavesInterface objects that
87 are created or removed
90 registerSavesInterface(CRemoteSavesInterface*)
91 unregisterSavesInterface(CRemoteSavesInterface*)
92 getConnection(shardName,type)
94 CRemoteSavesConnection
95 Responsible for limitting network throttling by GUSes
96 Only allows n save requests to be sent to connected shard saves module at a time (handles a queue for the rest)
99 REMOTE_SAVES Module Messages
100 ----------------------------
101 CMsgRSInit (fileList)
102 CMsgRSUpdate (newFiles,changedFiles,deletedFiles)
103 CMsgRSDownload (requestId,fileName,fileBody)
104 CMsgRSGenericReply (requestId,successFlag,msg)