@@ -27,11 +27,6 @@ class Launcher : public PluginHost::IPlugin {
2727
2828 public:
2929 class Info : public Core ::ConnectorType<CN_IDX_PROC,CN_VAL_PROC> {
30- private:
31- Info () = delete ;
32- Info (const Info&) = delete ;
33- Info& operator = (const Info&) = delete ;
34-
3530 public:
3631 enum event {
3732 EVENT_NONE = proc_event::PROC_EVENT_NONE,
@@ -43,19 +38,22 @@ class Launcher : public PluginHost::IPlugin {
4338 };
4439
4540 public:
41+ Info () = delete ;
42+ Info (const Info&) = delete ;
43+ Info& operator = (const Info&) = delete ;
44+
4645 Info (const uint8_t buffer[], const uint16_t length)
4746 : _status(PROC_CN_MCAST_IGNORE) {
4847 if (Ingest (buffer, length) == false ) {
49- TRACE_L1 ( " This failed !!!! \n " );
48+ TRACE (Trace::Fatal, ( _T ( " Could not observe the process !!!" )) );
5049 _info.what = proc_event::PROC_EVENT_NONE;
5150 }
5251 }
5352 Info (const bool enabled)
5453 : _status(enabled ? PROC_CN_MCAST_LISTEN : PROC_CN_MCAST_IGNORE) {
5554 _info.what = proc_event::PROC_EVENT_NONE;
5655 }
57- virtual ~Info () {
58- }
56+ ~Info () override = default ;
5957
6058 public:
6159 inline event Event () const {
@@ -110,13 +108,13 @@ class Launcher : public PluginHost::IPlugin {
110108 inline uint32_t GroupId () const {
111109 return ((Event () == EVENT_UID) || (Event () == EVENT_GID) ? _info.event_data .id .e .egid : 0 );
112110 }
113- virtual uint16_t Message (uint8_t stream[], const uint16_t /* length */ ) const override {
111+ uint16_t Message (uint8_t stream[], const uint16_t /* length */ ) const override {
114112
115113 memcpy (stream, &_status, sizeof (_status));
116114
117115 return (sizeof (_status));
118116 }
119- virtual uint16_t Message (const uint8_t stream[], const uint16_t length) override {
117+ uint16_t Message (const uint8_t stream[], const uint16_t length) override {
120118 uint16_t toCopy = (length >= sizeof (proc_event) ? sizeof (proc_event) : length);
121119 ::memcpy (&_info, stream, toCopy);
122120 if (toCopy < sizeof (proc_event)) {
@@ -131,18 +129,16 @@ class Launcher : public PluginHost::IPlugin {
131129 };
132130
133131 class Channel : public Core ::SocketNetlink {
134- private :
132+ public :
135133 Channel () = delete ;
136134 Channel (const Channel&) = delete ;
137135 Channel& operator = (const Channel&) = delete ;
138136
139- public:
140137 Channel (ProcessObserver& parent)
141138 : Core::SocketNetlink(Core::NodeId(NETLINK_CONNECTOR, 0 , CN_IDX_PROC))
142139 , _parent(parent) {
143140 }
144- virtual ~Channel () {
145- }
141+ ~Channel () override = default ;
146142
147143 private:
148144 virtual uint16_t Deserialize (const uint8_t dataFrame[], const uint16_t receivedSize) {
@@ -250,10 +246,7 @@ class Launcher : public PluginHost::IPlugin {
250246 {
251247 ASSERT (parent != nullptr );
252248 }
253- virtual ~Notification ()
254- {
255- TRACE_L1 (" Launcher::Notification destructed. Line: %d" , __LINE__);
256- }
249+ ~Notification () override = default ;
257250
258251 public:
259252 void Update (const ProcessObserver::Info& info) override {
@@ -489,7 +482,7 @@ class Launcher : public PluginHost::IPlugin {
489482
490483 // Check all the time components are still valid
491484 if ((hour != static_cast <uint8_t >(~0 ) && second != static_cast <uint8_t >(~0 )) && (minute == static_cast <uint8_t >(~0 ))) {
492- TRACE_L1 ( _T (" Invalid time format: the given format is HH:.SS" ));
485+ TRACE (Trace::Information, ( _T (" Invalid time format: the given format is HH:MM .SS" ) ));
493486 }
494487 else { // Update time components
495488 _hour = hour;
@@ -663,7 +656,7 @@ class Launcher : public PluginHost::IPlugin {
663656 _adminLock.Lock ();
664657 _shutdownPhase = 2 ;
665658
666- TRACE_L1 ( " Trying to force kill\n " );
659+ TRACE (Trace::Information, ( _T ( " Trying to force kill. " )) );
667660 for (int i = 0 ; i < static_cast <int >(_processList.size ()); i++) {
668661 ::kill (_processList[i], SIGKILL);
669662 }
0 commit comments