Cleanup demonware services

This commit is contained in:
momo5502 2023-04-02 09:23:45 +02:00
parent 89103ed672
commit 5ed2da8553
31 changed files with 218 additions and 222 deletions

View File

@ -123,10 +123,10 @@ namespace demonware
if (!this->error_) if (!this->error_)
{ {
buffer.write_uint32(uint32_t(this->objects_.size())); buffer.write_uint32(static_cast<uint32_t>(this->objects_.size()));
if (!this->objects_.empty()) if (!this->objects_.empty())
{ {
buffer.write_uint32(uint32_t(this->objects_.size())); buffer.write_uint32(static_cast<uint32_t>(this->objects_.size()));
for (auto& object : this->objects_) for (auto& object : this->objects_)
{ {
@ -145,20 +145,17 @@ namespace demonware
return transaction_id; return transaction_id;
} }
void add(const std::shared_ptr<bdTaskResult>& object) template<typename T>
void add(std::unique_ptr<T>& object)
{ {
this->objects_.push_back(object); static_assert(std::is_base_of_v<bdTaskResult, T>);
} this->objects_.emplace_back(std::move(object));
void add(bdTaskResult* object)
{
this->add(std::shared_ptr<bdTaskResult>(object));
} }
private: private:
uint8_t type_; uint8_t type_;
uint32_t error_; uint32_t error_;
remote_reply reply_; remote_reply reply_;
std::vector<std::shared_ptr<bdTaskResult>> objects_; std::vector<std::unique_ptr<bdTaskResult>> objects_;
}; };
} }

View File

@ -180,7 +180,7 @@ namespace demonware
uint8_t task_id; uint8_t task_id;
buffer.read_ubyte(&task_id); buffer.read_ubyte(&task_id);
this->create_reply(task_id)->send(); this->create_reply(task_id).send();
} }
} }
} }

View File

@ -9,17 +9,15 @@ namespace demonware
public: public:
virtual ~service_server() = default; virtual ~service_server() = default;
virtual std::shared_ptr<remote_reply> create_message(uint8_t type) virtual remote_reply create_message(uint8_t type)
{ {
auto reply = std::make_shared<remote_reply>(this, type); return remote_reply{this, type};
return reply;
} }
virtual std::shared_ptr<service_reply> create_reply(uint8_t type, uint32_t error = 0) virtual service_reply create_reply(uint8_t type, uint32_t error = 0)
{ {
auto reply = std::make_shared<service_reply>(this, type, error); return service_reply{this, type, error};
return reply;
} }
virtual void send_reply(reply* data) = 0; virtual void send_reply(reply* data) = 0;

View File

@ -62,7 +62,7 @@ namespace demonware
printf("[DW] %s: missing task '%d'\n", name_.data(), this->task_id_); printf("[DW] %s: missing task '%d'\n", name_.data(), this->task_id_);
// return no error // return no error
server->create_reply(this->task_id_)->send(); server->create_reply(this->task_id_).send();
} }
} }

View File

