X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fo1%2Fves%2FVesEvent.hpp;h=fe09ef080a38b6e5f9a0aca749dccaa19a67876f;hb=0c4403cc2355cc38d01c6645b1dad36dd4c1daa7;hp=c1254da9eaf7dfdd7e1edd862670ef142da024d6;hpb=6fe137e5c6f9470f4f48448f5651573c42bd8aed;p=o-du%2Fl2.git diff --git a/src/o1/ves/VesEvent.hpp b/src/o1/ves/VesEvent.hpp index c1254da9e..fe09ef080 100644 --- a/src/o1/ves/VesEvent.hpp +++ b/src/o1/ves/VesEvent.hpp @@ -30,6 +30,8 @@ #include "VesUtils.hpp" #include "VesCommonHeader.hpp" #include "HttpClient.hpp" +#include "Message.hpp" +#include "ConfigLoader.hpp" using namespace std; @@ -37,23 +39,29 @@ class VesEvent{ public: VesEvent(); - ~VesEvent(); - bool prepare(); + VesEvent(VesEventType); + virtual ~VesEvent(); + void init(); + bool prepare(const Message* msg = NULL); bool send(); protected: - virtual bool prepareEventFields() = 0; + virtual bool prepareEventFields(const Message* msg = NULL) = 0; + virtual void getConfig(); + virtual void createUrl(); VesEventType mVesEventType; cJSON* mVesEventFields; - - private: - bool readConfigFile(); - char * mSendData; - HttpClient *mHttpClient; - string mVesServerIp; + string mVesServerIp; string mVesServerPort; string mVesServerUsername; string mVesServerPassword; + string mVesUrl; + + private: + string getEventFieldName(); + char * mSendData; + HttpClient *mHttpClient; + }; #endif