GUI-FreeRDP/db.h

57 lines
946 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* db.h
*
* Created on: 13 июл. 2022 г.
* Author: alexander
*/
#ifndef DB_H_
#define DB_H_
#include <stdlib.h>
#include <stdbool.h>
#include "parameter.h"
#include "value.h"
typedef struct Host
{
char **data;
size_t size;
} Host;
typedef struct Hosts
{
Host **host;
size_t size;
} Hosts;
typedef struct Monitor
{
char **data;
size_t size;
} Monitor;
typedef struct Monitors
{
Monitor **monitor;
size_t size;
} Monitors;
char *getPathDB(char *path);
bool dbLoadData();
Hosts *dbGetHostsList();
void dbFreeHosts(Hosts *hosts);
Monitors *dbGetMonitorsList();
void dbFreeMonitors(Monitors *monitors);
bool deleteAllMonitors();
int dbAddMonitor(char *monitor, bool set);
int dbSaveMonitors(char *name);
bool dbWriteParameter(Parameter name, bool set);
bool dbWriteValue(Value name, bool set);
bool dbSetUserNameCurrent(char *current);
int dbAddServer(char *ip, char *dns);
#endif /* DB_H_ */