parse_config_file.h 1.25 KB
Newer Older
Lais Frigério's avatar
Lais Frigério committed
1
2
#pragma once
#include <map>
3
4
#include <stdlib.h>
#include <string>
5
6
#include <agent/agent.h>
#include <agent/parse.h>
7
#include <json/json.h>
Lais Frigério's avatar
Lais Frigério committed
8

9
/**
10
 * @file parse_config_file.h
11
12
13
 * @brief This file has a Conf class - The main purpose is get config file content and make parse to set in a conf object
 */

14
15
class Agent;

Lais Frigério's avatar
Lais Frigério committed
16
17
class Conf{
    private:
18
        std::string idPoint;
19
        std::string pathProxyFile; /*!< Absolute path from proxy file. */
20
        std::string webService; /*!< url from web service. */
21
        std::string version; /*!< Current agent version */
22
        std::string project;
Lais Frigério's avatar
Lais Frigério committed
23
24

    public:
25
        void setIdPoint(std::string);
26
        void setPathProxyFile(std::string);
Lais Frigério's avatar
Lais Frigério committed
27
        void setWebService(std::string);
28
        void setVersion(std::string);
29
        void setProject(std::string);
Lais Frigério's avatar
Lais Frigério committed
30

31
        std::string getIdPoint() const;
32
        std::string getPathProxyFile() const;
Lais Frigério's avatar
Lais Frigério committed
33
        std::string getWebService() const;
34
        std::string getVersion() const;
35
        std::string getProject() const;
Lais Frigério's avatar
Lais Frigério committed
36
37
38

    };

39
bool parse_config_file(Agent*);
40

41
/**
42
43
44
 * @file parse_config_file.h
 * @brief This file has a Conf class - The main purpose is get config file content and make parse to set in a conf object
 */
45
bool set_conf_object(Agent*, std::map<std::string, std::string>*);