39 :
TNamed(name, title), fServer(0)
57 :
TNamed(name, title), fReady(
kFALSE), fModified(kFALSE), fGetMenu(kFALSE), fCanv(0)
74 if (str)
Send(str, strlen(str));
109 while ((m = (
TMethod *)iter()) != 0) {
110 if (cnt++ > 0) buf.
Append(
",");
118 }
else if (strncmp(m->
GetName(),
"Set", 3) == 0) {
121 getter =
TString(
"Has") + getter;
123 getter =
TString(
"Get") + getter;
125 getter =
TString(
"Is") + getter;
141 printf(
"Cannot get toggle value with getter %s \n", getter.
Data());
173 const char *cdata = (
const char *)arg->
GetPostData();
175 if (strncmp(cdata,
"READY", 5) == 0) {
181 if (strncmp(cdata,
"GETMENU", 7) == 0) {
187 if (strncmp(cdata,
"EXEC", 4) == 0) {
194 gROOT->ProcessLine(exec);
216 canv->
Connect(
"Modified()",
"THttpWSEngine",
this,
"CanvasModified()");
virtual const char * GetTitle() const
Returns title of object.
Bool_t fReady
! indicate if websocket get ready flag to send bigger amount of data
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void ProcessData(THttpCallArg *arg)
process data received from the client
static const EReturnType kLong
virtual void Send(const void *buf, int len)=0
virtual void AssignCanvas(TCanvas *canv)
assign canvas to the web socket connects with CanvasModified signal
TMethod * GetMethodAllAny(const char *method)
Return pointer to method without looking at parameters.
virtual ~THttpEngine()
destructor
virtual void SendCharStar(const char *str)
Envelope for sending string via the websocket.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
The TNamed class is the base class for all named ROOT classes.
TString & Append(const char *cs)
void * GetPostData() const
return pointer on posted with request data
Method or function calling interface.
Bool_t fGetMenu
! true when menu was requested
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
THttpServer * fServer
! object server
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
void CheckModifiedFlag()
if canvas was modified, send new copy to the client
virtual const char * GetName() const
Returns name of object.
The ROOT global object gROOT contains a list of all defined classes.
TCanvas * fCanv
! canvas associated with websocket
EMenuItemKind IsMenuItem() const
virtual const char * Getter() const
static TString ConvertToJSON(const TObject *obj, Int_t compact=0, const char *member_name=0)
Converts object, inherited from TObject class, to JSON string Lower digit of compact parameter define...
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
virtual void CanvasModified()
react on canvas modifications
virtual ~THttpWSEngine()
destructor
TList * GetListOfPrimitives() const
Bool_t fModified
! true when canvas was modified
virtual void Add(TObject *obj)
void Execute(const char *, const char *, int *=0)
Execute method on this object with the given parameter string, e.g.
Each ROOT class (see TClass) has a linked list of methods.
void GetMenuItems(TList *listitems)
Returns list of methods accessible by context menu.
Long_t GetPostDataLength() const
return length of posted with request data
EReturnType ReturnType()
Returns the return type of the method.