Commands.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /******************************************************************************/
  2. /******************************************************************************/
  3. void ClientSendVersion(Connection &conn);
  4. bool ServerRecvVersion(File &f);
  5. void ServerSendVersion(Connection &conn, bool ok);
  6. bool ClientRecvVersion(File &f);
  7. void ClientSendLogin(Connection &conn, C Str &email, C Str &pass, C Str &license_key, OS_VER os_ver);
  8. void ServerRecvLogin(File &f, Str &email, UID &pass, Str &license_key, OS_VER &os_ver);
  9. void ServerSendLogin(Connection &conn, LOGIN_RESULT result, USER_ACCESS access);
  10. void ClientRecvLogin(File &f, LOGIN_RESULT &result, USER_ACCESS &access);
  11. void ClientSendRegister(Connection &conn, C Str &email, C Str &pass, C Str &name);
  12. void ServerRecvRegister(File &f, Str &email, UID &pass, Str &name);
  13. void ServerSendRegister(Connection &conn, REGISTER_RESULT result);
  14. void ClientRecvRegister(File &f, REGISTER_RESULT &result);
  15. void ClientSendForgotPass(Connection &conn, C Str &email);
  16. void ServerRecvForgotPass(File &f, Str &email);
  17. void ServerSendForgotPass(Connection &conn, FORGOT_PASS_RESULT result);
  18. void ClientRecvForgotPass(File &f, FORGOT_PASS_RESULT &result);
  19. void ClientSendChangePass(Connection &conn, C Str &email, C Str &new_pass, C Str &old_pass, uint change_pass_key=0);
  20. void ServerRecvChangePass(File &f, Str &email, UID &new_pass, UID &old_pass, uint &change_pass_key);
  21. void ServerSendChangePass(Connection &conn, CHANGE_PASS_RESULT result);
  22. void ClientRecvChangePass(File &f, CHANGE_PASS_RESULT &result);
  23. void ClientSendLicenseKey(Connection &conn, C Str &license_key);
  24. void ServerRecvLicenseKey(File &f, Str &license_key);
  25. void ClientSendProjectsListRequest(Connection &conn);
  26. void ServerSendProjectsList(Connection &conn, Memx<Project> &projects);
  27. bool ClientRecvProjectsList(File &f, Memx<Project> &projects);
  28. void ClientSendProjectOpen(Connection &conn, C UID &proj_id, C Str &proj_name);
  29. void ServerRecvProjectOpen(File &f, UID &proj_id, Str &proj_name);
  30. void ClientSendGetProjectData(Connection &conn);
  31. bool ServerSendProjectData(Connection &conn, Project &project);
  32. bool ClientRecvProjectData(File &f, Project &project);
  33. void ClientSendProjectSettings(Connection &conn, Project &project);
  34. bool ServerRecvProjectSettings(File &f, Project &project);
  35. void ServerWriteProjectSettings(File &f, Project &project);
  36. bool ClientRecvProjectSettings(File &f, Project &project);
  37. void ClientSendNewElm(Connection &conn, Elm &elm);
  38. void ServerRecvNewElm(File &f, Elm &elm);
  39. void ServerWriteNewElm(File &f, Elm &elm, C UID &proj_id);
  40. void ClientRecvNewElm(File &f, Elm &elm, UID &proj_id);
  41. void ClientSendRenameElm(Connection &conn, C UID &elm_id, C Str &name, C TimeStamp &name_time);
  42. void ServerRecvRenameElm(File &f, UID &elm_id, Str &name, TimeStamp &name_time);
  43. void ServerWriteRenameElm(File &f, C UID &elm_id, C Str &name, C TimeStamp &name_time, C UID &proj_id);
  44. void ClientRecvRenameElm(File &f, UID &elm_id, Str &name, TimeStamp &name_time, UID &proj_id);
  45. void ClientSendSetElmParent(Connection &conn, C UID &elm_id, C UID &parent_id, C TimeStamp &parent_time);
  46. void ServerRecvSetElmParent(File &f, UID &elm_id, UID &parent_id, TimeStamp &parent_time);
  47. void ServerWriteSetElmParent(File &f, C UID &elm_id, C UID &parent_id, C TimeStamp &parent_time, C UID &proj_id);
  48. void ClientRecvSetElmParent(File &f, UID &elm_id, UID &parent_id, TimeStamp &parent_time, UID &proj_id);
  49. void ClientSendRemoveElms(Connection &conn, Memc<UID> &elm_ids, bool removed, C TimeStamp &removed_time);
  50. void ServerRecvRemoveElms(File &f, Memc<UID> &elm_ids, bool &removed, TimeStamp &removed_time);
  51. void ServerWriteRemoveElms(File &f, Memc<UID> &elm_ids, bool removed, C TimeStamp &removed_time, C UID &proj_id);
  52. void ClientRecvRemoveElms(File &f, Memc<UID> &elm_ids, bool &removed, TimeStamp &removed_time, UID &proj_id);
  53. void ClientSendNoPublishElms(Connection &conn, Memc<UID> &elm_ids, bool no_publish, C TimeStamp &no_publish_time);
  54. void ServerRecvNoPublishElms(File &f, Memc<UID> &elm_ids, bool &no_publish, TimeStamp &no_publish_time);
  55. void ServerWriteNoPublishElms(File &f, Memc<UID> &elm_ids, bool no_publish, C TimeStamp &no_publish_time, C UID &proj_id);
  56. void ClientRecvNoPublishElms(File &f, Memc<UID> &elm_ids, bool &no_publish, TimeStamp &no_publish_time, UID &proj_id);
  57. void ClientSendGetElmNames(Connection &conn, Memc<UID> &elm_ids);
  58. void ServerRecvGetElmNames(File &f, Memc<UID> &elm_ids);
  59. void ServerSendGetElmNames(Connection &conn, Memc<ElmName> &elm_names, C UID &proj_id);
  60. void ClientRecvGetElmNames(File &f, Memc<ElmName> &elm_names, UID &proj_id);
  61. void ClientSendGetTextures(Connection &conn, Memc<UID> &tex_ids);
  62. void ServerRecvGetTextures(File &f, Memc<UID> &tex_ids);
  63. bool ClientWriteSetTexture(File &f, C UID &tex_id, File &tex_data);
  64. void ServerRecvSetTexture(File &f, UID &tex_id, File &cmpr_tex_data);
  65. void ServerWriteSetTexture(File &f, C UID &tex_id, File &cmpr_tex_data, C UID &proj_id);
  66. bool ClientRecvSetTexture(File &f, UID &tex_id, File &tex_data, UID &proj_id);
  67. void ClientSendGetElmShort(Connection &conn, Memc<UID> &elm_ids);
  68. void ServerRecvGetElmShort(File &f, Memc<UID> &elm_ids);
  69. void ClientSendSetElmShort(Connection &conn, Elm &elm, C Project &proj);
  70. bool ServerRecvSetElmShort(File &f, Elm &elm, File &data);
  71. void ServerWriteSetElmShort(File &f, Elm &elm, C Project &proj);
  72. bool ClientRecvSetElmShort(File &f, Elm &elm, File &data, UID &proj_id);
  73. void ClientSendGetElmLong(Connection &conn, Memc<UID> &elm_ids);
  74. void ServerRecvGetElmLong(File &f, Memc<UID> &elm_ids);
  75. void ClientWriteSetElmLong(File &elm_file, File &data_file, Elm &elm, Project &proj, bool &compress);
  76. bool ServerRecvSetElmLong(File &f, Elm &elm, File &data, File &extra);
  77. void ServerWriteSetElmLong(File &f, Elm &elm, C Project &proj);
  78. bool ClientRecvSetElmLong(File &f, Elm &elm, File &data, File &extra, UID &proj_id);
  79. void ClientWriteSetElmFull(File &elm_file, File &data_file, Elm &elm, Project &proj, bool &compress);
  80. bool ServerRecvSetElmFull(File &f, Elm &elm, File &data, File &extra);
  81. void ServerWriteSetElmFull(File &f, Elm &elm, C Project &proj);
  82. bool ClientRecvSetElmFull(File &f, Elm &elm, File &data, File &extra, UID &proj_id);
  83. void ClientSendGetWorldVer(Connection &conn, C UID &world_id);
  84. void ServerRecvGetWorldVer(File &f, UID &world_id);
  85. void ServerSendGetWorldVer(Connection &conn, WorldVer *world_ver, C UID &world_id, C UID &proj_id);
  86. void ClientRecvGetWorldVer(File &f, WorldVer &world_ver, UID &world_id, UID &proj_id);
  87. void ClientSendGetWorldAreas(Connection &conn, C UID &world_id, Memc<AreaSync> &areas);
  88. void ServerRecvGetWorldAreas(File &f, UID &world_id, Memc<AreaSync> &areas);
  89. void WriteSetWorldArea(File &f, C UID &world_id, C VecI2 &area_xy, byte area_sync_flag, C AreaVer &ver, C Heightmap *hm, C Memc<ObjData> &objs, C Str &edit_path);
  90. bool RecvSetWorldArea(File &f, UID &world_id, VecI2 &area_xy, byte &area_sync_flag, AreaVer &ver, Heightmap &hm, Memc<ObjData> &objs, C Str &game_path, C Str &edit_path);
  91. void ClientWriteSetWorldArea(File &elm, File &data, C UID &world_id, C VecI2 &area_xy, byte area_sync_flag, C AreaVer &ver, C Heightmap *hm);
  92. bool ServerRecvSetWorldArea(File &f, UID &world_id, VecI2 &area_xy, byte &area_sync_flag, AreaVer &ver, Heightmap &hm, C Str &game_path, C Str &edit_path);
  93. void ServerSendSetWorldArea(Connection &conn, C UID &world_id, C VecI2 &area_xy, byte area_sync_flag, C AreaVer &ver, C Heightmap *hm, Memc<ObjData> &objs, C UID &proj_id, C Str &edit_path);
  94. bool ClientRecvSetWorldArea(File &f, UID &world_id, VecI2 &area_xy, byte &area_sync_flag, AreaVer &ver, Heightmap &hm, Memc<ObjData> &objs, UID &proj_id, C Str &game_path, C Str &edit_path);
  95. void ClientWriteSetWorldObjs(File &elm, File &data, C UID &world_id, C VecI2 &area_xy, Memc<ObjData> &objs, C Str &edit_path);
  96. bool ServerRecvSetWorldObjs(File &f, UID &world_id, VecI2 &area_xy, Memc<ObjData> &objs, C Str &edit_path);
  97. void ServerWriteSetWorldObjs(File &f, C UID &world_id, C VecI2 &area_xy, Memc<ObjData> &objs, C Str &edit_path, C UID &proj_id);
  98. bool ClientRecvSetWorldObjs(File &f, UID &world_id, VecI2 &area_xy, Memc<ObjData> &objs, C Str &edit_path, UID &proj_id);
  99. void ClientSendGetWorldWaypoints(Connection &conn, C UID &world_id, Memc<UID> &waypoints);
  100. void ServerRecvGetWorldWaypoints(File &f, UID &world_id, Memc<UID> &waypoints);
  101. void ClientSendSetWorldWaypoint(Connection &conn, C UID &world_id, C UID &waypoint_id, C Version &waypoint_ver, EditWaypoint &waypoint);
  102. bool ServerRecvSetWorldWaypoint(File &f, UID &world_id, UID &waypoint_id, Version &waypoint_ver, EditWaypoint &waypoint);
  103. void ServerWriteSetWorldWaypoint(File &f, C UID &world_id, C UID &waypoint_id, C Version &waypoint_ver, EditWaypoint &waypoint, C UID &proj_id);
  104. bool ClientRecvSetWorldWaypoint(File &f, UID &world_id, UID &waypoint_id, Version &waypoint_ver, EditWaypoint &waypoint, UID &proj_id);
  105. void ClientSendGetWorldLakes(Connection &conn, C UID &world_id, Memc<UID> &lakes);
  106. void ServerRecvGetWorldLakes(File &f, UID &world_id, Memc<UID> &lakes);
  107. void ClientSendSetWorldLake(Connection &conn, C UID &world_id, C UID &lake_id, C Version &lake_ver, Lake &lake);
  108. bool ServerRecvSetWorldLake(File &f, UID &world_id, UID &lake_id, Version &lake_ver, Lake &lake);
  109. void ServerWriteSetWorldLake(File &f, C UID &world_id, C UID &lake_id, C Version &lake_ver, Lake &lake, C UID &proj_id);
  110. bool ClientRecvSetWorldLake(File &f, UID &world_id, UID &lake_id, Version &lake_ver, Lake &lake, UID &proj_id);
  111. void ClientSendGetWorldRivers(Connection &conn, C UID &world_id, Memc<UID> &rivers);
  112. void ServerRecvGetWorldRivers(File &f, UID &world_id, Memc<UID> &rivers);
  113. void ClientSendSetWorldRiver(Connection &conn, C UID &world_id, C UID &river_id, C Version &river_ver, River &river);
  114. bool ServerRecvSetWorldRiver(File &f, UID &world_id, UID &river_id, Version &river_ver, River &river);
  115. void ServerWriteSetWorldRiver(File &f, C UID &world_id, C UID &river_id, C Version &river_ver, River &river, C UID &proj_id);
  116. bool ClientRecvSetWorldRiver(File &f, UID &world_id, UID &river_id, Version &river_ver, River &river, UID &proj_id);
  117. void ClientSendGetMiniMapVer(Connection &conn, C UID &mini_map_id);
  118. void ServerRecvGetMiniMapVer(File &f, UID &mini_map_id);
  119. void ServerSendGetMiniMapVer(Connection &conn, MiniMapVer *mini_map_ver, C UID &mini_map_id, C UID &proj_id);
  120. void ClientRecvGetMiniMapVer(File &f, MiniMapVer &mini_map_ver, UID &mini_map_id, UID &proj_id);
  121. void ClientSendGetMiniMapImages(Connection &conn, C UID &mini_map_id, Memc<VecI2> &images);
  122. void ServerRecvGetMiniMapImages(File &f, UID &mini_map_id, Memc<VecI2> &images);
  123. void ClientSendSetMiniMapSettings(Connection &conn, C UID &mini_map_id, C Game::MiniMap::Settings &settings, C TimeStamp &settings_time);
  124. bool ServerRecvSetMiniMapSettings(File &f, UID &mini_map_id, Game::MiniMap::Settings &settings, TimeStamp &settings_time);
  125. void ServerWriteSetMiniMapSettings(File &f, C UID &mini_map_id, C Game::MiniMap::Settings &settings, C TimeStamp &settings_time, C UID &proj_id);
  126. bool ClientRecvSetMiniMapSettings(File &f, UID &mini_map_id, Game::MiniMap::Settings &settings, TimeStamp &settings_time, UID &proj_id);
  127. void ServerSendSetMiniMapImage(Connection &conn, C UID &mini_map_id, C VecI2 &image_xy, C TimeStamp &image_time, File &cmpr_image_data, C UID &proj_id);
  128. bool ClientRecvSetMiniMapImage(File &f, UID &mini_map_id, VecI2 &image_xy, TimeStamp &image_time, File &image_data, UID &proj_id);
  129. void ClientWriteSetMiniMapImage(File &elm, File &data, C UID &mini_map_id, C VecI2 &image_xy, C TimeStamp &image_time, File &image_data);
  130. bool ServerRecvSetMiniMapImage(File &f, UID &mini_map_id, VecI2 &image_xy, TimeStamp &image_time, bool &image_is, File &cmpr_image_data);
  131. void ClientSendGetCodeVer(Connection &conn, Memc<ElmTypeVer> &elms);
  132. bool ServerRecvGetCodeVer(File &f, Memc<ElmTypeVer> &elms);
  133. void ServerSendSetCodeData(Connection &conn, C Memc<ElmCodeData> &elms, C UID &proj_id);
  134. bool ClientRecvSetCodeData(File &f, Memc<ElmCodeData> &elms, UID &proj_id);
  135. void ClientSendSetCodeData(Connection &conn, C Memc<ElmCodeData> &elms);
  136. bool ServerRecvSetCodeData(File &f, Memc<ElmCodeData> &elms);
  137. void ServerSendCodeSyncStatus(Connection &conn, C Memc<ElmCodeBase> &elms, bool resync, C UID &proj_id);
  138. bool ClientRecvCodeSyncStatus(File &f, Memc<ElmCodeBase> &elms, bool &resync, UID &proj_id);
  139. /******************************************************************************/