Changeset 1767
- Timestamp:
- 08/26/08 11:28:32 (3 months ago)
- Files:
-
- capture-mod/trunk/CaptureSoapServer.cpp (modified) (5 diffs)
- capture-mod/trunk/CaptureSoapServer.h (modified) (2 diffs)
- capture-mod/trunk/FileMonitor.cpp (modified) (1 diff)
- capture-mod/trunk/RegistryMonitor.cpp (modified) (2 diffs)
- capture-mod/trunk/capture.wsdl (modified) (6 diffs)
- capture-mod/trunk/captureGSOAP.h (modified) (5 diffs)
- capture-mod/trunk/install/CaptureBAT.exe (modified) (previous)
- capture-mod/trunk/soapC.cpp (modified) (45 diffs)
- capture-mod/trunk/soapClient.cpp (modified) (2 diffs)
- capture-mod/trunk/soapH.h (modified) (25 diffs)
- capture-mod/trunk/soapServer.cpp (modified) (3 diffs)
- capture-mod/trunk/soapStub.h (modified) (24 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
capture-mod/trunk/CaptureSoapServer.cpp
r1766 r1767 9 9 #include "b64.h" //nice small 3rd party lib for base64 encode/decode 10 10 11 //Only global so that the destructors can be used in ~CaptureSoapServer 12 //Didn't go in the class definition because adding soapH.h to CaptureSoapServer.h caused compile issues 13 //that I didn't want to deal with 11 14 struct soap soap; 15 16 std::queue<struct ns__regEvent> regQ; 17 std::queue<struct ns__fileEvent> fileQ; 18 std::queue<struct ns__procEvent> procQ; 19 12 20 13 21 CaptureSoapServer::CaptureSoapServer(Visitor* v, RegistryMonitor * r, FileMonitor * f, ProcessMonitor * p){ … … 66 74 } 67 75 76 //From RegistryMonitor.cpp 77 //registry event extra.at(0) == PID 78 //registry event extra.at(1) == name of registry value 79 //registry event extra.at(2) == registry value type 80 //registry event extra.at(3) == registry value data (if any) 81 void CaptureSoapServer::onRegistryEvent (wstring registryEventType, wstring time, 82 wstring processPath, wstring registryEventPath, 83 vector<wstring> extra) 84 { 85 printf("CaptureSoapServer::onRegistryEvent got an event for time = %ls, length = %d\n", time.c_str(), time.length()); 86 87 //now begins the arduous process of converting the values into char *s 88 ns__regEvent_t r; 89 //TODO: trace through and verify that all mallocs are cleaned up by the soap code 90 r.time = (char *)malloc(time.length()+1); 91 sprintf(r.time, "%ls", time.c_str()); 92 printf("r.time = %s\n", r.time); 93 94 r.eventType = (char *)malloc(registryEventType.length()+1); 95 sprintf(r.eventType, "%ls", registryEventType.c_str()); 96 97 char * tmp = (char *)malloc(extra.at(0).length()+1); 98 sprintf(tmp, "%ls", extra.at(0).c_str()); 99 r.procPID = atoi(tmp); 100 printf("r.procPID = %d\n", r.procPID); 101 free(tmp); 102 103 r.procName = (char *)malloc(processPath.length()+1); 104 sprintf(r.procName, "%ls", processPath.c_str()); 105 106 r.keyName = (char *)malloc(registryEventPath.length()+1); 107 sprintf(r.keyName, "%ls", registryEventPath.c_str()); 108 109 r.valueName = (char *)malloc(extra.at(1).length()+1); 110 sprintf(r.valueName, "%ls", extra.at(1).c_str()); 111 112 r.valueType = (char *)malloc(extra.at(2).length()+1); 113 sprintf(r.valueType, "%ls", extra.at(2).c_str()); 114 115 r.valueData = (char *)malloc(extra.at(3).length()+1); 116 sprintf(r.valueData, "%ls", extra.at(3).c_str()); 117 118 regQ.push(r); 119 printf("added one event to regQ. Now there are %d elements in the queue\n", regQ.size()); 120 } 121 122 //From FileMonitor.cpp 123 //file event extra.at(0) == PID 124 void CaptureSoapServer::onFileEvent(wstring fileEventType, wstring time, 125 wstring processPath, wstring fileEventPath, 126 vector<wstring> extra) 127 { 128 printf("CaptureSoapServer::onFileEvent got an event for time = %ls\n", time.c_str()); 129 } 130 68 131 void CaptureSoapServer::onProcessEvent(BOOLEAN created, wstring time, 69 132 DWORD parentProcessId, wstring parentProcess, … … 73 136 } 74 137 75 void CaptureSoapServer::onRegistryEvent (wstring registryEventType, wstring time,76 wstring processPath, wstring registryEventPath,77 vector<wstring> extra)78 {79 printf("CaptureSoapServer::onRegistryEvent got an event for time = %ls\n", time.c_str());80 }81 82 void CaptureSoapServer::onFileEvent(wstring fileEventType, wstring time,83 wstring processPath, wstring fileEventPath,84 vector<wstring> extra)85 {86 printf("CaptureSoapServer::onFileEvent got an event for time = %ls\n", time.c_str());87 }88 138 89 139 int ns__ping(struct soap *soap, char * a, char ** result) … … 265 315 if(debug) printf("\n\nDone sleeping\n\n"); 266 316 267 //TODO: Before we terminate the jobs, see if it created any events. If so, le aveit run, and tell the317 //TODO: Before we terminate the jobs, see if it created any events. If so, let it run, and tell the 268 318 //HC Manager about it. The Manager should then request the information about events separately. 269 319 … … 282 332 283 333 //If maxEventsReturned == -1, then then send as many as possible. 284 int ns__receiveEventsBase64(struct soap *soap, int maxEventsReturned, ns__receiveEventsStruct &result){ 285 334 //If there are no events to send back, it will send back <eventType>No Events</eventType> 335 int ns__receiveEventsBase64(struct soap *soap, int maxEventsReturned, struct ns__regEvent &result){ 336 337 if(regQ.empty()){ 338 printf("No events to send back\n"); 339 struct ns__regEvent t; 340 memset(&t, 0, sizeof(struct ns__regEvent)); 341 //The soap will not try to serialize all the char * = 0 from the memset, but it will send back 342 //<ns:regEvent><procPID>0</procPID></ns:regEvent> 343 //so parse that to mean there are no results 344 t.eventType = "No Events"; 345 result = t; 346 } 347 else{ 348 printf("Sending back the first event\n"); 349 result = regQ.front(); 350 regQ.pop(); 351 } 286 352 287 353 return SOAP_OK; capture-mod/trunk/CaptureSoapServer.h
r1766 r1767 20 20 boost::signals::connection onFileEventConnection; 21 21 boost::signals::connection onProcessEventConnection; 22 typedef struct ns__regEvent ns__regEvent_t; 23 typedef struct ns__fileEvent ns__fileEvent_t; 24 typedef struct ns__procEvent ns__procEvent_t; 25 22 26 23 27 CaptureSoapServer(Visitor *, RegistryMonitor * r, FileMonitor * f, ProcessMonitor * p); … … 36 40 FileMonitor * fileMonitor; 37 41 ProcessMonitor * processMonitor; 42 38 43 }; capture-mod/trunk/FileMonitor.cpp
r881 r1767 378 378 wstring processPath; 379 379 vector<wstring> extraData; 380 //file event extra.at(0) == PID 380 381 wchar_t processIdString[11]; 381 382 swprintf(processIdString, 11, L"%ld", e->processId); capture-mod/trunk/RegistryMonitor.cpp
r980 r1767 268 268 size_t tmp_len; 269 269 vector<wstring> extraData; 270 //registry event extra.at(0) == PID 270 271 extraData.push_back(processIdString); 272 //registry event extra.at(1) == name of registry value 271 273 if(e->valueNameLength > 0){ 272 274 extraData.push_back(e->valueName); … … 276 278 } 277 279 280 //registry event extra.at(2) == registry value type 281 //registry event extra.at(3) == registry value data (if any) 278 282 //MS description of data types: 279 283 //http://support.microsoft.com/kb/256986 capture-mod/trunk/capture.wsdl
r1764 r1767 26 26 attributeFormDefault="unqualified"> 27 27 <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> 28 <complexType name="fileEvent-t">29 <complexContent>30 <restriction base="ns:fe">31 </restriction>32 </complexContent>33 </complexType>34 <complexType name="regEvent-t">35 <complexContent>36 <restriction base="ns:re">37 </restriction>38 </complexContent>39 </complexType>40 28 <complexType name="procEvent-t"> 41 29 <complexContent> 42 <restriction base="ns:p e">30 <restriction base="ns:procEvent"> 43 31 </restriction> 44 32 </complexContent> … … 56 44 </complexContent> 57 45 </complexType> 58 <complexType name="f e">46 <complexType name="fileEvent"> 59 47 <sequence> 60 48 <element name="time" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> … … 65 53 </sequence> 66 54 </complexType> 67 <complexType name="re"> 68 <sequence> 69 <element name="time" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 70 <element name="eventType" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 71 <element name="procPID" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 72 <element name="procName" type="xsd:int" minOccurs="1" maxOccurs="1"/> 73 <element name="keyName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 74 <element name="valueName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 75 <element name="valueType" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 76 </sequence> 77 </complexType> 78 <complexType name="pe"> 55 <complexType name="procEvent"> 79 56 <sequence> 80 57 <element name="time" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> … … 160 137 </message> 161 138 139 <message name="receiveEventsBase64"> 140 <part name="maxEventsReturned" type="xsd:int"/> 141 </message> 142 143 <message name="regEvent"> 144 <part name="time" type="xsd:string"/> 145 <part name="eventType" type="xsd:string"/> 146 <part name="procPID" type="xsd:int"/> 147 <part name="procName" type="xsd:string"/> 148 <part name="keyName" type="xsd:string"/> 149 <part name="valueName" type="xsd:string"/> 150 <part name="valueType" type="xsd:string"/> 151 <part name="valueData" type="xsd:string"/> 152 </message> 153 162 154 <portType name="capturePortType"> 163 155 <operation name="ping"> … … 191 183 <output message="tns:openDocumentResponse"/> 192 184 </operation> 185 <operation name="receiveEventsBase64"> 186 <documentation>Service definition of function ns__receiveEventsBase64</documentation> 187 <input message="tns:receiveEventsBase64"/> 188 <output message="tns:regEvent"/> 189 </operation> 193 190 </portType> 194 191 … … 241 238 </operation> 242 239 <operation name="openDocument"> 240 <SOAP:operation style="rpc" soapAction=""/> 241 <input> 242 <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 243 </input> 244 <output> 245 <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 246 </output> 247 </operation> 248 <operation name="receiveEventsBase64"> 243 249 <SOAP:operation style="rpc" soapAction=""/> 244 250 <input> capture-mod/trunk/captureGSOAP.h
r1764 r1767 14 14 15 15 //Just using similar to previous perl names 16 typedef struct fe{ 16 struct ns__regEvent{ 17 char * time; 18 char * eventType; 19 int procPID; 20 char * procName; 21 char * keyName; 22 char * valueName; 23 char * valueType; 24 char * valueData; 25 }; 26 27 struct ns__fileEvent{ 17 28 char * time; 18 29 char * eventType; … … 20 31 char * procName; 21 32 char * fileName; 22 } ns__fileEvent_t;33 }; 23 34 24 typedef struct re{ 25 char * time; 26 char * eventType; 27 char * procPID; 28 int procName; 29 char * keyName; 30 char * valueName; 31 char * valueType; 32 }ns__regEvent_t; 33 34 typedef struct pe{ 35 typedef struct ns__procEvent{ 35 36 char * time; 36 37 char * eventType; … … 48 49 } ns__receiveFileStruct; 49 50 51 52 //TODO: restructure this 50 53 typedef struct s2{ 51 54 char * data; … … 57 60 } ns__receiveEventsStruct; 58 61 62 59 63 int ns__ping(char * a, char ** result); 60 64 int ns__visitURL(char * a, char ** result); … … 63 67 int ns__sendMIME(int magicNumber, int &result); 64 68 int ns__openDocument(char * fileName, int waitTimeMillisec, int &result); 65 int ns__receiveEventsBase64(struct soap *soap, int maxEventsReturned, ns__receiveEventsStruct &result); 69 //int ns__receiveEventsBase64(int maxEventsReturned, ns__receiveEventsStruct &result); 70 int ns__receiveEventsBase64(int maxEventsReturned, struct ns__regEvent &result); 66 71 capture-mod/trunk/soapC.cpp
r1764 r1767 8 8 #include "soapH.h" 9 9 10 SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-08-2 2 06:31:12GMT")10 SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-08-26 03:24:29 GMT") 11 11 12 12 … … 162 162 case SOAP_TYPE_unsignedInt: 163 163 return soap_in_unsignedInt(soap, NULL, NULL, "xsd:unsignedInt"); 164 case SOAP_TYPE_ns__receiveEventsBase64: 165 return soap_in_ns__receiveEventsBase64(soap, NULL, NULL, "ns:receiveEventsBase64"); 164 166 case SOAP_TYPE_ns__openDocument: 165 167 return soap_in_ns__openDocument(soap, NULL, NULL, "ns:openDocument"); … … 194 196 case SOAP_TYPE_ns__procEvent_t: 195 197 return soap_in_ns__procEvent_t(soap, NULL, NULL, "ns:procEvent-t"); 196 case SOAP_TYPE_pe: 197 return soap_in_pe(soap, NULL, NULL, "pe"); 198 case SOAP_TYPE_ns__regEvent_t: 199 return soap_in_ns__regEvent_t(soap, NULL, NULL, "ns:regEvent-t"); 200 case SOAP_TYPE_re: 201 return soap_in_re(soap, NULL, NULL, "re"); 202 case SOAP_TYPE_ns__fileEvent_t: 203 return soap_in_ns__fileEvent_t(soap, NULL, NULL, "ns:fileEvent-t"); 204 case SOAP_TYPE_fe: 205 return soap_in_fe(soap, NULL, NULL, "fe"); 198 case SOAP_TYPE_ns__procEvent: 199 return soap_in_ns__procEvent(soap, NULL, NULL, "ns:procEvent"); 200 case SOAP_TYPE_ns__fileEvent: 201 return soap_in_ns__fileEvent(soap, NULL, NULL, "ns:fileEvent"); 202 case SOAP_TYPE_ns__regEvent: 203 return soap_in_ns__regEvent(soap, NULL, NULL, "ns:regEvent"); 206 204 case SOAP_TYPE_PointerTostring: 207 205 return soap_in_PointerTostring(soap, NULL, NULL, "xsd:string"); … … 227 225 return soap_in_unsignedInt(soap, NULL, NULL, NULL); 228 226 } 227 if (!soap_match_tag(soap, t, "ns:receiveEventsBase64")) 228 { *type = SOAP_TYPE_ns__receiveEventsBase64; 229 return soap_in_ns__receiveEventsBase64(soap, NULL, NULL, NULL); 230 } 229 231 if (!soap_match_tag(soap, t, "ns:openDocument")) 230 232 { *type = SOAP_TYPE_ns__openDocument; … … 291 293 return soap_in_ns__procEvent_t(soap, NULL, NULL, NULL); 292 294 } 293 if (!soap_match_tag(soap, t, "pe")) 294 { *type = SOAP_TYPE_pe; 295 return soap_in_pe(soap, NULL, NULL, NULL); 296 } 297 if (!soap_match_tag(soap, t, "ns:regEvent-t")) 298 { *type = SOAP_TYPE_ns__regEvent_t; 299 return soap_in_ns__regEvent_t(soap, NULL, NULL, NULL); 300 } 301 if (!soap_match_tag(soap, t, "re")) 302 { *type = SOAP_TYPE_re; 303 return soap_in_re(soap, NULL, NULL, NULL); 304 } 305 if (!soap_match_tag(soap, t, "ns:fileEvent-t")) 306 { *type = SOAP_TYPE_ns__fileEvent_t; 307 return soap_in_ns__fileEvent_t(soap, NULL, NULL, NULL); 308 } 309 if (!soap_match_tag(soap, t, "fe")) 310 { *type = SOAP_TYPE_fe; 311 return soap_in_fe(soap, NULL, NULL, NULL); 295 if (!soap_match_tag(soap, t, "ns:procEvent")) 296 { *type = SOAP_TYPE_ns__procEvent; 297 return soap_in_ns__procEvent(soap, NULL, NULL, NULL); 298 } 299 if (!soap_match_tag(soap, t, "ns:fileEvent")) 300 { *type = SOAP_TYPE_ns__fileEvent; 301 return soap_in_ns__fileEvent(soap, NULL, NULL, NULL); 302 } 303 if (!soap_match_tag(soap, t, "ns:regEvent")) 304 { *type = SOAP_TYPE_ns__regEvent; 305 return soap_in_ns__regEvent(soap, NULL, NULL, NULL); 312 306 } 313 307 if (!soap_match_tag(soap, t, "xsd:string")) … … 395 389 case SOAP_TYPE_unsignedInt: 396 390 return soap_out_unsignedInt(soap, tag, id, (const unsigned int *)ptr, "xsd:unsignedInt"); 391 case SOAP_TYPE_ns__receiveEventsBase64: 392 return soap_out_ns__receiveEventsBase64(soap, tag, id, (const struct ns__receiveEventsBase64 *)ptr, "ns:receiveEventsBase64"); 397 393 case SOAP_TYPE_ns__openDocument: 398 394 return soap_out_ns__openDocument(soap, tag, id, (const struct ns__openDocument *)ptr, "ns:openDocument"); … … 426 422 return soap_out_s1(soap, tag, id, (const struct s1 *)ptr, "s1"); 427 423 case SOAP_TYPE_ns__procEvent_t: 428 return soap_out_ns__procEvent_t(soap, tag, id, (const struct pe *)ptr, "ns:procEvent-t"); 429 case SOAP_TYPE_pe: 430 return soap_out_pe(soap, tag, id, (const struct pe *)ptr, "pe"); 431 case SOAP_TYPE_ns__regEvent_t: 432 return soap_out_ns__regEvent_t(soap, tag, id, (const struct re *)ptr, "ns:regEvent-t"); 433 case SOAP_TYPE_re: 434 return soap_out_re(soap, tag, id, (const struct re *)ptr, "re"); 435 case SOAP_TYPE_ns__fileEvent_t: 436 return soap_out_ns__fileEvent_t(soap, tag, id, (const struct fe *)ptr, "ns:fileEvent-t"); 437 case SOAP_TYPE_fe: 438 return soap_out_fe(soap, tag, id, (const struct fe *)ptr, "fe"); 424 return soap_out_ns__procEvent_t(soap, tag, id, (const struct ns__procEvent *)ptr, "ns:procEvent-t"); 425 case SOAP_TYPE_ns__procEvent: 426 return soap_out_ns__procEvent(soap, tag, id, (const struct ns__procEvent *)ptr, "ns:procEvent"); 427 case SOAP_TYPE_ns__fileEvent: 428 return soap_out_ns__fileEvent(soap, tag, id, (const struct ns__fileEvent *)ptr, "ns:fileEvent"); 429 case SOAP_TYPE_ns__regEvent: 430 return soap_out_ns__regEvent(soap, tag, id, (const struct ns__regEvent *)ptr, "ns:regEvent"); 439 431 case SOAP_TYPE_PointerTostring: 440 432 return soap_out_PointerTostring(soap, tag, id, (char **const*)ptr, "xsd:string"); … … 462 454 switch (type) 463 455 { 456 case SOAP_TYPE_ns__receiveEventsBase64: 457 soap_serialize_ns__receiveEventsBase64(soap, (const struct ns__receiveEventsBase64 *)ptr); 458 break; 464 459 case SOAP_TYPE_ns__openDocument: 465 460 soap_serialize_ns__openDocument(soap, (const struct ns__openDocument *)ptr); … … 508 503 break; 509 504 case SOAP_TYPE_ns__procEvent_t: 510 soap_serialize_ns__procEvent_t(soap, (const struct pe *)ptr); 511 break; 512 case SOAP_TYPE_pe: 513 soap_serialize_pe(soap, (const struct pe *)ptr); 514 break; 515 case SOAP_TYPE_ns__regEvent_t: 516 soap_serialize_ns__regEvent_t(soap, (const struct re *)ptr); 517 break; 518 case SOAP_TYPE_re: 519 soap_serialize_re(soap, (const struct re *)ptr); 520 break; 521 case SOAP_TYPE_ns__fileEvent_t: 522 soap_serialize_ns__fileEvent_t(soap, (const struct fe *)ptr); 523 break; 524 case SOAP_TYPE_fe: 525 soap_serialize_fe(soap, (const struct fe *)ptr); 505 soap_serialize_ns__procEvent_t(soap, (const struct ns__procEvent *)ptr); 506 break; 507 case SOAP_TYPE_ns__procEvent: 508 soap_serialize_ns__procEvent(soap, (const struct ns__procEvent *)ptr); 509 break; 510 case SOAP_TYPE_ns__fileEvent: 511 soap_serialize_ns__fileEvent(soap, (const struct ns__fileEvent *)ptr); 512 break; 513 case SOAP_TYPE_ns__regEvent: 514 soap_serialize_ns__regEvent(soap, (const struct ns__regEvent *)ptr); 526 515 break; 527 516 case SOAP_TYPE_PointerTostring: … … 546 535 switch (t) 547 536 { 548 case SOAP_TYPE_ fe:549 return (void*)soap_instantiate_ fe(soap, -1, type, arrayType, n);550 case SOAP_TYPE_ re:551 return (void*)soap_instantiate_ re(soap, -1, type, arrayType, n);552 case SOAP_TYPE_ pe:553 return (void*)soap_instantiate_ pe(soap, -1, type, arrayType, n);537 case SOAP_TYPE_ns__regEvent: 538 return (void*)soap_instantiate_ns__regEvent(soap, -1, type, arrayType, n); 539 case SOAP_TYPE_ns__fileEvent: 540 return (void*)soap_instantiate_ns__fileEvent(soap, -1, type, arrayType, n); 541 case SOAP_TYPE_ns__procEvent: 542 return (void*)soap_instantiate_ns__procEvent(soap, -1, type, arrayType, n); 554 543 case SOAP_TYPE_s1: 555 544 return (void*)soap_instantiate_s1(soap, -1, type, arrayType, n); … … 578 567 case SOAP_TYPE_ns__openDocument: 579 568 return (void*)soap_instantiate_ns__openDocument(soap, -1, type, arrayType, n); 569 case SOAP_TYPE_ns__receiveEventsBase64: 570 return (void*)soap_instantiate_ns__receiveEventsBase64(soap, -1, type, arrayType, n); 580 571 #ifndef WITH_NOGLOBAL 581 572 case SOAP_TYPE_SOAP_ENV__Header: … … 598 589 return (void*)soap_instantiate_SOAP_ENV__Fault(soap, -1, type, arrayType, n); 599 590 #endif 600 case SOAP_TYPE_ns__fileEvent_t:601 return (void*)soap_instantiate_ns__fileEvent_t(soap, -1, type, arrayType, n);602 case SOAP_TYPE_ns__regEvent_t:603 return (void*)soap_instantiate_ns__regEvent_t(soap, -1, type, arrayType, n);604 591 case SOAP_TYPE_ns__procEvent_t: 605 592 return (void*)soap_instantiate_ns__procEvent_t(soap, -1, type, arrayType, n); … … 615 602 { switch (p->type) 616 603 { 617 case SOAP_TYPE_ fe:604 case SOAP_TYPE_ns__regEvent: 618 605 if (p->size < 0) 619 delete (struct fe*)p->ptr;606 delete (struct ns__regEvent*)p->ptr; 620 607 else 621 delete[] (struct fe*)p->ptr;622 break; 623 case SOAP_TYPE_ re:608 delete[] (struct ns__regEvent*)p->ptr; 609 break; 610 case SOAP_TYPE_ns__fileEvent: 624 611 if (p->size < 0) 625 delete (struct re*)p->ptr;612 delete (struct ns__fileEvent*)p->ptr; 626 613 else 627 delete[] (struct re*)p->ptr;628 break; 629 case SOAP_TYPE_ pe:614 delete[] (struct ns__fileEvent*)p->ptr; 615 break; 616 case SOAP_TYPE_ns__procEvent: 630 617 if (p->size < 0) 631 delete (struct pe*)p->ptr;618 delete (struct ns__procEvent*)p->ptr; 632 619 else 633 delete[] (struct pe*)p->ptr;620 delete[] (struct ns__procEvent*)p->ptr; 634 621 break; 635 622 case SOAP_TYPE_s1: … … 711 698 delete[] (struct ns__openDocument*)p->ptr; 712 699 break; 700 case SOAP_TYPE_ns__receiveEventsBase64: 701 if (p->size < 0) 702 delete (struct ns__receiveEventsBase64*)p->ptr; 703 else 704 delete[] (struct ns__receiveEventsBase64*)p->ptr; 705 break; 713 706 case SOAP_TYPE_SOAP_ENV__Header: 714 707 if (p->size < 0) … … 741 734 delete[] (struct SOAP_ENV__Fault*)p->ptr; 742 735 break; 743 case SOAP_TYPE_ns__fileEvent_t:744 if (p->size < 0)745 delete (struct fe*)p->ptr;746 else747 delete[] (struct fe*)p->ptr;748 break;749 case SOAP_TYPE_ns__regEvent_t:750 if (p->size < 0)751 delete (struct re*)p->ptr;752 else753 delete[] (struct re*)p->ptr;754 break;755 736 case SOAP_TYPE_ns__procEvent_t: 756 737 if (p->size < 0) 757 delete (struct pe*)p->ptr;738 delete (struct ns__procEvent*)p->ptr; 758 739 else 759 delete[] (struct pe*)p->ptr;740 delete[] (struct ns__procEvent*)p->ptr; 760 741 break; 761 742 case SOAP_TYPE_ns__receiveFileStruct: … … 1536 1517 #endif 1537 1518 1519 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__receiveEventsBase64(struct soap *soap, struct ns__receiveEventsBase64 *a) 1520 { 1521 (void)soap; (void)a; /* appease -Wall -Werror */ 1522 soap_default_int(soap, &a->maxEventsReturned); 1523 } 1524 1525 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__receiveEventsBase64(struct soap *soap, const struct ns__receiveEventsBase64 *a) 1526 { 1527 (void)soap; (void)a; /* appease -Wall -Werror */ 1528 } 1529 1530 SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__receiveEventsBase64(struct soap *soap, const struct ns__receiveEventsBase64 *a, const char *tag, const char *type) 1531 { 1532 register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__receiveEventsBase64); 1533 if (soap_out_ns__receiveEventsBase64(soap, tag, id, a, type)) 1534 return soap->error; 1535 return soap_putindependent(soap); 1536 } 1537 1538 SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__receiveEventsBase64(struct soap *soap, const char *tag, int id, const struct ns__receiveEventsBase64 *a, const char *type) 1539 { 1540 if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__receiveEventsBase64), type)) 1541 return soap->error; 1542 if (soap_out_int(soap, "maxEventsReturned", -1, &a->maxEventsReturned, "")) 1543 return soap->error; 1544 return soap_element_end_out(soap, tag); 1545 } 1546 1547 SOAP_FMAC3 struct ns__receiveEventsBase64 * SOAP_FMAC4 soap_get_ns__receiveEventsBase64(struct soap *soap, struct ns__receiveEventsBase64 *p, const char *tag, const char *type) 1548 { 1549 if ((p = soap_in_ns__receiveEventsBase64(soap, tag, p, type))) 1550 if (soap_getindependent(soap)) 1551 return NULL; 1552 return p; 1553 } 1554 1555 SOAP_FMAC3 struct ns__receiveEventsBase64 * SOAP_FMAC4 soap_in_ns__receiveEventsBase64(struct soap *soap, const char *tag, struct ns__receiveEventsBase64 *a, const char *type) 1556 { 1557 short soap_flag_maxEventsReturned = 1; 1558 if (soap_element_begin_in(soap, tag, 0, type)) 1559 return NULL; 1560 a = (struct ns__receiveEventsBase64 *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__receiveEventsBase64, sizeof(struct ns__receiveEventsBase64), 0, NULL, NULL, NULL); 1561 if (!a) 1562 return NULL; 1563 soap_default_ns__receiveEventsBase64(soap, a); 1564 if (soap->body && !*soap->href) 1565 { 1566 for (;;) 1567 { soap->error = SOAP_TAG_MISMATCH; 1568 if (soap_flag_maxEventsReturned && soap->error == SOAP_TAG_MISMATCH) 1569 if (soap_in_int(soap, "maxEventsReturned", &a->maxEventsReturned, "xsd:int")) 1570 { soap_flag_maxEventsReturned--; 1571 continue; 1572 } 1573 if (soap->error == SOAP_TAG_MISMATCH) 1574 soap->error = soap_ignore_element(soap); 1575 if (soap->error == SOAP_NO_TAG) 1576 break; 1577 if (soap->error) 1578 return NULL; 1579 } 1580 if (soap_element_end_in(soap, tag)) 1581 return NULL; 1582 } 1583 else 1584 { a = (struct ns__receiveEventsBase64 *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns__receiveEventsBase64, 0, sizeof(struct ns__receiveEventsBase64), 0, NULL); 1585 if (soap->body && soap_element_end_in(soap, tag)) 1586 return NULL; 1587 } 1588 if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_maxEventsReturned > 0)) 1589 { soap->error = SOAP_OCCURS; 1590 return NULL; 1591 } 1592 return a; 1593 } 1594 1595 SOAP_FMAC5 struct ns__receiveEventsBase64 * SOAP_FMAC6 soap_new_ns__receiveEventsBase64(struct soap *soap, int n) 1596 { return soap_instantiate_ns__receiveEventsBase64(soap, n, NULL, NULL, NULL); 1597 } 1598 1599 SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__receiveEventsBase64(struct soap *soap, struct ns__receiveEventsBase64 *p) 1600 { soap_delete(soap, p); 1601 } 1602 1603 SOAP_FMAC3 struct ns__receiveEventsBase64 * SOAP_FMAC4 soap_instantiate_ns__receiveEventsBase64(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) 1604 { 1605 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__receiveEventsBase64(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); 1606 struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__receiveEventsBase64, n, soap_fdelete); 1607 if (!cp) 1608 return NULL; 1609 if (n < 0) 1610 { cp->ptr = (void*)new struct ns__receiveEventsBase64; 1611 if (size) 1612 *size = sizeof(struct ns__receiveEventsBase64); 1613 } 1614 else 1615 { cp->ptr = (void*)new struct ns__receiveEventsBase64[n]; 1616 if (!cp->ptr) 1617 { soap->error = SOAP_EOM; 1618 return NULL; 1619 } 1620 if (size) 1621 *size = n * sizeof(struct ns__receiveEventsBase64); 1622 } 1623 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); 1624 return (struct ns__receiveEventsBase64*)cp->ptr; 1625 } 1626 SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__receiveEventsBase64(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) 1627 { 1628 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__receiveEventsBase64 %p -> %p\n", q, p)); 1629 *(struct ns__receiveEventsBase64*)p = *(struct ns__receiveEventsBase64*)q; 1630 } 1631 1538 1632 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__openDocument(struct soap *soap, struct ns__openDocument *a) 1539 1633 { … … 3340 3434 } 3341 3435 3342 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__procEvent_t(struct soap *soap, struct pe*a)3343 { soap_default_ pe(soap, a);3344 } 3345 3346 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__procEvent_t(struct soap *soap, struct peconst*a)3347 { soap_serialize_ pe(soap, a);3348 } 3349 3350 SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__procEvent_t(struct soap *soap, const struct pe*a, const char *tag, const char *type)3436 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__procEvent_t(struct soap *soap, struct ns__procEvent *a) 3437 { soap_default_ns__procEvent(soap, a); 3438 } 3439 3440 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__procEvent_t(struct soap *soap, struct ns__procEvent const*a) 3441 { soap_serialize_ns__procEvent(soap, a); 3442 } 3443 3444 SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__procEvent_t(struct soap *soap, const struct ns__procEvent *a, const char *tag, const char *type) 3351 3445 { 3352 3446 register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__procEvent_t); … … 3356 3450 } 3357 3451 3358 SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__procEvent_t(struct soap *soap, const char *tag, int id, const struct pe*a, const char *type)3452 SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__procEvent_t(struct soap *soap, const char *tag, int id, const struct ns__procEvent *a, const char *type) 3359 3453 { 3360 3454 if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__procEvent_t), type)) … … 3375 3469 } 3376 3470 3377 SOAP_FMAC3 struct pe * SOAP_FMAC4 soap_get_ns__procEvent_t(struct soap *soap, struct pe*p, const char *tag, const char *type)3471 SOAP_FMAC3 struct ns__procEvent * SOAP_FMAC4 soap_get_ns__procEvent_t(struct soap *soap, struct ns__procEvent *p, const char *tag, const char *type) 3378 3472 { 3379 3473 if ((p = soap_in_ns__procEvent_t(soap, tag, p, type))) … … 3383 3477 } 3384 3478 3385 SOAP_FMAC3 struct pe * SOAP_FMAC4 soap_in_ns__procEvent_t(struct soap *soap, const char *tag, struct pe*a, const char *type)3479 SOAP_FMAC3 struct ns__procEvent * SOAP_FMAC4 soap_in_ns__procEvent_t(struct soap *soap, const char *tag, struct ns__procEvent *a, const char *type) 3386 3480 { 3387 3481 short soap_flag_time = 1, soap_flag_eventType = 1, soap_flag_parentPID = 1, soap_flag_parentName = 1, soap_flag_procPID = 1, soap_flag_procName = 1; 3388 3482 if (soap_element_begin_in(soap, tag, 0, type)) 3389 3483 return NULL; 3390 a = (struct pe *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__procEvent_t, sizeof(struct pe), 0, NULL, NULL, NULL);3484 a = (struct ns__procEvent *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__procEvent_t, sizeof(struct ns__procEvent), 0, NULL, NULL, NULL); 3391 3485 if (!a) 3392 3486 return NULL; … … 3437 3531 } 3438 3532 else 3439 { a = (struct pe *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns__procEvent_t, 0, sizeof(struct pe), 0, NULL);3533 { a = (struct ns__procEvent *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns__procEvent_t, 0, sizeof(struct ns__procEvent), 0, NULL); 3440 3534 if (soap->body && soap_element_end_in(soap, tag)) 3441 3535 return NULL; … … 3448 3542 } 3449 3543 3450 SOAP_FMAC5 struct pe* SOAP_FMAC6 soap_new_ns__procEvent_t(struct soap *soap, int n)3544 SOAP_FMAC5 struct ns__procEvent * SOAP_FMAC6 soap_new_ns__procEvent_t(struct soap *soap, int n) 3451 3545 { return soap_instantiate_ns__procEvent_t(soap, n, NULL, NULL, NULL); 3452 3546 } 3453 3547 3454 SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__procEvent_t(struct soap *soap, struct pe*p)3548 SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__procEvent_t(struct soap *soap, struct ns__procEvent *p) 3455 3549 { soap_delete(soap, p); 3456 3550 } 3457 3551 3458 SOAP_FMAC3 struct pe* SOAP_FMAC4 soap_instantiate_ns__procEvent_t(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)3552 SOAP_FMAC3 struct ns__procEvent * SOAP_FMAC4 soap_instantiate_ns__procEvent_t(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) 3459 3553 { 3460 3554 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__procEvent_t(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); … … 3463 3557 return NULL; 3464 3558 if (n < 0) 3465 { cp->ptr = (void*)new struct pe;3466 if (size) 3467 *size = sizeof(struct pe);3468 } 3469 else 3470 { cp->ptr = (void*)new struct pe[n];3559 { cp->ptr = (void*)new struct ns__procEvent; 3560 if (size) 3561 *size = sizeof(struct ns__procEvent); 3562 } 3563 else 3564 { cp->ptr = (void*)new struct ns__procEvent[n]; 3471 3565 if (!cp->ptr) 3472 3566 { soap->error = SOAP_EOM; … … 3474 3568 } 3475 3569 if (size) 3476 *size = n * sizeof(struct pe);3570 *size = n * sizeof(struct ns__procEvent); 3477 3571 } 3478 3572 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); 3479 return (struct pe*)cp->ptr;3573 return (struct ns__procEvent*)cp->ptr; 3480 3574 } 3481 3575 SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__procEvent_t(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) 3482 3576 { 3483 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct pe%p -> %p\n", q, p));3484 *(struct pe*)p = *(struct pe*)q;3485 } 3486 3487 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ pe(struct soap *soap, struct pe*a)3577 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__procEvent %p -> %p\n", q, p)); 3578 *(struct ns__procEvent*)p = *(struct ns__procEvent*)q; 3579 } 3580 3581 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__procEvent(struct soap *soap, struct ns__procEvent *a) 3488 3582 { 3489 3583 (void)soap; (void)a; /* appease -Wall -Werror */ … … 3496 3590 } 3497 3591 3498 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ pe(struct soap *soap, const struct pe*a)3592 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__procEvent(struct soap *soap, const struct ns__procEvent *a) 3499 3593 { 3500 3594 (void)soap; (void)a; /* appease -Wall -Werror */ … … 3505 3599 } 3506 3600 3507 SOAP_FMAC3 int SOAP_FMAC4 soap_put_ pe(struct soap *soap, const struct pe*a, const char *tag, const char *type)3508 { 3509 register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ pe);3510 if (soap_out_ pe(soap, tag, id, a, type))3601 SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__procEvent(struct soap *soap, const struct ns__procEvent *a, const char *tag, const char *type) 3602 { 3603 register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__procEvent); 3604 if (soap_out_ns__procEvent(soap, tag, id, a, type)) 3511 3605 return soap->error; 3512 3606 return soap_putindependent(soap); 3513 3607 } 3514 3608 3515 SOAP_FMAC3 int SOAP_FMAC4 soap_out_ pe(struct soap *soap, const char *tag, int id, const struct pe*a, const char *type)3516 { 3517 if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ pe), type))3609 SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__procEvent(struct soap *soap, const char *tag, int id, const struct ns__procEvent *a, const char *type) 3610 { 3611 if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__procEvent), type)) 3518 3612 return soap->error; 3519 3613 if (soap_out_string(soap, "time", -1, &a->time, "")) … … 3532 3626 } 3533 3627 3534 SOAP_FMAC3 struct pe * SOAP_FMAC4 soap_get_pe(struct soap *soap, struct pe*p, const char *tag, const char *type)3535 { 3536 if ((p = soap_in_ pe(soap, tag, p, type)))3628 SOAP_FMAC3 struct ns__procEvent * SOAP_FMAC4 soap_get_ns__procEvent(struct soap *soap, struct ns__procEvent *p, const char *tag, const char *type) 3629 { 3630 if ((p = soap_in_ns__procEvent(soap, tag, p, type))) 3537 3631 if (soap_getindependent(soap)) 3538 3632 return NULL; … … 3540 3634 } 3541 3635 3542 SOAP_FMAC3 struct pe * SOAP_FMAC4 soap_in_pe(struct soap *soap, const char *tag, struct pe*a, const char *type)3636 SOAP_FMAC3 struct ns__procEvent * SOAP_FMAC4 soap_in_ns__procEvent(struct soap *soap, const char *tag, struct ns__procEvent *a, const char *type) 3543 3637 { 3544 3638 short soap_flag_time = 1, soap_flag_eventType = 1, soap_flag_parentPID = 1, soap_flag_parentName = 1, soap_flag_procPID = 1, soap_flag_procName = 1; 3545 3639 if (soap_element_begin_in(soap, tag, 0, type)) 3546 3640 return NULL; 3547 a = (struct pe *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_pe, sizeof(struct pe), 0, NULL, NULL, NULL);3641 a = (struct ns__procEvent *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__procEvent, sizeof(struct ns__procEvent), 0, NULL, NULL, NULL); 3548 3642 if (!a) 3549 3643 return NULL; 3550 soap_default_ pe(soap, a);3644 soap_default_ns__procEvent(soap, a); 3551 3645 if (soap->body && !*soap->href) 3552 3646 { … … 3594 3688 } 3595 3689 else 3596 { a = (struct pe *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_pe, 0, sizeof(struct pe), 0, NULL);3690 { a = (struct ns__procEvent *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns__procEvent, 0, sizeof(struct ns__procEvent), 0, NULL); 3597 3691 if (soap->body && soap_element_end_in(soap, tag)) 3598 3692 return NULL; … … 3605 3699 } 3606 3700 3607 SOAP_FMAC5 struct pe * SOAP_FMAC6 soap_new_pe(struct soap *soap, int n)3608 { return soap_instantiate_ pe(soap, n, NULL, NULL, NULL);3609 } 3610 3611 SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ pe(struct soap *soap, struct pe*p)3701 SOAP_FMAC5 struct ns__procEvent * SOAP_FMAC6 soap_new_ns__procEvent(struct soap *soap, int n) 3702 { return soap_instantiate_ns__procEvent(soap, n, NULL, NULL, NULL); 3703 } 3704 3705 SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__procEvent(struct soap *soap, struct ns__procEvent *p) 3612 3706 { soap_delete(soap, p); 3613 3707 } 3614 3708 3615 SOAP_FMAC3 struct pe * SOAP_FMAC4 soap_instantiate_pe(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)3616 { 3617 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ pe(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));3618 struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ pe, n, soap_fdelete);3709 SOAP_FMAC3 struct ns__procEvent * SOAP_FMAC4 soap_instantiate_ns__procEvent(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) 3710 { 3711 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__procEvent(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); 3712 struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__procEvent, n, soap_fdelete); 3619 3713 if (!cp) 3620 3714 return NULL; 3621 3715 if (n < 0) 3622 { cp->ptr = (void*)new struct pe;3623 if (size) 3624 *size = sizeof(struct pe);3625 } 3626 else 3627 { cp->ptr = (void*)new struct pe[n];3716 { cp->ptr = (void*)new struct ns__procEvent; 3717 if (size) 3718 *size = sizeof(struct ns__procEvent); 3719 } 3720 else 3721
