tcMenu
RemoteMenuItem.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 https://www.thecoderscorner.com (Nutricherry LTD).
3  * This product is licensed under an Apache license, see the LICENSE file in the top-level directory.
4  */
5 
6 #ifndef _REMOTE_MENU_ITEMS_H
7 #define _REMOTE_MENU_ITEMS_H
8 
9 #include <PlatformDetermination.h>
10 #include "MenuItems.h"
11 #include <RemoteConnector.h>
12 #include <RemoteAuthentication.h>
13 
22 
31 private:
32  CommsCallbackFn passThru;
33  TagValConnectorPtr* connectors;
34  static RemoteMenuItem* instance;
35 public:
39  RemoteMenuItem(uint16_t id, int maxRemotes, MenuItem* next = NULL);
40 
46  void addConnector(TagValueRemoteConnector* connector);
47 
53  this->passThru = passThru;
54  }
55 
60  return (i < getNumberOfParts()) ? connectors[i] : NULL;
61  }
62 
68  if (passThru) passThru(info);
69  }
70 
74  static RemoteMenuItem* getInstance() { return instance; }
75 };
76 
78 private:
79  EepromAuthenticatorManager* authManager;
80 public:
82 
83  EepromAuthenticatorManager* getAuthManager() { return authManager; }
84 };
85 
86 #endif
void(* CommsCallbackFn)(CommunicationInfo)
Definition: RemoteConnector.h:105
Definition: MenuItems.h:324
Definition: RemoteMenuItem.h:77
void addConnector(TagValueRemoteConnector *connector)
Definition: RemoteMenuItem.cpp:97
static RemoteMenuItem * getInstance()
Definition: RemoteMenuItem.h:74
Definition: RuntimeMenuItem.h:179
void registerCommsNotification(CommsCallbackFn passThru)
Definition: RemoteMenuItem.h:52
Definition: RemoteConnector.h:158
Definition: RemoteConnector.h:95
RemoteMenuItem(uint16_t id, int maxRemotes, MenuItem *next=NULL)
Definition: RemoteMenuItem.cpp:90
Definition: RemoteMenuItem.h:30
void doPassThru(CommunicationInfo info)
Definition: RemoteMenuItem.h:67
TagValueRemoteConnector * getConnector(int i)
Definition: RemoteMenuItem.h:59
Definition: RemoteAuthentication.h:64