@ -16,34 +16,34 @@ namespace demonware
{ {
// TODO: Read data as soon as needed // TODO: Read data as soon as needed
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdAnticheat::reportConsoleID(service_server* server, byte_buffer* /*buffer*/) const void bdAnticheat::reportConsoleID(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: Read data as soon as needed // TODO: Read data as soon as needed
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdAnticheat::reportConsoleDetails(service_server* server, byte_buffer* /*buffer*/) const void bdAnticheat::reportConsoleDetails(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: Read data as soon as needed // TODO: Read data as soon as needed
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdAnticheat::answerTOTPChallenge(service_server* server, byte_buffer* /*buffer*/) const void bdAnticheat::answerTOTPChallenge(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: Read data as soon as needed // TODO: Read data as soon as needed
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdAnticheat::idk(service_server* server, byte_buffer* /*buffer*/) const void bdAnticheat::idk(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: Read data as soon as needed // TODO: Read data as soon as needed
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -22,6 +22,6 @@ namespace demonware
buffer.write(sizeof bandwidth_iw6, bandwidth_iw6); buffer.write(sizeof bandwidth_iw6, bandwidth_iw6);
auto reply = server->create_message(5); auto reply = server->create_message(5);
reply->send(&buffer, true); reply.send(&buffer, true);
} }
} }

View File

@ -14,7 +14,7 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdContentStreaming::list_all_publisher_files(service_server* server, byte_buffer* buffer) const void bdContentStreaming::list_all_publisher_files(service_server* server, byte_buffer* buffer) const
@ -36,11 +36,11 @@ namespace demonware
/*if(filename.empty()) /*if(filename.empty())
{ {
server->create_reply(this->task_id(), game::BD_NO_FILE)->send(); server->create_reply(this->task_id(), game::BD_NO_FILE).send();
return; return;
}*/ }*/
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -13,13 +13,13 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdCounter::getCounterTotals(service_server* server, byte_buffer* /*buffer*/) const void bdCounter::getCounterTotals(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -13,17 +13,17 @@ namespace demonware
uint32_t count; uint32_t count;
buffer->read_uint32(&count); buffer->read_uint32(&count);
const auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
for (uint32_t i = 0; i < count; i++) for (uint32_t i = 0; i < count; i++)
{ {
auto* checksum = new bdDDLChecksumResult; auto checksum = std::make_unique<bdDDLChecksumResult>();
checksum->deserialize(buffer); checksum->deserialize(buffer);
checksum->checksum_matched = true; checksum->checksum_matched = true;
reply->add(checksum); reply.add(checksum);
} }
reply->send(); reply.send();
} }
} }

View File

