Program Listing for File ProfileService.h
↰ Return to documentation for file (axr.sdk/services/ProfileService.h
)
// Copyright (C) AcceleratXR, Inc. All rights reserved.
//
// Author: Jean-Philippe Steinmetz <info@acceleratxr.com>
#pragma once
#include "axr.sdk/net/IApiClient.h"
#include "axr.sdk/ServiceBase.h"
#include "axr.sdk/models/Profile.h"
#include "axr.sdk/utils/StringUtils.h"
#include "axr.sdk/models/Count.h"
#include "axr.sdk/utils/EntityWatchdog.h"
#include <cpprest/details/basic_types.h>
#include <map>
#include <memory>
#include <vector>
DEFINE_ENTITYWATCHDOG_SPEC(Profile)
namespace axr {
namespace sdk {
namespace services {
using namespace axr::sdk::models;
class ProfileService : public ServiceBase<Profile>{
public:
ProfileService(std::shared_ptr<Configuration> config, std::shared_ptr<net::IApiClient> apiClient)
: ServiceBase(config, apiClient)
{}
~ProfileService() {}
static const utility::char_t* ClassName()
{
return _XPLATSTR("axr::sdk::services::ProfileService");
}
pplx::task<std::shared_ptr<Profile>> FindMyProfile();
pplx::task<std::shared_ptr<Profile>> UpdateMyProfile(std::shared_ptr<Profile> obj);
pplx::task<void> DeleteMyProfile();
pplx::task<std::shared_ptr<Object>> GetUserPresence(utility::string_t userId);
pplx::task<void> SetUserPresence(utility::string_t userId, std::shared_ptr<Object> presence);
pplx::task<std::vector<std::shared_ptr<Profile>>> FindAll(const std::map<utility::string_t, utility::string_t>* searchParams = nullptr, const uint16_t startIndex = 0, const uint16_t maxResults = 1000, const utility::string_t& sortBy = _XPLATSTR(""));
pplx::task<std::shared_ptr<Profile>> Create(std::shared_ptr<Profile> obj);
pplx::task<uint64_t> Count(const std::map<utility::string_t, utility::string_t>* searchParams = nullptr, const uint16_t startIndex = 0, const uint16_t maxResults = 1000);
pplx::task<std::shared_ptr<Profile>> FindById(const utility::string_t& id);
pplx::task<std::shared_ptr<Profile>> Update(const utility::string_t& id, std::shared_ptr<Profile> obj);
pplx::task<void> Delete(const utility::string_t& id);
};
} // namespace services
} // namespace axr
} // namespace sdk