First

Dependents:   mbed-os-rest-api-V1-1 mbed-os-rest-api-V1-2 mbed-os-rest-api-V1-2-2

RestAPI_Manager.h

Committer:
asaewing
Date:
2018-12-21
Revision:
1:4db49ba6e885
Parent:
0:b3b078af7b16

File content as of revision 1:4db49ba6e885:

#ifndef RESTAPI_MANAGER_H
#define RESTAPI_MANAGER_H

#include "module_for_all.h"

class RestAPI_Manager {
public:
    //Thread* threadRM;
    DataStorage* ds_m;
    
    //RestAPI_Manager(DataStorage*, Thread*);
    //RestAPI_Manager(DataStorage*, Thread*, char*, std::string);
    
    RestAPI_Manager(DataStorage*);
    RestAPI_Manager(DataStorage*, char*, std::string);
    
    /* Define function */
    void SetConfig(char*, std::string);
    //void changeThread(Thread*);
    std::string runCommand(std::string, std::string);
    std::string switchCommand_GET(std::string);
    std::string switchCommand_POST(std::string);
    
private:
    char* _ip;
    std::string _main;
    
    std::string _ip_s;
    std::string _http_method;
    std::string _api_command;
};

#endif