otsdaq  v2_05_02_indev
DesktopIconTable.h
1 #ifndef _ots_DesktopIconTable_h_
2 #define _ots_DesktopIconTable_h_
3 
4 #include <string>
5 
6 #include "otsdaq/TableCore/TableBase.h"
7 
8 namespace ots
9 {
11 {
12  public:
13  DesktopIconTable(void);
14  virtual ~DesktopIconTable(void);
15 
16  // Methods
17  void init(ConfigurationManager* configManager);
18 
19  struct DesktopIcon
20  {
21  bool enforceOneWindowInstance_;
22  std::string caption_, alternateText_, imageURL_, windowContentURL_, folderPath_;
23  std::string permissionThresholdString_; // <groupName>:<permissionsThreshold>
24  // pairs separated by ',' '&' or '|'
25  };
26 
27  const std::vector<DesktopIconTable::DesktopIcon>& getAllDesktopIcons() const { return activeDesktopIcons_; } // activeDesktopIcons_ is setup in init
28  void setAllDesktopIcons(const std::vector<DesktopIconTable::DesktopIcon>& newIcons); // overwrite dynamically the init result
29 
30  static const std::string COL_NAME;
31  static const std::string COL_STATUS;
32  static const std::string COL_CAPTION;
33  static const std::string COL_ALTERNATE_TEXT;
34  static const std::string COL_FORCE_ONLY_ONE_INSTANCE;
35  static const std::string COL_PERMISSIONS;
36  static const std::string COL_IMAGE_URL;
37  static const std::string COL_WINDOW_CONTENT_URL;
38  static const std::string COL_APP_LINK;
39  static const std::string COL_APP_LINK_UID;
40  static const std::string COL_PARAMETER_LINK;
41  static const std::string COL_PARAMETER_LINK_GID;
42  static const std::string COL_FOLDER_PATH;
43 
44  static const std::string COL_PARAMETER_GID;
45  static const std::string COL_PARAMETER_KEY;
46  static const std::string COL_PARAMETER_VALUE;
47 
48  static const std::string ICON_TABLE;
49  static const std::string PARAMETER_TABLE;
50 
51  static const std::string COL_APP_ID;
52 
53  private:
54  std::string removeCommas(const std::string& str, bool andHexReplace = false, bool andHTMLReplace = false);
55 
56  std::vector<DesktopIconTable::DesktopIcon> activeDesktopIcons_; // only icons with status=true
57 };
58 } // namespace ots
59 #endif