@ -15,12 +15,12 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdDML::getUserData(service_server* server, byte_buffer* /*buffer*/) const void bdDML::getUserData(service_server* server, byte_buffer* /*buffer*/) const
{ {
auto result = new bdDMLRawData; auto result = std::make_unique<bdDMLRawData>();
result->country_code = "US"; result->country_code = "US";
result->country_code = "'Murica"; result->country_code = "'Murica";
result->region = "New York"; result->region = "New York";
@ -32,21 +32,21 @@ namespace demonware
result->timezone = "+01:00"; result->timezone = "+01:00";
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->add(result); reply.add(result);
reply->send(); reply.send();
} }
void bdDML::getUserHierarchicalData(service_server* server, byte_buffer* /*buffer*/) const void bdDML::getUserHierarchicalData(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdDML::getUsersLastLogonData(service_server* server, byte_buffer* /*buffer*/) const void bdDML::getUsersLastLogonData(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -16,34 +16,34 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdEventLog::recordEventBin(service_server* server, byte_buffer* /*buffer*/) const void bdEventLog::recordEventBin(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdEventLog::recordEvents(service_server* server, byte_buffer* /*buffer*/) const void bdEventLog::recordEvents(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdEventLog::recordEventsBin(service_server* server, byte_buffer* /*buffer*/) const void bdEventLog::recordEventsBin(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdEventLog::initializeFiltering(service_server* server, byte_buffer* /*buffer*/) const void bdEventLog::initializeFiltering(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -24,90 +24,90 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::post(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::post(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::unregisterAccount(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::unregisterAccount(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::isRegistered(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::isRegistered(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::getInfo(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::getInfo(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::getRegisteredAccounts(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::getRegisteredAccounts(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::getFriends(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::getFriends(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::getProfilePictures(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::getProfilePictures(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::uploadPhoto(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::uploadPhoto(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::registerToken(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::registerToken(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::uploadVideo(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::uploadVideo(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::getFriendsByID(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::getFriendsByID(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdFacebook::setLikeStatus(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::setLikeStatus(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -15,27 +15,27 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdGroup::setGroupsForEntity(service_server* server, byte_buffer* /*buffer*/) const void bdGroup::setGroupsForEntity(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdGroup::getEntityGroups(service_server* server, byte_buffer* /*buffer*/) const void bdGroup::getEntityGroups(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdGroup::getGroupCounts(service_server* server, byte_buffer* /*buffer*/) const void bdGroup::getGroupCounts(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -22,76 +22,76 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague::getTeamIDsForUser(service_server* server, byte_buffer* /*buffer*/) const void bdLeague::getTeamIDsForUser(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague::getTeamSubdivisions(service_server* server, byte_buffer* /*buffer*/) const void bdLeague::getTeamSubdivisions(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague::setTeamName(service_server* server, byte_buffer* /*buffer*/) const void bdLeague::setTeamName(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague::setTeamIcon(service_server* server, byte_buffer* /*buffer*/) const void bdLeague::setTeamIcon(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague::getTeamInfos(service_server* server, byte_buffer* /*buffer*/) const void bdLeague::getTeamInfos(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague::getTeamLeaguesAndSubdivisions(service_server* server, byte_buffer* /*buffer*/) const void bdLeague::getTeamLeaguesAndSubdivisions(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague::getTeamMemberInfos(service_server* server, byte_buffer* /*buffer*/) const void bdLeague::getTeamMemberInfos(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague::incrementGamesPlayedCount(service_server* server, byte_buffer* /*buffer*/) const void bdLeague::incrementGamesPlayedCount(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague::getSubdivisionInfos(service_server* server, byte_buffer* /*buffer*/) const void bdLeague::getSubdivisionInfos(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague::getTeamSubdivisionHistory(service_server* server, byte_buffer* /*buffer*/) const void bdLeague::getTeamSubdivisionHistory(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -15,27 +15,27 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague2::readStatsByTeamID(service_server* server, byte_buffer* /*buffer*/) const void bdLeague2::readStatsByTeamID(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague2::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const void bdLeague2::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdLeague2::readStatsByPivot(service_server* server, byte_buffer* /*buffer*/) const void bdLeague2::readStatsByPivot(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -13,13 +13,13 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMarketingComms::reportFullMessagesViewed(service_server* server, byte_buffer* /*buffer*/) const void bdMarketingComms::reportFullMessagesViewed(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -22,35 +22,35 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMarketplace::purchaseOnSteamInitialize(service_server* server, byte_buffer* buffer) const void bdMarketplace::purchaseOnSteamInitialize(service_server* server, byte_buffer* buffer) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMarketplace::getExpiredInventoryItems(service_server* server, byte_buffer* /*buffer*/) const void bdMarketplace::getExpiredInventoryItems(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMarketplace::steamProcessDurable(service_server* server, byte_buffer* /*buffer*/) const void bdMarketplace::steamProcessDurable(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMarketplace::purchaseSkus(service_server* server, byte_buffer* buffer) const void bdMarketplace::purchaseSkus(service_server* server, byte_buffer* buffer) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMarketplace::getBalance(service_server* server, byte_buffer* buffer) const void bdMarketplace::getBalance(service_server* server, byte_buffer* buffer) const
@ -58,27 +58,27 @@ namespace demonware
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMarketplace::getInventoryPaginated(service_server* server, byte_buffer* /*buffer*/) const void bdMarketplace::getInventoryPaginated(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMarketplace::putPlayersInventoryItems(service_server* server, byte_buffer* /*buffer*/) const void bdMarketplace::putPlayersInventoryItems(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMarketplace::getEntitlements(service_server* server, byte_buffer* /*buffer*/) const void bdMarketplace::getEntitlements(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -15,12 +15,12 @@ namespace demonware
void bdMatchMaking::create_session(service_server* server, byte_buffer* /*buffer*/) const void bdMatchMaking::create_session(service_server* server, byte_buffer* /*buffer*/) const
{ {
auto* id = new bdSessionID; auto id = std::make_unique<bdSessionID>();
id->session_id = steam::SteamUser()->GetSteamID().bits; id->session_id = steam::SteamUser()->GetSteamID().bits;
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->add(id); reply.add(id);
reply->send(); reply.send();
} }
void bdMatchMaking::update_session(service_server* server, byte_buffer* buffer) const void bdMatchMaking::update_session(service_server* server, byte_buffer* buffer) const
@ -38,7 +38,7 @@ namespace demonware
addr.deserialize(&addr_buf);*/ addr.deserialize(&addr_buf);*/
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMatchMaking::delete_session(service_server* server, byte_buffer* buffer) const void bdMatchMaking::delete_session(service_server* server, byte_buffer* buffer) const
@ -50,18 +50,18 @@ namespace demonware
id.serialize(&out_data); id.serialize(&out_data);
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdMatchMaking::get_performance(service_server* server, byte_buffer* /*buffer*/) const void bdMatchMaking::get_performance(service_server* server, byte_buffer* /*buffer*/) const
{ {
auto* result = new bdPerformanceValue; auto result = std::make_unique<bdPerformanceValue>();
result->user_id = steam::SteamUser()->GetSteamID().bits; result->user_id = steam::SteamUser()->GetSteamID().bits;
result->performance = 10; result->performance = 10;
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->add(result); reply.add(result);
reply->send(); reply.send();
} }
void bdMatchMaking::find_sessions(service_server* server, byte_buffer* /*buffer*/) const void bdMatchMaking::find_sessions(service_server* server, byte_buffer* /*buffer*/) const
@ -70,9 +70,9 @@ namespace demonware
//for (auto& session : sessions) //for (auto& session : sessions)
{ {
//reply->add(session.second); //reply.add(session.second);
} }
reply->send(); reply.send();
} }
} }

View File

@ -13,13 +13,13 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdPresence::unk3(service_server* server, byte_buffer* /*buffer*/) const void bdPresence::unk3(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -35,15 +35,15 @@ namespace demonware
for(auto& info : profile_infos) for(auto& info : profile_infos)
{ {
auto* result = new bdPublicProfileInfo; auto result = std::make_unique<bdPublicProfileInfo>();
result->m_entityID = info.first; result->m_entityID = info.first;
result->m_VERSION = info.second.version; result->m_VERSION = info.second.version;
result->m_ddl = std::move(info.second.ddl); result->m_ddl = std::move(info.second.ddl);
reply->add(result); reply.add(result);
} }
reply->send(); reply.send();
} }
void bdProfiles::setPublicInfo(service_server* server, byte_buffer* buffer) const void bdProfiles::setPublicInfo(service_server* server, byte_buffer* buffer) const
@ -56,48 +56,48 @@ namespace demonware
profile_infos::update_profile_info(info); profile_infos::update_profile_info(info);
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdProfiles::getPrivateInfo(service_server* server, byte_buffer* /*buffer*/) const void bdProfiles::getPrivateInfo(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdProfiles::setPrivateInfo(service_server* server, byte_buffer* /*buffer*/) const void bdProfiles::setPrivateInfo(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdProfiles::deleteProfile(service_server* server, byte_buffer* /*buffer*/) const void bdProfiles::deleteProfile(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdProfiles::setPrivateInfoByUserID(service_server* server, byte_buffer* /*buffer*/) const void bdProfiles::setPrivateInfoByUserID(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdProfiles::getPrivateInfoByUserID(service_server* server, byte_buffer* /*buffer*/) const void bdProfiles::getPrivateInfoByUserID(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdProfiles::setPublicInfoByUserID(service_server* server, byte_buffer* /*buffer*/) const void bdProfiles::setPublicInfoByUserID(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -12,6 +12,6 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -15,27 +15,27 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdReward::claimRewardRoll(service_server* server, byte_buffer* /*buffer*/) const void bdReward::claimRewardRoll(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdReward::claimClientAchievements(service_server* server, byte_buffer* /*buffer*/) const void bdReward::claimClientAchievements(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdReward::reportRewardEvents(service_server* server, byte_buffer* /*buffer*/) const void bdReward::reportRewardEvents(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -13,13 +13,13 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdRichPresence::getInfo(service_server* server, byte_buffer* /*buffer*/) const void bdRichPresence::getInfo(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -24,90 +24,90 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::deleteStats(service_server* server, byte_buffer* /*buffer*/) const void bdStats::deleteStats(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::unk3(service_server* server, byte_buffer* /*buffer*/) const void bdStats::unk3(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::readStatsByPivot(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readStatsByPivot(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::readStatsByRating(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readStatsByRating(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::readStatsByMultipleRanks(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readStatsByMultipleRanks(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::readExternalTitleStats(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readExternalTitleStats(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::readExternalTitleNamedStats(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readExternalTitleNamedStats(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::readStatsByLeaderboardIDsAndEntityIDs(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readStatsByLeaderboardIDsAndEntityIDs(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::readStatsByMultipleRatings(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readStatsByMultipleRatings(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::readStatsByEntityID(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readStatsByEntityID(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats::writeServerValidatedStats(service_server* server, byte_buffer* /*buffer*/) const void bdStats::writeServerValidatedStats(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -13,13 +13,13 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats2::writeArbitratedStats(service_server* server, byte_buffer* /*buffer*/) const void bdStats2::writeArbitratedStats(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -18,48 +18,48 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats3::readStatsByEntityID(service_server* server, byte_buffer* /*buffer*/) const void bdStats3::readStatsByEntityID(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats3::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const void bdStats3::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats3::readStatsByPivot(service_server* server, byte_buffer* /*buffer*/) const void bdStats3::readStatsByPivot(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats3::readStatsByRating(service_server* server, byte_buffer* /*buffer*/) const void bdStats3::readStatsByRating(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats3::readStatsByMultipleRanks(service_server* server, byte_buffer* /*buffer*/) const void bdStats3::readStatsByMultipleRanks(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdStats3::readStatsByLeaderboardIDsAndEntityIDs(service_server* server, byte_buffer* /*buffer*/) const void bdStats3::readStatsByLeaderboardIDsAndEntityIDs(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -96,7 +96,7 @@ namespace demonware
if (this->load_publisher_resource(filename, data)) if (this->load_publisher_resource(filename, data))
{ {
auto* info = new bdFileInfo; auto info = std::make_unique<bdFileInfo>();
info->file_id = *reinterpret_cast<const uint64_t*>(utils::cryptography::sha1::compute(filename).data()); info->file_id = *reinterpret_cast<const uint64_t*>(utils::cryptography::sha1::compute(filename).data());
info->filename = filename; info->filename = filename;
@ -106,10 +106,10 @@ namespace demonware
info->owner_id = 0; info->owner_id = 0;
info->priv = false; info->priv = false;
reply->add(info); reply.add(info);
} }
reply->send(); reply.send();
} }
void bdStorage::get_publisher_file(service_server* server, byte_buffer* buffer) void bdStorage::get_publisher_file(service_server* server, byte_buffer* buffer)
@ -131,12 +131,13 @@ namespace demonware
#endif #endif
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->add(new bdFileData(data)); auto result = std::make_unique<bdFileData>(data);
reply->send(); reply.add(result);
reply.send();
} }
else else
{ {
server->create_reply(this->task_id(), game::BD_NO_FILE)->send(); server->create_reply(this->task_id(), game::BD_NO_FILE).send();
} }
} }
@ -155,7 +156,7 @@ namespace demonware
const auto path = get_user_file_path(filename); const auto path = get_user_file_path(filename);
utils::io::write_file(path, data); utils::io::write_file(path, data);
auto* info = new bdFileInfo; auto info = std::make_unique<bdFileInfo>();
info->file_id = *reinterpret_cast<const uint64_t*>(utils::cryptography::sha1::compute(filename).data()); info->file_id = *reinterpret_cast<const uint64_t*>(utils::cryptography::sha1::compute(filename).data());
info->filename = filename; info->filename = filename;
@ -166,8 +167,8 @@ namespace demonware
info->priv = priv; info->priv = priv;
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->add(info); reply.add(info);
reply->send(); reply.send();
} }
std::string bdStorage::get_user_file_path(const std::string& name) std::string bdStorage::get_user_file_path(const std::string& name)
@ -202,7 +203,7 @@ namespace demonware
const auto path = get_user_file_path(filename); const auto path = get_user_file_path(filename);
utils::io::write_file(path, data); utils::io::write_file(path, data);
auto* info = new bdFile2; auto info = std::make_unique<bdFile2>();
info->unk1 = 0; info->unk1 = 0;
info->unk2 = 0; info->unk2 = 0;
@ -217,10 +218,10 @@ namespace demonware
printf("[DW]: [bdStorage]: set user file: %s\n", filename.data()); printf("[DW]: [bdStorage]: set user file: %s\n", filename.data());
#endif #endif
reply->add(info); reply.add(info);
} }
reply->send(); reply.send();
} }
void bdStorage::upload_files_new(service_server* server, byte_buffer* buffer) const void bdStorage::upload_files_new(service_server* server, byte_buffer* buffer) const
@ -250,7 +251,7 @@ namespace demonware
const auto path = get_user_file_path(filename); const auto path = get_user_file_path(filename);
utils::io::write_file(path, data); utils::io::write_file(path, data);
auto* info = new bdContextUserStorageFileInfo; auto info = std::make_unique<bdContextUserStorageFileInfo>();
info->modifed_time = static_cast<uint32_t>(time(nullptr)); info->modifed_time = static_cast<uint32_t>(time(nullptr));
info->create_time = info->modifed_time; info->create_time = info->modifed_time;
@ -263,10 +264,10 @@ namespace demonware
printf("[DW]: [bdStorage]: set user file: %s\n", filename.data()); printf("[DW]: [bdStorage]: set user file: %s\n", filename.data());
#endif #endif
reply->add(info); reply.add(info);
} }
reply->send(); reply.send();
} }
void bdStorage::get_files(service_server* server, byte_buffer* buffer) const void bdStorage::get_files(service_server* server, byte_buffer* buffer) const
@ -303,7 +304,7 @@ namespace demonware
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
for (size_t i = 0u; i < filenames.size(); i++) for (size_t i = 0u; i < filenames.size(); i++)
{ {
auto* entry = new bdFileQueryResult; auto entry = std::make_unique<bdFileQueryResult>();
entry->user_id = user_ctxs.at(i).first; entry->user_id = user_ctxs.at(i).first;
entry->platform = user_ctxs.at(i).second; entry->platform = user_ctxs.at(i).second;
entry->filename = filenames.at(i); entry->filename = filenames.at(i);
@ -326,16 +327,16 @@ namespace demonware
#endif #endif
} }
reply->add(entry); reply.add(entry);
} }
reply->send(); reply.send();
} }
void bdStorage::unk12(service_server* server, byte_buffer* buffer) const void bdStorage::unk12(service_server* server, byte_buffer* buffer) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -61,349 +61,349 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::updateTeamName(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::updateTeamName(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::promoteMember(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::promoteMember(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::kickMember(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::kickMember(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::leaveTeam(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::leaveTeam(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::proposeMembership(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::proposeMembership(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::rejectMembership(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::rejectMembership(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::acceptMembership(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::acceptMembership(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getPublicProfiles(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getPublicProfiles(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getPrivateProfile(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getPrivateProfile(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getPublicMemberProfiles(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getPublicMemberProfiles(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getPrivateMemberProfiles(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getPrivateMemberProfiles(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::setPublicProfile(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::setPublicProfile(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::setPrivateProfile(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::setPrivateProfile(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::setPublicMemberProfile(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::setPublicMemberProfile(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::setPrivateMemberProfile(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::setPrivateMemberProfile(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getMemberships(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getMemberships(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getMembers(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getMembers(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getOutgoingProposals(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getOutgoingProposals(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::withdrawProposal(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::withdrawProposal(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::demoteMember(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::demoteMember(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::promoteMemberToOwner(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::promoteMemberToOwner(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getTeamInfo(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getTeamInfo(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getIncomingProposals(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getIncomingProposals(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::sendInstantMessage(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::sendInstantMessage(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getMembershipsUser(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getMembershipsUser(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::sendInstantMessageToTeam(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::sendInstantMessageToTeam(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::searchPublicTeamProfiles(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::searchPublicTeamProfiles(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::addApplication(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::addApplication(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getApplicationsByTeam(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getApplicationsByTeam(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::acceptApplication(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::acceptApplication(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::rejectApplication(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::rejectApplication(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::autoJoinTeam(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::autoJoinTeam(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::createTeamWithProfiles(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::createTeamWithProfiles(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::banMember(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::banMember(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::unbanMember(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::unbanMember(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::blockApplication(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::blockApplication(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::unblockApplication(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::unblockApplication(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::updateTeamType(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::updateTeamType(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::setOnline(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::setOnline(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getMembershipsWithCounts(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getMembershipsWithCounts(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getMembershipsWithCountsUser(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getMembershipsWithCountsUser(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::searchTeams(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::searchTeams(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::createTeamWithProfilesAndTeamType(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::createTeamWithProfilesAndTeamType(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getMembershipsWithCountsAndTeamTypeUser(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getMembershipsWithCountsAndTeamTypeUser(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getMembershipsWithCountsAndTeamType(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getMembershipsWithCountsAndTeamType(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getTeamInfoWithTeamType(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getTeamInfoWithTeamType(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::setTeamAutoJoin(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::setTeamAutoJoin(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getTeamAutoJoin(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getTeamAutoJoin(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdTeams::getMembersAndPrivileges(service_server* server, byte_buffer* /*buffer*/) const void bdTeams::getMembersAndPrivileges(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -10,11 +10,11 @@ namespace demonware
void bdTitleUtilities::get_server_time(service_server* server, byte_buffer* /*buffer*/) const void bdTitleUtilities::get_server_time(service_server* server, byte_buffer* /*buffer*/) const
{ {
auto* const time_result = new bdTimeStamp; auto time_result = std::make_unique<bdTimeStamp>();
time_result->unix_time = uint32_t(time(nullptr)); time_result->unix_time = uint32_t(time(nullptr));
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->add(time_result); reply.add(time_result);
reply->send(); reply.send();
} }
} }

View File

@ -12,6 +12,6 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }

View File

@ -22,76 +22,76 @@ namespace demonware
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdUserGroups::deleteGroup(service_server* server, byte_buffer* /*buffer*/) const void bdUserGroups::deleteGroup(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdUserGroups::joinGroup(service_server* server, byte_buffer* /*buffer*/) const void bdUserGroups::joinGroup(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdUserGroups::leaveGroup(service_server* server, byte_buffer* /*buffer*/) const void bdUserGroups::leaveGroup(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdUserGroups::getMembershipInfo(service_server* server, byte_buffer* /*buffer*/) const void bdUserGroups::getMembershipInfo(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdUserGroups::changeMemberType(service_server* server, byte_buffer* /*buffer*/) const void bdUserGroups::changeMemberType(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdUserGroups::getNumMembers(service_server* server, byte_buffer* /*buffer*/) const void bdUserGroups::getNumMembers(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdUserGroups::getMembers(service_server* server, byte_buffer* /*buffer*/) const void bdUserGroups::getMembers(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdUserGroups::getMemberships(service_server* server, byte_buffer* /*buffer*/) const void bdUserGroups::getMemberships(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdUserGroups::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const void bdUserGroups::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
void bdUserGroups::getGroupLists(service_server* server, byte_buffer* /*buffer*/) const void bdUserGroups::getGroupLists(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply.send();
} }
} }