ask data-server for domain + position of user from goToUser

This commit is contained in:
Stephen Birarda 2013-10-09 16:58:27 -07:00
parent cd504e2293
commit 4c148c6f3a
2 changed files with 11 additions and 2 deletions

View file

@ -18,16 +18,19 @@
class DataServerClient {
public:
static void putValueForKey(const QString& key, const char* value);
static void getClientValueForKey(const QString& key);
static void getValueForKeyAndUUID(const QString& key, const QUuid& uuid);
static void getValuesForKeysAndUUID(const QStringList& keys, const QUuid& uuid);
static void getClientValueForKey(const QString& key);
static void getValuesForKeysAndUserString(const QStringList& keys, const QString& userString);
static void processConfirmFromDataServer(unsigned char* packetData, int numPacketBytes);
static void processSendFromDataServer(unsigned char* packetData, int numPacketBytes);
static void processMessageFromDataServer(unsigned char* packetData, int numPacketBytes);
static void removeMatchedPacketFromMap(unsigned char* packetData, int numPacketBytes);
static void resendUnmatchedPackets();
private:
static void getValuesForKeysAndUserString(const QStringList& keys, const QString& userString);
static std::map<unsigned char*, int> _unmatchedPackets;
};

View file

@ -995,6 +995,12 @@ void Menu::goToUser() {
if (ret != QDialog::Accepted) {
return;
}
if (!usernameLineEdit->text().isEmpty()) {
// there's a username entered by the user, make a request to the data-server
DataServerClient::getValuesForKeysAndUserString((QStringList() << DataServerKey::Domain << DataServerKey::Position),
usernameLineEdit->text());
}
}
void Menu::bandwidthDetails() {