#include "remoting/client/feedback_data.h"
#include "base/values.h"
#include "remoting/base/name_value_map.h"
namespace remoting {
namespace {
const NameMapElement<FeedbackData::Key> kFeedbackDataKeyNames[]{
{FeedbackData::Key::SESSION_PREVIOUS_STATE, "session-previous-state"},
{FeedbackData::Key::SESSION_STATE, "session-state"},
{FeedbackData::Key::SESSION_ERROR, "session-error"},
{FeedbackData::Key::SESSION_MODE, "session-mode"},
{FeedbackData::Key::SESSION_HOST_OS, "session-host-os"},
{FeedbackData::Key::SESSION_HOST_OS_VERSION, "session-host-os-version"},
{FeedbackData::Key::SESSION_HOST_VERSION, "session-host-version"},
{FeedbackData::Key::SESSION_CREDENTIALS_TYPE, "session-credentials-type"},
{FeedbackData::Key::SESSION_PERFORMANCE_STATS, "session-performance-stats"},
{FeedbackData::Key::SESSION_PEER_CONNECTION_STATS,
"session-peer-connection-stats"},
};
template <typename EnumType>
void SetEnumIfNotEmpty(std::map<FeedbackData::Key, std::string>* data,
FeedbackData::Key key,
const ChromotingEvent& event,
const std::string& event_key) { … }
void SetStringIfNotEmpty(std::map<FeedbackData::Key, std::string>* data,
FeedbackData::Key key,
const ChromotingEvent& event,
const std::string& event_key) { … }
}
FeedbackData::FeedbackData() { … }
FeedbackData::~FeedbackData() { … }
void FeedbackData::SetData(Key key, const std::string& data) { … }
void FeedbackData::FillWithChromotingEvent(const ChromotingEvent& event) { … }
std::string FeedbackData::KeyToString(Key key) { … }
}