home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 May / MICD_2000_05.iso / CBuilder5 / INSTALL / DATA1.CAB / Program_Built_Files / Include / Vcl / xmlbrokr.hpp < prev   
C/C++ Source or Header  |  2000-02-01  |  10KB  |  259 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1999 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'XMLBrokr.pas' rev: 5.00
  6.  
  7. #ifndef XMLBrokrHPP
  8. #define XMLBrokrHPP
  9.  
  10. #pragma delphiheader begin
  11. #pragma option push -w-
  12. #pragma option push -Vx
  13. #include <Midas.hpp>    // Pascal unit
  14. #include <Masks.hpp>    // Pascal unit
  15. #include <WebComp.hpp>    // Pascal unit
  16. #include <Provider.hpp>    // Pascal unit
  17. #include <DBClient.hpp>    // Pascal unit
  18. #include <Db.hpp>    // Pascal unit
  19. #include <HTTPApp.hpp>    // Pascal unit
  20. #include <Classes.hpp>    // Pascal unit
  21. #include <SysInit.hpp>    // Pascal unit
  22. #include <System.hpp>    // Pascal unit
  23.  
  24. //-- user supplied -----------------------------------------------------------
  25.  
  26. namespace Xmlbrokr
  27. {
  28. //-- type declarations -------------------------------------------------------
  29. typedef void __fastcall (__closure *TRequestRecordsEvent)(System::TObject* Sender, Httpapp::TWebRequest* 
  30.     Request, /* out */ int &RecCount, OleVariant &OwnerData, AnsiString &Records);
  31.  
  32. typedef void __fastcall (__closure *TRequestUpdateEvent)(System::TObject* Sender, Httpapp::TWebRequest* 
  33.     Request, Httpapp::TWebResponse* Response, bool &Handled);
  34.  
  35. typedef void __fastcall (__closure *TGetErrorResponseEvent)(System::TObject* Sender, int ErrorCount, 
  36.     AnsiString XMLErrors, Httpapp::TWebRequest* Request, Httpapp::TWebResponse* Response, bool &Handled
  37.     );
  38.  
  39. typedef void __fastcall (__closure *TGetResponseEvent)(System::TObject* Sender, Httpapp::TWebRequest* 
  40.     Request, Httpapp::TWebResponse* Response, bool &Handled);
  41.  
  42. class DELPHICLASS TXMLParams;
  43. class PASCALIMPLEMENTATION TXMLParams : public Db::TParams 
  44. {
  45.     typedef Db::TParams inherited;
  46.     
  47. protected:
  48.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  49.     
  50. public:
  51.     void __fastcall AssignStrings(Classes::TStrings* Value);
  52. public:
  53.     #pragma option push -w-inl
  54.     /* TParams.Create */ inline __fastcall TXMLParams(Classes::TPersistent* Owner)/* overload */ : Db::TParams(
  55.         Owner) { }
  56.     #pragma option pop
  57.     
  58. public:
  59.     #pragma option push -w-inl
  60.     /* TCollection.Destroy */ inline __fastcall virtual ~TXMLParams(void) { }
  61.     #pragma option pop
  62.     
  63. };
  64.  
  65.  
  66. #pragma option push -b-
  67. enum TXMLOption { xoQuote };
  68. #pragma option pop
  69.  
  70. typedef Set<TXMLOption, xoQuote, xoQuote>  TXMLOptions;
  71.  
  72. class DELPHICLASS TXMLBroker;
  73. class DELPHICLASS TWebDispatch;
  74. class DELPHICLASS TWebPathInfo;
  75. class PASCALIMPLEMENTATION TWebPathInfo : public System::TObject 
  76. {
  77.     typedef System::TObject inherited;
  78.     
  79. private:
  80.     Masks::TMask* FMask;
  81.     AnsiString FMaskPathInfo;
  82.     AnsiString FPathInfo;
  83.     Classes::TComponent* FOwner;
  84.     Masks::TMask* __fastcall GetMask(void);
  85.     AnsiString __fastcall GetPathInfo();
  86.     void __fastcall SetPathInfo(const AnsiString Value);
  87.     
  88. public:
  89.     __fastcall TWebPathInfo(Classes::TComponent* AOwner);
  90.     __fastcall virtual ~TWebPathInfo(void);
  91.     __property Masks::TMask* Mask = {read=GetMask};
  92.     __property AnsiString PathInfo = {read=GetPathInfo, write=SetPathInfo};
  93. };
  94.  
  95.  
  96. class PASCALIMPLEMENTATION TWebDispatch : public Classes::TPersistent 
  97. {
  98.     typedef Classes::TPersistent inherited;
  99.     
  100. private:
  101.     TWebPathInfo* FPathInfo;
  102.     Httpapp::TMethodType FMethodType;
  103.     bool FEnabled;
  104.     Masks::TMask* __fastcall GetMask(void);
  105.     
  106. protected:
  107.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  108.     void __fastcall SetPathInfo(const AnsiString Value);
  109.     AnsiString __fastcall GetPathInfo();
  110.     
  111. public:
  112.     __fastcall TWebDispatch(Classes::TComponent* AComponent);
  113.     __fastcall virtual ~TWebDispatch(void);
  114.     __property Masks::TMask* Mask = {read=GetMask};
  115.     
  116. __published:
  117.     __property bool Enabled = {read=FEnabled, write=FEnabled, default=1};
  118.     __property Httpapp::TMethodType MethodType = {read=FMethodType, write=FMethodType, default=3};
  119.     __property AnsiString PathInfo = {read=GetPathInfo, write=SetPathInfo};
  120. };
  121.  
  122.  
  123. class PASCALIMPLEMENTATION TXMLBroker : public Classes::TComponent 
  124. {
  125.     typedef Classes::TComponent inherited;
  126.     
  127. private:
  128.     TWebDispatch* FWebDispatch;
  129.     Midas::_di_IAppServer FAppServer;
  130.     AnsiString FProviderName;
  131.     Dbclient::TCustomRemoteServer* FRemoteServer;
  132.     TXMLParams* FParams;
  133.     int FMaxRecords;
  134.     TRequestRecordsEvent FRequestRecords;
  135.     Httpapp::THTTPMethodEvent FBeforeDispatch;
  136.     Httpapp::THTTPMethodEvent FAfterDispatch;
  137.     TRequestUpdateEvent FRequestUpdate;
  138.     int FMaxErrors;
  139.     Httpapp::TCustomContentProducer* FReconcileProducer;
  140.     TGetResponseEvent FGetResponse;
  141.     TGetErrorResponseEvent FGetErrorResponse;
  142.     AnsiString FErrors;
  143.     int FErrorCount;
  144.     Classes::TList* FNotify;
  145.     
  146. protected:
  147.     void __fastcall AS_FetchParams(void);
  148.     OleVariant __fastcall AS_GetRecords(int Count, /* out */ int &RecsOut, int Options, const WideString 
  149.         CommandText, const OleVariant &Params, OleVariant &OwnerData);
  150.     OleVariant __fastcall AS_ApplyUpdates(const OleVariant &Delta, int MaxErrors, /* out */ int &ErrorCount
  151.         );
  152.     bool __fastcall DispatchEnabled(void);
  153.     Httpapp::TMethodType __fastcall DispatchMethodType(void);
  154.     bool __fastcall DispatchRequest(System::TObject* Sender, Httpapp::TWebRequest* Request, Httpapp::TWebResponse* 
  155.         Response);
  156.     Masks::TMask* __fastcall DispatchMask(void);
  157.     Classes::_di_IInterfaceList __fastcall DispatchSubItems();
  158.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  159.         );
  160.     void __fastcall SetWebDispatch(const TWebDispatch* Value);
  161.     Midas::_di_IAppServer __fastcall GetAppServer();
  162.     bool __fastcall GetHasAppServer(void);
  163.     void __fastcall SetAppServer(Midas::_di_IAppServer Value);
  164.     void __fastcall SetProviderName(const AnsiString Value);
  165.     void __fastcall SetRemoteServer(Dbclient::TCustomRemoteServer* Value);
  166.     bool __fastcall GetConnected(void);
  167.     void __fastcall SetConnected(bool Value);
  168.     void __fastcall CheckInactive(void);
  169.     void __fastcall SetParams(const TXMLParams* Value);
  170.     bool __fastcall GetErrorResponse(int ErrorCount, AnsiString XMLErrors, Httpapp::TWebRequest* Request
  171.         , Httpapp::TWebResponse* Response);
  172.     bool __fastcall GetResponse(Httpapp::TWebRequest* Request, Httpapp::TWebResponse* Response);
  173.     AnsiString __fastcall GetProducerName(Httpapp::TWebRequest* Request);
  174.     AnsiString __fastcall GetRedirect(Httpapp::TWebRequest* Request);
  175.     void __fastcall SendConnectEvent(bool Connecting);
  176.     System::TObject* __fastcall GetNotify(int Index);
  177.     int __fastcall GetNotifyCount(void);
  178.     void __fastcall SetReconcileProducer(const Httpapp::TCustomContentProducer* Value);
  179.     
  180. public:
  181.     __fastcall virtual TXMLBroker(Classes::TComponent* AOwner);
  182.     __fastcall virtual ~TXMLBroker(void);
  183.     AnsiString __fastcall GetXMLRecords(int &RecsOut, OleVariant &OwnerData, TXMLOptions XMLOptions);
  184.     AnsiString __fastcall ApplyXMLUpdates(const AnsiString Delta, /* out */ int &ErrorCount);
  185.     AnsiString __fastcall GetDelta(Httpapp::TWebRequest* Request);
  186.     AnsiString __fastcall GetErrors();
  187.     int __fastcall GetErrorCount(void);
  188.     AnsiString __fastcall HTMLSubmitFormName();
  189.     AnsiString __fastcall SubmitFormVarName();
  190.     AnsiString __fastcall RowSetVarName(Classes::TStrings* Path);
  191.     AnsiString __fastcall MasterRowSetVarName(Classes::TStrings* Path);
  192.     __property bool HasAppServer = {read=GetHasAppServer, nodefault};
  193.     void __fastcall SetProvider(Classes::TComponent* Provider);
  194.     __property Midas::_di_IAppServer AppServer = {read=GetAppServer, write=SetAppServer};
  195.     virtual AnsiString __fastcall RequestRecords(System::TObject* Sender, Httpapp::TWebRequest* Request
  196.         , /* out */ int &RecCount, OleVariant &OwnerData, TXMLOptions XMLOptions);
  197.     virtual bool __fastcall RequestUpdate(System::TObject* Sender, Httpapp::TWebRequest* Request, Httpapp::TWebResponse* 
  198.         Response);
  199.     virtual void __fastcall FetchParams(void);
  200.     void __fastcall AddNotify(System::TObject* ANotify);
  201.     void __fastcall RemoveNotify(System::TObject* ANotify);
  202.     __property System::TObject* Notify[int Index] = {read=GetNotify};
  203.     __property int NotifyCount = {read=GetNotifyCount, nodefault};
  204.     
  205. __published:
  206.     __property bool Connected = {read=GetConnected, write=SetConnected, stored=false, nodefault};
  207.     __property int MaxRecords = {read=FMaxRecords, write=FMaxRecords, default=-1};
  208.     __property int MaxErrors = {read=FMaxErrors, write=FMaxErrors, default=-1};
  209.     __property TXMLParams* Params = {read=FParams, write=SetParams};
  210.     __property AnsiString ProviderName = {read=FProviderName, write=SetProviderName};
  211.     __property Dbclient::TCustomRemoteServer* RemoteServer = {read=FRemoteServer, write=SetRemoteServer
  212.         };
  213.     __property TWebDispatch* WebDispatch = {read=FWebDispatch, write=SetWebDispatch};
  214.     __property TRequestRecordsEvent OnRequestRecords = {read=FRequestRecords, write=FRequestRecords};
  215.     __property TRequestUpdateEvent OnRequestUpdate = {read=FRequestUpdate, write=FRequestUpdate};
  216.     __property Httpapp::THTTPMethodEvent BeforeDispatch = {read=FBeforeDispatch, write=FBeforeDispatch}
  217.         ;
  218.     __property Httpapp::THTTPMethodEvent AfterDispatch = {read=FAfterDispatch, write=FAfterDispatch};
  219.     __property Httpapp::TCustomContentProducer* ReconcileProducer = {read=FReconcileProducer, write=SetReconcileProducer
  220.         };
  221.     __property TGetErrorResponseEvent OnGetErrorResponse = {read=FGetErrorResponse, write=FGetErrorResponse
  222.         };
  223.     __property TGetResponseEvent OnGetResponse = {read=FGetResponse, write=FGetResponse};
  224. private:
  225.     void *__IWebDispatch;    /* Httpapp::IWebDispatch */
  226.     
  227. public:
  228.     operator IWebDispatch*(void) { return (IWebDispatch*)&__IWebDispatch; }
  229.     
  230. };
  231.  
  232.  
  233. __interface INotifyConnectionChange;
  234. typedef System::DelphiInterface<INotifyConnectionChange> _di_INotifyConnectionChange;
  235. __interface INTERFACE_UUID("{0BC29A90-0EEC-11D3-AFED-00C04FB16EC3}") INotifyConnectionChange  : public IUnknown 
  236.     
  237. {
  238.     
  239. public:
  240.     virtual void __fastcall ConnectionChange(Classes::TComponent* Sender, bool Connected) = 0 ;
  241. };
  242.  
  243. //-- var, const, procedure ---------------------------------------------------
  244. #define sProducer "PRODUCER"
  245. #define sPostDelta "postdelta"
  246. #define sRedirect "REDIRECT"
  247. extern PACKAGE AnsiString __fastcall FormatXML(const AnsiString Value, TXMLOptions XMLOptions);
  248.  
  249. }    /* namespace Xmlbrokr */
  250. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  251. using namespace Xmlbrokr;
  252. #endif
  253. #pragma option pop    // -w-
  254. #pragma option pop    // -Vx
  255.  
  256. #pragma delphiheader end.
  257. //-- end unit ----------------------------------------------------------------
  258. #endif    // XMLBrokr
  259.