X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fo1%2Fves%2FVesEvent.hpp;h=2f151311bfe4d34f10730c9401c18e0aeb99009c;hb=6178d5e32f0c57e198de80afc23b92c635e4f6df;hp=f6e746d80c646f405b0c9a11e8971d010930cd50;hpb=1abb4c7602549fc273cc7ef164f33800f93abfbc;p=o-du%2Fl2.git diff --git a/src/o1/ves/VesEvent.hpp b/src/o1/ves/VesEvent.hpp index f6e746d80..2f151311b 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,25 +39,28 @@ class VesEvent{ public: VesEvent(); - ~VesEvent(); - bool prepare(); + VesEvent(VesEventType); + virtual ~VesEvent(); + 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: - //Member variable - bool readConfigFile(); - bool getVesCollectorDetails(); - char * mSendData; - HttpClient *mHttpClient; - string mVesServerIp; + string mVesServerIp; string mVesServerPort; string mVesServerUsername; string mVesServerPassword; + string mVesUrl; + + private: + string getEventFieldName(); + char * mSendData; + HttpClient *mHttpClient; + }; #endif