otsdaq  v2_04_02
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
28  {
29  return activeDesktopIcons_;
30  } // activeDesktopIcons_ is setup in init
31 
32  static const std::string COL_NAME;
33  static const std::string COL_STATUS;
34  static const std::string COL_CAPTION;
35  static const std::string COL_ALTERNATE_TEXT;
36  static const std::string COL_FORCE_ONLY_ONE_INSTANCE;
37  static const std::string COL_PERMISSIONS;
38  static const std::string COL_IMAGE_URL;
39  static const std::string COL_WINDOW_CONTENT_URL;
40  static const std::string COL_APP_LINK;
41  static const std::string COL_APP_LINK_UID;
42  static const std::string COL_PARAMETER_LINK;
43  static const std::string COL_PARAMETER_LINK_GID;
44  static const std::string COL_FOLDER_PATH;
45 
46  static const std::string COL_PARAMETER_GID;
47  static const std::string COL_PARAMETER_KEY;
48  static const std::string COL_PARAMETER_VALUE;
49 
50  static const std::string ICON_TABLE;
51  static const std::string PARAMETER_TABLE;
52 
53  static const std::string COL_APP_ID;
54 
55  private:
56  std::string removeCommas(const std::string& str,
57  bool andHexReplace = false,
58  bool andHTMLReplace = false);
59 
60  std::vector<DesktopIconTable::DesktopIcon>
61  activeDesktopIcons_; // only icons with status=true
62 };
63 } // namespace ots
64 #endif