4
Fork 0

Moved from MySQL to new set of D-BUS methods to retreive station call / ID

This commit is contained in:
Artem Prilutskiy 2017-06-13 11:36:22 +03:00
parent f9bcb35800
commit b99aeaa581
17 changed files with 294 additions and 424 deletions

View file

@ -0,0 +1,42 @@
// Copyright 2015 by Artem Prilutskiy
#ifndef PATCHCORDPROXY_H
#define PATCHCORDPROXY_H
#include <stdint.h>
#include <dbus/dbus.h>
class PatchCord
{
public:
PatchCord(uint32_t network, uint32_t link);
~PatchCord();
// Primary methods to manage PatchCord instance
void setTalkerID(uint32_t value);
void setTalkerAlias(const char* value);
uint32_t getTalkerID();
// Supplimentary methods to access cached data from database
uint32_t getPrivateIDForCall(const char* call);
bool getCredentialsForID(uint32_t number, char* call, char* text);
private:
DBusConnection* connection;
char* name;
uint32_t number;
char* banner;
void getContextBanner();
void invokeCommand(const char* command);
void setSpecificValue(uint32_t key, uint32_t value);
uint32_t getSpecificValue(uint32_t key);
};
#endif