mirror of
https://github.com/openappsec/openappsec.git
synced 2026-01-17 16:00:26 +03:00
Jan 06 2026 dev (#387)
* sync code * update code to support brotli * update code to support brotli * update code to support brotli * sync code * fix findBrotli * sync code * sync code * sync code * sync code --------- Co-authored-by: Ned Wright <nedwright@proton.me> Co-authored-by: Daniel Eisenberg <danielei@checkpoint.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <sys/types.h>
|
||||
#include <chrono>
|
||||
|
||||
namespace std
|
||||
{
|
||||
@@ -118,6 +119,14 @@ struct IsPrintable<T, decltype(static_cast<void>(declval<ostream &>() << declval
|
||||
{
|
||||
};
|
||||
|
||||
template <typename Rep, typename Period>
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const std::chrono::duration<Rep, Period>& d)
|
||||
{
|
||||
os << d.count();
|
||||
return os;
|
||||
}
|
||||
|
||||
template <typename CanPrint>
|
||||
ostream &
|
||||
operator<<(ostream &os, const decltype(declval<CanPrint>().print(declval<ostream &>()), declval<CanPrint>()) &obj)
|
||||
|
||||
@@ -233,9 +233,11 @@ public:
|
||||
|
||||
static void setNewDefaultStdout(std::ostream *new_stream);
|
||||
static void setUnitTestFlag(DebugFlags flag, DebugLevel level);
|
||||
static void setDebugFlag(DebugFlags flag, DebugLevel level);
|
||||
|
||||
static std::string findDebugFilePrefix(const std::string &file_name);
|
||||
static std::string getExecutableName();
|
||||
static bool getDebugFlagFromString(const std::string &flag_name, DebugFlags &flag);
|
||||
|
||||
private:
|
||||
template <typename T, typename... Args>
|
||||
|
||||
28
core/include/general/intell_registration_event.h
Normal file
28
core/include/general/intell_registration_event.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef __INTELL_REGISTRATION_EVENT_H__
|
||||
#define __INTELL_REGISTRATION_EVENT_H__
|
||||
|
||||
#include "event.h"
|
||||
|
||||
class IntelligenceRegistrationEvent : public Event<IntelligenceRegistrationEvent>
|
||||
{
|
||||
public:
|
||||
IntelligenceRegistrationEvent(bool registration_successful, std::string registration_response)
|
||||
:
|
||||
registration_successful(registration_successful),
|
||||
registration_response(registration_response)
|
||||
{}
|
||||
|
||||
IntelligenceRegistrationEvent(bool registration_successful)
|
||||
:
|
||||
IntelligenceRegistrationEvent(registration_successful, "")
|
||||
{}
|
||||
|
||||
bool isRegistrationSuccessful() const { return registration_successful; }
|
||||
std::string getRegistrationResponse() const { return registration_response; }
|
||||
|
||||
private:
|
||||
bool registration_successful;
|
||||
std::string registration_response;
|
||||
};
|
||||
|
||||
#endif // __INTELL_REGISTRATION_EVENT_H__
|
||||
@@ -32,7 +32,8 @@ class IntelligenceComponentV2
|
||||
Singleton::Consume<I_MainLoop>,
|
||||
Singleton::Consume<I_AgentDetails>,
|
||||
Singleton::Consume<I_RestApi>,
|
||||
Singleton::Consume<I_TimeGet>
|
||||
Singleton::Consume<I_TimeGet>,
|
||||
Singleton::Consume<I_Environment>
|
||||
{
|
||||
public:
|
||||
IntelligenceComponentV2();
|
||||
|
||||
Reference in New Issue
Block a user