#pragma once #include "V8Tree/Service.h" #include "V8Tree/Instance.h" namespace RBX { extern const char* const sGroupService; class GroupService : public DescribedCreatable , public Service { private: static void onReceivedRawGroupInfoSuccess(weak_ptr weakDataModel, std::string response, boost::function resumeFunction, boost::function errorFunction); static void onReceivedRawGroupInfoError(weak_ptr weakDataModel, std::string error, boost::function errorFunction); static void onReceivedRawGetGroupsSuccess(weak_ptr weakDataModel, std::string response, boost::function)> resumeFunction, boost::function errorFunction); static void onReceivedRawGetGroupsError(weak_ptr weakDataModel, std::string error, boost::function errorFunction); public: GroupService(); void getGroupInfoAsync(const int groupId, boost::function resumeFunction, boost::function errorFunction); void getAlliesAsync(const int groupId, boost::function)> resumeFunction, boost::function errorFunction); void getEnemiesAsync(const int groupId, boost::function)> resumeFunction, boost::function errorFunction); void getGroupsAsync(const int userId, boost::function)> resumeFunction, boost::function errorFunction); }; }