overte/interface/src/DataServerClient.h
2013-10-07 12:17:47 -07:00

32 lines
1.1 KiB
C++

//
// DataServerClient.h
// hifi
//
// Created by Stephen Birarda on 10/7/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
//
#ifndef __hifi__DataServerClient__
#define __hifi__DataServerClient__
#include <vector>
#include <QtCore/QUuid>
class DataServerClient {
public:
static void putValueForKey(const char* key, const char* value);
static void getValueForKeyAndUUID(const char* key, QUuid& uuid);
static void getValueforKeyAndUserString(const char* key, QString& userString);
static void getClientValueForKey(const char* key) { getValueForKeyAndUserString(key, _clientUsername); }
static void processConfirmFromDataServer(unsigned char* packetData, int numPacketBytes);
static void processGetFromDataServer(unsigned char* packetData, int numPacketBytes);
static void setClientUsername(QString& clientUsername) { _clientUsername = clientUsername; }
static QString& setClientUsername() { return _clientUsername; }
private:
static QString _clientUsername;
static std::vector<unsigned char*> _unconfirmedPackets;
};
#endif /* defined(__hifi__DataServerClient__) */