FOSSology  4.4.0
Open Source License Compliance by Open Source Software
OjoState.hpp
Go to the documentation of this file.
1 /*
2  SPDX-FileCopyrightText: © 2019, 2021 Siemens AG
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
11 #ifndef OJOS_AGENT_STATE_HPP
12 #define OJOS_AGENT_STATE_HPP
13 
15 #include "OjoAgent.hpp"
16 
17 using namespace std;
18 
24 {
25  private:
26  int verbosity;
27  bool json;
29  int userId;
30  int groupId;
32  public:
33  void setUserId(const int);
34  void setGroupId(const int);
35 
36  bool isVerbosityDebug() const;
37  bool doJsonOutput() const;
38  bool doignoreFilesWithMimeType() const;
39  int getUserId() const;
40  int getGroupId() const;
41 
42  OjoCliOptions(int verbosity, bool json, bool ignoreFilesWithMimeType);
43  OjoCliOptions();
44 };
45 
50 class OjoState
51 {
52  public:
53  OjoState(const int agentId, const OjoCliOptions &cliOptions);
54 
55  void setAgentId(const int agentId);
56  int getAgentId() const;
57  const OjoCliOptions& getCliOptions() const;
58  const OjoAgent& getOjoAgent() const;
59 
60  private:
61  int agentId;
64 };
65 
66 #endif // OJOS_AGENT_STATE_HPP
Store the options sent through the CLI.
Definition: OjoState.hpp:24
bool ignoreFilesWithMimeType
Definition: OjoState.hpp:28
Store the state of the agent.
Definition: OjoState.hpp:51
const OjoAgent ojoAgent
Definition: OjoState.hpp:63
const OjoCliOptions cliOptions
Definition: OjoState.hpp:62
int agentId
Definition: OjoState.hpp:61
DB wrapper for agents.