Ignore:
Timestamp:
Jul 6, 2008, 8:20:14 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Uploading from OR_30_258

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/foia-cprs/CPRS-Chart/VERGENCECONTEXTORLib_TLB.pas

    r459 r460  
    1212// ************************************************************************ //
    1313
    14 // PASTLWTR : $Revision:   1.130.1.0.1.0.1.6  $
    15 // File generated on 2/20/2003 12:37:40 PM from Type Library described below.
    16 
    17 // ************************************************************************  //
    18 // Type Lib: C:\Program Files\Sentillion\Sdk\WindowsComponents\VergenceContextor.dll (1)
    19 // LIBID: {30AFBABD-5FD3-11D3-8727-0060B0B5E137}
    20 // LCID: 0
     14// PASTLWTR : $Revision:   1.88.1.0.1.0  $
     15// File generated on 2/9/2004 9:12:53 AM from Type Library described below.
     16
     17// *************************************************************************//
     18// NOTE:                                                                     
     19// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties 
     20// which return objects that may need to be explicitly created via a function
     21// call prior to any access via the property. These items have been disabled 
     22// in order to prevent accidental use from within the object inspector. You   
     23// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively   
     24// removing them from the $IFDEF blocks. However, such items must still be   
     25// programmatically created via a method of the appropriate CoClass before   
     26// they can be used.                                                         
     27// ************************************************************************ //
     28// Type Lib: D:\Development\BDK32_p40\Source\VergenceContextor.dll (1)
     29// IID\LCID: {30AFBABD-5FD3-11D3-8727-0060B0B5E137}\0
    2130// Helpfile:
    2231// DepndLst:
     
    2534// Errors:
    2635//   Hint: Member 'Set' of 'IResponseDialogAccessor' changed to 'Set_'
     36//   Error creating palette bitmap of (TContextor) : Invalid GUID format
     37//   Error creating palette bitmap of (TContextItemCollection) : Invalid GUID format
     38//   Error creating palette bitmap of (TContextItem) : Invalid GUID format
     39//   Error creating palette bitmap of (TResponseDialog) : Invalid GUID format
     40//   Error creating palette bitmap of (TContextorParticipant) : Invalid GUID format
    2741// ************************************************************************ //
    2842{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
    29 {$WARN SYMBOL_PLATFORM OFF}
    30 {$WRITEABLECONST ON}
    31 {$VARPROPSETTER ON}
    3243interface
    3344
    34 uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL, Variants;
    35  
    36 
     45uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL;
    3746
    3847// *********************************************************************//
     
    162171    procedure Suspend; safecall;
    163172    procedure Resume; safecall;
    164     function Get_State: ContextorState; safecall;
    165     function GetPrivilege(const subj: WideString): AccessPrivilege; safecall;
    166     function Get_CurrentContext: IContextItemCollection; safecall;
     173    function  Get_State: ContextorState; safecall;
     174    function  GetPrivilege(const subj: WideString): AccessPrivilege; safecall;
     175    function  Get_CurrentContext: IContextItemCollection; safecall;
    167176    procedure StartContextChange; safecall;
    168     function EndContextChange(commit: WordBool; const aContextItemCollection: IContextItemCollection): UserResponse; safecall;
     177    function  EndContextChange(commit: WordBool;
     178                               const aContextItemCollection: IContextItemCollection): UserResponse; safecall;
    169179    procedure SetSurveyResponse(const reason: WideString); safecall;
    170     function Get_NotificationFilter: WideString; safecall;
     180    function  Get_NotificationFilter: WideString; safecall;
    171181    procedure Set_NotificationFilter(const filter: WideString); safecall;
    172     function Get_Name: WideString; safecall;
     182    function  Get_Name: WideString; safecall;
    173183    property State: ContextorState read Get_State;
    174184    property CurrentContext: IContextItemCollection read Get_CurrentContext;
     
    189199    procedure Resume; dispid 3;
    190200    property State: ContextorState readonly dispid 4;
    191     function GetPrivilege(const subj: WideString): AccessPrivilege; dispid 5;
     201    function  GetPrivilege(const subj: WideString): AccessPrivilege; dispid 5;
    192202    property CurrentContext: IContextItemCollection readonly dispid 6;
    193203    procedure StartContextChange; dispid 7;
    194     function EndContextChange(commit: WordBool; const aContextItemCollection: IContextItemCollection): UserResponse; dispid 8;
     204    function  EndContextChange(commit: WordBool;
     205                               const aContextItemCollection: IContextItemCollection): UserResponse; dispid 8;
    195206    procedure SetSurveyResponse(const reason: WideString); dispid 9;
    196207    property NotificationFilter: WideString dispid 10;
     
    205216  IContextParticipant = interface(IDispatch)
    206217    ['{3E3DD272-998E-11D0-808D-00A0240943E4}']
    207     function ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString; safecall;
     218    function  ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString; safecall;
    208219    procedure ContextChangesAccepted(contextCoupon: Integer); safecall;
    209220    procedure ContextChangesCanceled(contextCoupon: Integer); safecall;
     
    219230  IContextParticipantDisp = dispinterface
    220231    ['{3E3DD272-998E-11D0-808D-00A0240943E4}']
    221     function ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString; dispid 1610743808;
     232    function  ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString; dispid 1610743808;
    222233    procedure ContextChangesAccepted(contextCoupon: Integer); dispid 1610743809;
    223234    procedure ContextChangesCanceled(contextCoupon: Integer); dispid 1610743810;
     
    233244  IContextItemCollection = interface(IDispatch)
    234245    ['{AC4C0271-615A-11D3-84B5-0000861FDD4F}']
    235     function Count: Integer; safecall;
     246    function  Count: Integer; safecall;
    236247    procedure Add(const aContextItem: IContextItem); safecall;
    237248    procedure Remove(const contextItemName: WideString); safecall;
    238249    procedure RemoveAll; safecall;
    239     function Present(key: OleVariant): IContextItem; safecall;
    240     function Get__NewEnum: IUnknown; safecall;
    241     function Item(key: OleVariant): IContextItem; safecall;
     250    function  Present(key: OleVariant): IContextItem; safecall;
     251    function  Get__NewEnum: IUnknown; safecall;
     252    function  Item(key: OleVariant): IContextItem; safecall;
    242253    property _NewEnum: IUnknown read Get__NewEnum;
    243254  end;
     
    250261  IContextItemCollectionDisp = dispinterface
    251262    ['{AC4C0271-615A-11D3-84B5-0000861FDD4F}']
    252     function Count: Integer; dispid 1;
     263    function  Count: Integer; dispid 1;
    253264    procedure Add(const aContextItem: IContextItem); dispid 2;
    254265    procedure Remove(const contextItemName: WideString); dispid 3;
    255266    procedure RemoveAll; dispid 4;
    256     function Present(key: OleVariant): IContextItem; dispid 5;
     267    function  Present(key: OleVariant): IContextItem; dispid 5;
    257268    property _NewEnum: IUnknown readonly dispid -4;
    258     function Item(key: OleVariant): IContextItem; dispid 0;
     269    function  Item(key: OleVariant): IContextItem; dispid 0;
    259270  end;
    260271
     
    266277  IContextItem = interface(IDispatch)
    267278    ['{AC4C0273-615A-11D3-84B5-0000861FDD4F}']
    268     function Get_Subject: WideString; safecall;
     279    function  Get_Subject: WideString; safecall;
    269280    procedure Set_Subject(const pVal: WideString); safecall;
    270     function Get_Role: WideString; safecall;
     281    function  Get_Role: WideString; safecall;
    271282    procedure Set_Role(const pVal: WideString); safecall;
    272     function Get_Prefix: WideString; safecall;
     283    function  Get_Prefix: WideString; safecall;
    273284    procedure Set_Prefix(const pVal: WideString); safecall;
    274     function Get_Suffix: WideString; safecall;
     285    function  Get_Suffix: WideString; safecall;
    275286    procedure Set_Suffix(const pVal: WideString); safecall;
    276     function Get_Name: WideString; safecall;
     287    function  Get_Name: WideString; safecall;
    277288    procedure Set_Name(const pVal: WideString); safecall;
    278     function Get_Value: WideString; safecall;
     289    function  Get_Value: WideString; safecall;
    279290    procedure Set_Value(const pVal: WideString); safecall;
    280     function Clone: IContextItem; safecall;
     291    function  Clone: IContextItem; safecall;
    281292    property Subject: WideString read Get_Subject write Set_Subject;
    282293    property Role: WideString read Get_Role write Set_Role;
     
    300311    property Name: WideString dispid 5;
    301312    property Value: WideString dispid 6;
    302     function Clone: IContextItem; dispid 7;
     313    function  Clone: IContextItem; dispid 7;
    303314  end;
    304315
     
    311322    ['{CBC6D968-9F6D-416A-8AA7-99172E588DF0}']
    312323    procedure StartResponseContextChange; safecall;
    313     function EndResponseContextChange(commit: WordBool;
    314                                       const aContextItemCollection: IContextItemCollection;
    315                                       var noContinue: WordBool): OleVariant; safecall;
     324    function  EndResponseContextChange(commit: WordBool;
     325                                       const aContextItemCollection: IContextItemCollection;
     326                                       var noContinue: WordBool): OleVariant; safecall;
    316327    procedure CommitContextChange; safecall;
    317328    procedure CancelContextChange; safecall;
     
    326337    ['{CBC6D968-9F6D-416A-8AA7-99172E588DF0}']
    327338    procedure StartResponseContextChange; dispid 1;
    328     function EndResponseContextChange(commit: WordBool;
    329                                       const aContextItemCollection: IContextItemCollection;
    330                                       var noContinue: WordBool): OleVariant; dispid 2;
     339    function  EndResponseContextChange(commit: WordBool;
     340                                       const aContextItemCollection: IContextItemCollection;
     341                                       var noContinue: WordBool): OleVariant; dispid 2;
    331342    procedure CommitContextChange; dispid 3;
    332343    procedure CancelContextChange; dispid 4;
     
    386397  IResponseDialog = interface(IDispatch)
    387398    ['{9D33ECF1-8277-11D3-8525-0000861FDD4F}']
    388     function ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse; safecall;
     399    function  ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse; safecall;
    389400  end;
    390401
     
    396407  IResponseDialogDisp = dispinterface
    397408    ['{9D33ECF1-8277-11D3-8525-0000861FDD4F}']
    398     function ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse; dispid 1;
     409    function  ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse; dispid 1;
    399410  end;
    400411
     
    430441    class function CreateRemote(const MachineName: string): IContextor;
    431442  end;
     443
     444  TContextorPending = procedure(Sender: TObject; var aContextItemCollection: OleVariant) of object;
     445
     446
     447// *********************************************************************//
     448// OLE Server Proxy class declaration
     449// Server Object    : TContextor
     450// Help String      : Vergence Contextor
     451// Default Interface: IContextor
     452// Def. Intf. DISP? : No
     453// Event   Interface: _IContextChangesSink
     454// TypeFlags        : (2) CanCreate
     455// *********************************************************************//
     456{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     457  TContextorProperties= class;
     458{$ENDIF}
     459  TContextor = class(TOleServer)
     460  private
     461    FOnPending: TContextorPending;
     462    FOnCommitted: TNotifyEvent;
     463    FOnCanceled: TNotifyEvent;
     464    FIntf:        IContextor;
     465{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     466    FProps:       TContextorProperties;
     467    function      GetServerProperties: TContextorProperties;
     468{$ENDIF}
     469    function      GetDefaultInterface: IContextor;
     470  protected
     471    procedure InitServerData; override;
     472    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
     473    function  Get_State: ContextorState;
     474    function  Get_CurrentContext: IContextItemCollection;
     475    function  Get_NotificationFilter: WideString;
     476    procedure Set_NotificationFilter(const filter: WideString);
     477    function  Get_Name: WideString;
     478  public
     479    constructor Create(AOwner: TComponent); override;
     480    destructor  Destroy; override;
     481    procedure Connect; override;
     482    procedure ConnectTo(svrIntf: IContextor);
     483    procedure Disconnect; override;
     484    procedure Run(const applicationLabel: WideString; const passcode: WideString; survey: WordBool;
     485                  const initialNotificationFilter: WideString);
     486    procedure Suspend;
     487    procedure Resume;
     488    function  GetPrivilege(const subj: WideString): AccessPrivilege;
     489    procedure StartContextChange;
     490    function  EndContextChange(commit: WordBool;
     491                               const aContextItemCollection: IContextItemCollection): UserResponse;
     492    procedure SetSurveyResponse(const reason: WideString);
     493    property  DefaultInterface: IContextor read GetDefaultInterface;
     494    property State: ContextorState read Get_State;
     495    property CurrentContext: IContextItemCollection read Get_CurrentContext;
     496    property Name: WideString read Get_Name;
     497    property NotificationFilter: WideString read Get_NotificationFilter write Set_NotificationFilter;
     498  published
     499{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     500    property Server: TContextorProperties read GetServerProperties;
     501{$ENDIF}
     502    property OnPending: TContextorPending read FOnPending write FOnPending;
     503    property OnCommitted: TNotifyEvent read FOnCommitted write FOnCommitted;
     504    property OnCanceled: TNotifyEvent read FOnCanceled write FOnCanceled;
     505  end;
     506
     507{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     508// *********************************************************************//
     509// OLE Server Properties Proxy Class
     510// Server Object    : TContextor
     511// (This object is used by the IDE's Property Inspector to allow editing
     512//  of the properties of this server)
     513// *********************************************************************//
     514 TContextorProperties = class(TPersistent)
     515  private
     516    FServer:    TContextor;
     517    function    GetDefaultInterface: IContextor;
     518    constructor Create(AServer: TContextor);
     519  protected
     520    function  Get_State: ContextorState;
     521    function  Get_CurrentContext: IContextItemCollection;
     522    function  Get_NotificationFilter: WideString;
     523    procedure Set_NotificationFilter(const filter: WideString);
     524    function  Get_Name: WideString;
     525  public
     526    property DefaultInterface: IContextor read GetDefaultInterface;
     527  published
     528    property NotificationFilter: WideString read Get_NotificationFilter write Set_NotificationFilter;
     529  end;
     530{$ENDIF}
     531
    432532
    433533
     
    453553    procedure CreateControl;
    454554    procedure InitControlData; override;
    455     function Get_CurrentContext: IContextItemCollection;
     555    function  Get_CurrentContext: IContextItemCollection;
    456556  public
    457557    procedure Run(const applicationLabel: WideString; const passcode: WideString; survey: WordBool;
     
    459559    procedure Suspend;
    460560    procedure Resume;
    461     function GetPrivilege(const subj: WideString): AccessPrivilege;
     561    function  GetPrivilege(const subj: WideString): AccessPrivilege;
    462562    procedure StartContextChange;
    463     function EndContextChange(commit: WordBool; const aContextItemCollection: IContextItemCollection): UserResponse;
     563    function  EndContextChange(commit: WordBool;
     564                               const aContextItemCollection: IContextItemCollection): UserResponse;
    464565    procedure SetSurveyResponse(const reason: WideString);
    465566    property  ControlInterface: IContextor read GetControlInterface;
     
    487588  end;
    488589
     590
     591// *********************************************************************//
     592// OLE Server Proxy class declaration
     593// Server Object    : TContextItemCollection
     594// Help String      : Vergence ContextItemCollection
     595// Default Interface: IContextItemCollection
     596// Def. Intf. DISP? : No
     597// Event   Interface:
     598// TypeFlags        : (2) CanCreate
     599// *********************************************************************//
     600{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     601  TContextItemCollectionProperties= class;
     602{$ENDIF}
     603  TContextItemCollection = class(TOleServer)
     604  private
     605    FIntf:        IContextItemCollection;
     606{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     607    FProps:       TContextItemCollectionProperties;
     608    function      GetServerProperties: TContextItemCollectionProperties;
     609{$ENDIF}
     610    function      GetDefaultInterface: IContextItemCollection;
     611  protected
     612    procedure InitServerData; override;
     613    function  Get__NewEnum: IUnknown;
     614  public
     615    constructor Create(AOwner: TComponent); override;
     616    destructor  Destroy; override;
     617    procedure Connect; override;
     618    procedure ConnectTo(svrIntf: IContextItemCollection);
     619    procedure Disconnect; override;
     620    function  Count: Integer;
     621    procedure Add(const aContextItem: IContextItem);
     622    procedure Remove(const contextItemName: WideString);
     623    procedure RemoveAll;
     624    function  Present(key: OleVariant): IContextItem;
     625    function  Item(key: OleVariant): IContextItem;
     626    property  DefaultInterface: IContextItemCollection read GetDefaultInterface;
     627    property _NewEnum: IUnknown read Get__NewEnum;
     628  published
     629{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     630    property Server: TContextItemCollectionProperties read GetServerProperties;
     631{$ENDIF}
     632  end;
     633
     634{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     635// *********************************************************************//
     636// OLE Server Properties Proxy Class
     637// Server Object    : TContextItemCollection
     638// (This object is used by the IDE's Property Inspector to allow editing
     639//  of the properties of this server)
     640// *********************************************************************//
     641 TContextItemCollectionProperties = class(TPersistent)
     642  private
     643    FServer:    TContextItemCollection;
     644    function    GetDefaultInterface: IContextItemCollection;
     645    constructor Create(AServer: TContextItemCollection);
     646  protected
     647    function  Get__NewEnum: IUnknown;
     648  public
     649    property DefaultInterface: IContextItemCollection read GetDefaultInterface;
     650  published
     651  end;
     652{$ENDIF}
     653
     654
    489655// *********************************************************************//
    490656// The Class CoContextItem provides a Create and CreateRemote method to         
     
    499665  end;
    500666
     667
     668// *********************************************************************//
     669// OLE Server Proxy class declaration
     670// Server Object    : TContextItem
     671// Help String      : Vergence ContextItem
     672// Default Interface: IContextItem
     673// Def. Intf. DISP? : No
     674// Event   Interface:
     675// TypeFlags        : (2) CanCreate
     676// *********************************************************************//
     677{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     678  TContextItemProperties= class;
     679{$ENDIF}
     680  TContextItem = class(TOleServer)
     681  private
     682    FIntf:        IContextItem;
     683{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     684    FProps:       TContextItemProperties;
     685    function      GetServerProperties: TContextItemProperties;
     686{$ENDIF}
     687    function      GetDefaultInterface: IContextItem;
     688  protected
     689    procedure InitServerData; override;
     690    function  Get_Subject: WideString;
     691    procedure Set_Subject(const pVal: WideString);
     692    function  Get_Role: WideString;
     693    procedure Set_Role(const pVal: WideString);
     694    function  Get_Prefix: WideString;
     695    procedure Set_Prefix(const pVal: WideString);
     696    function  Get_Suffix: WideString;
     697    procedure Set_Suffix(const pVal: WideString);
     698    function  Get_Name: WideString;
     699    procedure Set_Name(const pVal: WideString);
     700    function  Get_Value: WideString;
     701    procedure Set_Value(const pVal: WideString);
     702  public
     703    constructor Create(AOwner: TComponent); override;
     704    destructor  Destroy; override;
     705    procedure Connect; override;
     706    procedure ConnectTo(svrIntf: IContextItem);
     707    procedure Disconnect; override;
     708    function  Clone: IContextItem;
     709    property  DefaultInterface: IContextItem read GetDefaultInterface;
     710    property Subject: WideString read Get_Subject write Set_Subject;
     711    property Role: WideString read Get_Role write Set_Role;
     712    property Prefix: WideString read Get_Prefix write Set_Prefix;
     713    property Suffix: WideString read Get_Suffix write Set_Suffix;
     714    property Name: WideString read Get_Name write Set_Name;
     715    property Value: WideString read Get_Value write Set_Value;
     716  published
     717{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     718    property Server: TContextItemProperties read GetServerProperties;
     719{$ENDIF}
     720  end;
     721
     722{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     723// *********************************************************************//
     724// OLE Server Properties Proxy Class
     725// Server Object    : TContextItem
     726// (This object is used by the IDE's Property Inspector to allow editing
     727//  of the properties of this server)
     728// *********************************************************************//
     729 TContextItemProperties = class(TPersistent)
     730  private
     731    FServer:    TContextItem;
     732    function    GetDefaultInterface: IContextItem;
     733    constructor Create(AServer: TContextItem);
     734  protected
     735    function  Get_Subject: WideString;
     736    procedure Set_Subject(const pVal: WideString);
     737    function  Get_Role: WideString;
     738    procedure Set_Role(const pVal: WideString);
     739    function  Get_Prefix: WideString;
     740    procedure Set_Prefix(const pVal: WideString);
     741    function  Get_Suffix: WideString;
     742    procedure Set_Suffix(const pVal: WideString);
     743    function  Get_Name: WideString;
     744    procedure Set_Name(const pVal: WideString);
     745    function  Get_Value: WideString;
     746    procedure Set_Value(const pVal: WideString);
     747  public
     748    property DefaultInterface: IContextItem read GetDefaultInterface;
     749  published
     750    property Subject: WideString read Get_Subject write Set_Subject;
     751    property Role: WideString read Get_Role write Set_Role;
     752    property Prefix: WideString read Get_Prefix write Set_Prefix;
     753    property Suffix: WideString read Get_Suffix write Set_Suffix;
     754    property Name: WideString read Get_Name write Set_Name;
     755    property Value: WideString read Get_Value write Set_Value;
     756  end;
     757{$ENDIF}
     758
     759
    501760// *********************************************************************//
    502761// The Class CoResponseDialog provides a Create and CreateRemote method to         
     
    511770  end;
    512771
     772
     773// *********************************************************************//
     774// OLE Server Proxy class declaration
     775// Server Object    : TResponseDialog
     776// Help String      : Vergence ResponseDialog
     777// Default Interface: IResponseDialog
     778// Def. Intf. DISP? : No
     779// Event   Interface:
     780// TypeFlags        : (2) CanCreate
     781// *********************************************************************//
     782{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     783  TResponseDialogProperties= class;
     784{$ENDIF}
     785  TResponseDialog = class(TOleServer)
     786  private
     787    FIntf:        IResponseDialog;
     788{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     789    FProps:       TResponseDialogProperties;
     790    function      GetServerProperties: TResponseDialogProperties;
     791{$ENDIF}
     792    function      GetDefaultInterface: IResponseDialog;
     793  protected
     794    procedure InitServerData; override;
     795  public
     796    constructor Create(AOwner: TComponent); override;
     797    destructor  Destroy; override;
     798    procedure Connect; override;
     799    procedure ConnectTo(svrIntf: IResponseDialog);
     800    procedure Disconnect; override;
     801    function  ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse;
     802    property  DefaultInterface: IResponseDialog read GetDefaultInterface;
     803  published
     804{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     805    property Server: TResponseDialogProperties read GetServerProperties;
     806{$ENDIF}
     807  end;
     808
     809{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     810// *********************************************************************//
     811// OLE Server Properties Proxy Class
     812// Server Object    : TResponseDialog
     813// (This object is used by the IDE's Property Inspector to allow editing
     814//  of the properties of this server)
     815// *********************************************************************//
     816 TResponseDialogProperties = class(TPersistent)
     817  private
     818    FServer:    TResponseDialog;
     819    function    GetDefaultInterface: IResponseDialog;
     820    constructor Create(AServer: TResponseDialog);
     821  protected
     822  public
     823    property DefaultInterface: IResponseDialog read GetDefaultInterface;
     824  published
     825  end;
     826{$ENDIF}
     827
     828
    513829// *********************************************************************//
    514830// The Class CoContextorParticipant provides a Create and CreateRemote method to         
     
    523839  end;
    524840
     841
     842// *********************************************************************//
     843// OLE Server Proxy class declaration
     844// Server Object    : TContextorParticipant
     845// Help String      : ContextorParticipant Class
     846// Default Interface: IContextParticipant
     847// Def. Intf. DISP? : No
     848// Event   Interface:
     849// TypeFlags        : (2) CanCreate
     850// *********************************************************************//
     851{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     852  TContextorParticipantProperties= class;
     853{$ENDIF}
     854  TContextorParticipant = class(TOleServer)
     855  private
     856    FIntf:        IContextParticipant;
     857{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     858    FProps:       TContextorParticipantProperties;
     859    function      GetServerProperties: TContextorParticipantProperties;
     860{$ENDIF}
     861    function      GetDefaultInterface: IContextParticipant;
     862  protected
     863    procedure InitServerData; override;
     864  public
     865    constructor Create(AOwner: TComponent); override;
     866    destructor  Destroy; override;
     867    procedure Connect; override;
     868    procedure ConnectTo(svrIntf: IContextParticipant);
     869    procedure Disconnect; override;
     870    function  ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString;
     871    procedure ContextChangesAccepted(contextCoupon: Integer);
     872    procedure ContextChangesCanceled(contextCoupon: Integer);
     873    procedure CommonContextTerminated;
     874    procedure Ping;
     875    property  DefaultInterface: IContextParticipant read GetDefaultInterface;
     876  published
     877{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     878    property Server: TContextorParticipantProperties read GetServerProperties;
     879{$ENDIF}
     880  end;
     881
     882{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     883// *********************************************************************//
     884// OLE Server Properties Proxy Class
     885// Server Object    : TContextorParticipant
     886// (This object is used by the IDE's Property Inspector to allow editing
     887//  of the properties of this server)
     888// *********************************************************************//
     889 TContextorParticipantProperties = class(TPersistent)
     890  private
     891    FServer:    TContextorParticipant;
     892    function    GetDefaultInterface: IContextParticipant;
     893    constructor Create(AServer: TContextorParticipant);
     894  protected
     895  public
     896    property DefaultInterface: IContextParticipant read GetDefaultInterface;
     897  published
     898  end;
     899{$ENDIF}
     900
     901{
    525902procedure Register;
    526 
    527 resourcestring
    528   dtlServerPage = 'ActiveX';
    529 
     903}
    530904implementation
    531905
     
    541915  Result := CreateRemoteComObject(MachineName, CLASS_Contextor) as IContextor;
    542916end;
     917
     918procedure TContextor.InitServerData;
     919const
     920  CServerData: TServerData = (
     921    ClassID:   '{D5C9CC98-5FDB-11D3-8727-0060B0B5E137}';
     922    IntfIID:   '{8D879F5D-5FE6-11D3-8727-0060B0B5E137}';
     923    EventIID:  '{6BED8971-B3DD-11D3-8736-0060B0B5E137}';
     924    LicenseKey: nil;
     925    Version: 500);
     926begin
     927  ServerData := @CServerData;
     928end;
     929
     930procedure TContextor.Connect;
     931var
     932  punk: IUnknown;
     933begin
     934  if FIntf = nil then
     935  begin
     936    punk := GetServer;
     937    ConnectEvents(punk);
     938    Fintf:= punk as IContextor;
     939  end;
     940end;
     941
     942procedure TContextor.ConnectTo(svrIntf: IContextor);
     943begin
     944  Disconnect;
     945  FIntf := svrIntf;
     946  ConnectEvents(FIntf);
     947end;
     948
     949procedure TContextor.DisConnect;
     950begin
     951  if Fintf <> nil then
     952  begin
     953    DisconnectEvents(FIntf);
     954    FIntf := nil;
     955  end;
     956end;
     957
     958function TContextor.GetDefaultInterface: IContextor;
     959begin
     960  if FIntf = nil then
     961    Connect;
     962  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
     963  Result := FIntf;
     964end;
     965
     966constructor TContextor.Create(AOwner: TComponent);
     967begin
     968  inherited Create(AOwner);
     969{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     970  FProps := TContextorProperties.Create(Self);
     971{$ENDIF}
     972end;
     973
     974destructor TContextor.Destroy;
     975begin
     976{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     977  FProps.Free;
     978{$ENDIF}
     979  inherited Destroy;
     980end;
     981
     982{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     983function TContextor.GetServerProperties: TContextorProperties;
     984begin
     985  Result := FProps;
     986end;
     987{$ENDIF}
     988
     989procedure TContextor.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
     990begin
     991  case DispID of
     992    -1: Exit;  // DISPID_UNKNOWN
     993   1: if Assigned(FOnPending) then
     994            FOnPending(Self, Params[0] {const IDispatch});
     995   2: if Assigned(FOnCommitted) then
     996            FOnCommitted(Self);
     997   3: if Assigned(FOnCanceled) then
     998            FOnCanceled(Self);
     999  end; {case DispID}
     1000end;
     1001
     1002function  TContextor.Get_State: ContextorState;
     1003begin
     1004  Result := DefaultInterface.Get_State;
     1005end;
     1006
     1007function  TContextor.Get_CurrentContext: IContextItemCollection;
     1008begin
     1009  Result := DefaultInterface.Get_CurrentContext;
     1010end;
     1011
     1012function  TContextor.Get_NotificationFilter: WideString;
     1013begin
     1014  Result := DefaultInterface.Get_NotificationFilter;
     1015end;
     1016
     1017procedure TContextor.Set_NotificationFilter(const filter: WideString);
     1018begin
     1019  DefaultInterface.Set_NotificationFilter(filter);
     1020end;
     1021
     1022function  TContextor.Get_Name: WideString;
     1023begin
     1024  Result := DefaultInterface.Get_Name;
     1025end;
     1026
     1027procedure TContextor.Run(const applicationLabel: WideString; const passcode: WideString;
     1028                         survey: WordBool; const initialNotificationFilter: WideString);
     1029begin
     1030  DefaultInterface.Run(applicationLabel, passcode, survey, initialNotificationFilter);
     1031end;
     1032
     1033procedure TContextor.Suspend;
     1034begin
     1035  DefaultInterface.Suspend;
     1036end;
     1037
     1038procedure TContextor.Resume;
     1039begin
     1040  DefaultInterface.Resume;
     1041end;
     1042
     1043function  TContextor.GetPrivilege(const subj: WideString): AccessPrivilege;
     1044begin
     1045  Result := DefaultInterface.GetPrivilege(subj);
     1046end;
     1047
     1048procedure TContextor.StartContextChange;
     1049begin
     1050  DefaultInterface.StartContextChange;
     1051end;
     1052
     1053function  TContextor.EndContextChange(commit: WordBool;
     1054                                      const aContextItemCollection: IContextItemCollection): UserResponse;
     1055begin
     1056  Result := DefaultInterface.EndContextChange(commit, aContextItemCollection);
     1057end;
     1058
     1059procedure TContextor.SetSurveyResponse(const reason: WideString);
     1060begin
     1061  DefaultInterface.SetSurveyResponse(reason);
     1062end;
     1063
     1064{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1065constructor TContextorProperties.Create(AServer: TContextor);
     1066begin
     1067  inherited Create;
     1068  FServer := AServer;
     1069end;
     1070
     1071function TContextorProperties.GetDefaultInterface: IContextor;
     1072begin
     1073  Result := FServer.DefaultInterface;
     1074end;
     1075
     1076function  TContextorProperties.Get_State: ContextorState;
     1077begin
     1078  Result := DefaultInterface.Get_State;
     1079end;
     1080
     1081function  TContextorProperties.Get_CurrentContext: IContextItemCollection;
     1082begin
     1083  Result := DefaultInterface.Get_CurrentContext;
     1084end;
     1085
     1086function  TContextorProperties.Get_NotificationFilter: WideString;
     1087begin
     1088  Result := DefaultInterface.Get_NotificationFilter;
     1089end;
     1090
     1091procedure TContextorProperties.Set_NotificationFilter(const filter: WideString);
     1092begin
     1093  DefaultInterface.Set_NotificationFilter(filter);
     1094end;
     1095
     1096function  TContextorProperties.Get_Name: WideString;
     1097begin
     1098  Result := DefaultInterface.Get_Name;
     1099end;
     1100
     1101{$ENDIF}
    5431102
    5441103procedure TContextorControl.InitControlData;
     
    5761135end;
    5771136
    578 function TContextorControl.Get_CurrentContext: IContextItemCollection;
    579 begin
    580     Result := DefaultInterface.CurrentContext;
     1137function  TContextorControl.Get_CurrentContext: IContextItemCollection;
     1138begin
     1139  Result := DefaultInterface.Get_CurrentContext;
    5811140end;
    5821141
     
    5971156end;
    5981157
    599 function TContextorControl.GetPrivilege(const subj: WideString): AccessPrivilege;
     1158function  TContextorControl.GetPrivilege(const subj: WideString): AccessPrivilege;
    6001159begin
    6011160  Result := DefaultInterface.GetPrivilege(subj);
     
    6071166end;
    6081167
    609 function TContextorControl.EndContextChange(commit: WordBool;
    610                                             const aContextItemCollection: IContextItemCollection): UserResponse;
     1168function  TContextorControl.EndContextChange(commit: WordBool;
     1169                                             const aContextItemCollection: IContextItemCollection): UserResponse;
    6111170begin
    6121171  Result := DefaultInterface.EndContextChange(commit, aContextItemCollection);
     
    6281187end;
    6291188
     1189procedure TContextItemCollection.InitServerData;
     1190const
     1191  CServerData: TServerData = (
     1192    ClassID:   '{AC4C0272-615A-11D3-84B5-0000861FDD4F}';
     1193    IntfIID:   '{AC4C0271-615A-11D3-84B5-0000861FDD4F}';
     1194    EventIID:  '';
     1195    LicenseKey: nil;
     1196    Version: 500);
     1197begin
     1198  ServerData := @CServerData;
     1199end;
     1200
     1201procedure TContextItemCollection.Connect;
     1202var
     1203  punk: IUnknown;
     1204begin
     1205  if FIntf = nil then
     1206  begin
     1207    punk := GetServer;
     1208    Fintf:= punk as IContextItemCollection;
     1209  end;
     1210end;
     1211
     1212procedure TContextItemCollection.ConnectTo(svrIntf: IContextItemCollection);
     1213begin
     1214  Disconnect;
     1215  FIntf := svrIntf;
     1216end;
     1217
     1218procedure TContextItemCollection.DisConnect;
     1219begin
     1220  if Fintf <> nil then
     1221  begin
     1222    FIntf := nil;
     1223  end;
     1224end;
     1225
     1226function TContextItemCollection.GetDefaultInterface: IContextItemCollection;
     1227begin
     1228  if FIntf = nil then
     1229    Connect;
     1230  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
     1231  Result := FIntf;
     1232end;
     1233
     1234constructor TContextItemCollection.Create(AOwner: TComponent);
     1235begin
     1236  inherited Create(AOwner);
     1237{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1238  FProps := TContextItemCollectionProperties.Create(Self);
     1239{$ENDIF}
     1240end;
     1241
     1242destructor TContextItemCollection.Destroy;
     1243begin
     1244{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1245  FProps.Free;
     1246{$ENDIF}
     1247  inherited Destroy;
     1248end;
     1249
     1250{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1251function TContextItemCollection.GetServerProperties: TContextItemCollectionProperties;
     1252begin
     1253  Result := FProps;
     1254end;
     1255{$ENDIF}
     1256
     1257function  TContextItemCollection.Get__NewEnum: IUnknown;
     1258begin
     1259  Result := DefaultInterface.Get__NewEnum;
     1260end;
     1261
     1262function  TContextItemCollection.Count: Integer;
     1263begin
     1264  Result := DefaultInterface.Count;
     1265end;
     1266
     1267procedure TContextItemCollection.Add(const aContextItem: IContextItem);
     1268begin
     1269  DefaultInterface.Add(aContextItem);
     1270end;
     1271
     1272procedure TContextItemCollection.Remove(const contextItemName: WideString);
     1273begin
     1274  DefaultInterface.Remove(contextItemName);
     1275end;
     1276
     1277procedure TContextItemCollection.RemoveAll;
     1278begin
     1279  DefaultInterface.RemoveAll;
     1280end;
     1281
     1282function  TContextItemCollection.Present(key: OleVariant): IContextItem;
     1283begin
     1284  Result := DefaultInterface.Present(key);
     1285end;
     1286
     1287function  TContextItemCollection.Item(key: OleVariant): IContextItem;
     1288begin
     1289  Result := DefaultInterface.Item(key);
     1290end;
     1291
     1292{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1293constructor TContextItemCollectionProperties.Create(AServer: TContextItemCollection);
     1294begin
     1295  inherited Create;
     1296  FServer := AServer;
     1297end;
     1298
     1299function TContextItemCollectionProperties.GetDefaultInterface: IContextItemCollection;
     1300begin
     1301  Result := FServer.DefaultInterface;
     1302end;
     1303
     1304function  TContextItemCollectionProperties.Get__NewEnum: IUnknown;
     1305begin
     1306  Result := DefaultInterface.Get__NewEnum;
     1307end;
     1308
     1309{$ENDIF}
     1310
    6301311class function CoContextItem.Create: IContextItem;
    6311312begin
     
    6381319end;
    6391320
     1321procedure TContextItem.InitServerData;
     1322const
     1323  CServerData: TServerData = (
     1324    ClassID:   '{AC4C0274-615A-11D3-84B5-0000861FDD4F}';
     1325    IntfIID:   '{AC4C0273-615A-11D3-84B5-0000861FDD4F}';
     1326    EventIID:  '';
     1327    LicenseKey: nil;
     1328    Version: 500);
     1329begin
     1330  ServerData := @CServerData;
     1331end;
     1332
     1333procedure TContextItem.Connect;
     1334var
     1335  punk: IUnknown;
     1336begin
     1337  if FIntf = nil then
     1338  begin
     1339    punk := GetServer;
     1340    Fintf:= punk as IContextItem;
     1341  end;
     1342end;
     1343
     1344procedure TContextItem.ConnectTo(svrIntf: IContextItem);
     1345begin
     1346  Disconnect;
     1347  FIntf := svrIntf;
     1348end;
     1349
     1350procedure TContextItem.DisConnect;
     1351begin
     1352  if Fintf <> nil then
     1353  begin
     1354    FIntf := nil;
     1355  end;
     1356end;
     1357
     1358function TContextItem.GetDefaultInterface: IContextItem;
     1359begin
     1360  if FIntf = nil then
     1361    Connect;
     1362  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
     1363  Result := FIntf;
     1364end;
     1365
     1366constructor TContextItem.Create(AOwner: TComponent);
     1367begin
     1368  inherited Create(AOwner);
     1369{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1370  FProps := TContextItemProperties.Create(Self);
     1371{$ENDIF}
     1372end;
     1373
     1374destructor TContextItem.Destroy;
     1375begin
     1376{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1377  FProps.Free;
     1378{$ENDIF}
     1379  inherited Destroy;
     1380end;
     1381
     1382{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1383function TContextItem.GetServerProperties: TContextItemProperties;
     1384begin
     1385  Result := FProps;
     1386end;
     1387{$ENDIF}
     1388
     1389function  TContextItem.Get_Subject: WideString;
     1390begin
     1391  Result := DefaultInterface.Get_Subject;
     1392end;
     1393
     1394procedure TContextItem.Set_Subject(const pVal: WideString);
     1395begin
     1396  DefaultInterface.Set_Subject(pVal);
     1397end;
     1398
     1399function  TContextItem.Get_Role: WideString;
     1400begin
     1401  Result := DefaultInterface.Get_Role;
     1402end;
     1403
     1404procedure TContextItem.Set_Role(const pVal: WideString);
     1405begin
     1406  DefaultInterface.Set_Role(pVal);
     1407end;
     1408
     1409function  TContextItem.Get_Prefix: WideString;
     1410begin
     1411  Result := DefaultInterface.Get_Prefix;
     1412end;
     1413
     1414procedure TContextItem.Set_Prefix(const pVal: WideString);
     1415begin
     1416  DefaultInterface.Set_Prefix(pVal);
     1417end;
     1418
     1419function  TContextItem.Get_Suffix: WideString;
     1420begin
     1421  Result := DefaultInterface.Get_Suffix;
     1422end;
     1423
     1424procedure TContextItem.Set_Suffix(const pVal: WideString);
     1425begin
     1426  DefaultInterface.Set_Suffix(pVal);
     1427end;
     1428
     1429function  TContextItem.Get_Name: WideString;
     1430begin
     1431  Result := DefaultInterface.Get_Name;
     1432end;
     1433
     1434procedure TContextItem.Set_Name(const pVal: WideString);
     1435begin
     1436  DefaultInterface.Set_Name(pVal);
     1437end;
     1438
     1439function  TContextItem.Get_Value: WideString;
     1440begin
     1441  Result := DefaultInterface.Get_Value;
     1442end;
     1443
     1444procedure TContextItem.Set_Value(const pVal: WideString);
     1445begin
     1446  DefaultInterface.Set_Value(pVal);
     1447end;
     1448
     1449function  TContextItem.Clone: IContextItem;
     1450begin
     1451  Result := DefaultInterface.Clone;
     1452end;
     1453
     1454{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1455constructor TContextItemProperties.Create(AServer: TContextItem);
     1456begin
     1457  inherited Create;
     1458  FServer := AServer;
     1459end;
     1460
     1461function TContextItemProperties.GetDefaultInterface: IContextItem;
     1462begin
     1463  Result := FServer.DefaultInterface;
     1464end;
     1465
     1466function  TContextItemProperties.Get_Subject: WideString;
     1467begin
     1468  Result := DefaultInterface.Get_Subject;
     1469end;
     1470
     1471procedure TContextItemProperties.Set_Subject(const pVal: WideString);
     1472begin
     1473  DefaultInterface.Set_Subject(pVal);
     1474end;
     1475
     1476function  TContextItemProperties.Get_Role: WideString;
     1477begin
     1478  Result := DefaultInterface.Get_Role;
     1479end;
     1480
     1481procedure TContextItemProperties.Set_Role(const pVal: WideString);
     1482begin
     1483  DefaultInterface.Set_Role(pVal);
     1484end;
     1485
     1486function  TContextItemProperties.Get_Prefix: WideString;
     1487begin
     1488  Result := DefaultInterface.Get_Prefix;
     1489end;
     1490
     1491procedure TContextItemProperties.Set_Prefix(const pVal: WideString);
     1492begin
     1493  DefaultInterface.Set_Prefix(pVal);
     1494end;
     1495
     1496function  TContextItemProperties.Get_Suffix: WideString;
     1497begin
     1498  Result := DefaultInterface.Get_Suffix;
     1499end;
     1500
     1501procedure TContextItemProperties.Set_Suffix(const pVal: WideString);
     1502begin
     1503  DefaultInterface.Set_Suffix(pVal);
     1504end;
     1505
     1506function  TContextItemProperties.Get_Name: WideString;
     1507begin
     1508  Result := DefaultInterface.Get_Name;
     1509end;
     1510
     1511procedure TContextItemProperties.Set_Name(const pVal: WideString);
     1512begin
     1513  DefaultInterface.Set_Name(pVal);
     1514end;
     1515
     1516function  TContextItemProperties.Get_Value: WideString;
     1517begin
     1518  Result := DefaultInterface.Get_Value;
     1519end;
     1520
     1521procedure TContextItemProperties.Set_Value(const pVal: WideString);
     1522begin
     1523  DefaultInterface.Set_Value(pVal);
     1524end;
     1525
     1526{$ENDIF}
     1527
    6401528class function CoResponseDialog.Create: IResponseDialog;
    6411529begin
     
    6481536end;
    6491537
     1538procedure TResponseDialog.InitServerData;
     1539const
     1540  CServerData: TServerData = (
     1541    ClassID:   '{9D33ECF2-8277-11D3-8525-0000861FDD4F}';
     1542    IntfIID:   '{9D33ECF1-8277-11D3-8525-0000861FDD4F}';
     1543    EventIID:  '';
     1544    LicenseKey: nil;
     1545    Version: 500);
     1546begin
     1547  ServerData := @CServerData;
     1548end;
     1549
     1550procedure TResponseDialog.Connect;
     1551var
     1552  punk: IUnknown;
     1553begin
     1554  if FIntf = nil then
     1555  begin
     1556    punk := GetServer;
     1557    Fintf:= punk as IResponseDialog;
     1558  end;
     1559end;
     1560
     1561procedure TResponseDialog.ConnectTo(svrIntf: IResponseDialog);
     1562begin
     1563  Disconnect;
     1564  FIntf := svrIntf;
     1565end;
     1566
     1567procedure TResponseDialog.DisConnect;
     1568begin
     1569  if Fintf <> nil then
     1570  begin
     1571    FIntf := nil;
     1572  end;
     1573end;
     1574
     1575function TResponseDialog.GetDefaultInterface: IResponseDialog;
     1576begin
     1577  if FIntf = nil then
     1578    Connect;
     1579  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
     1580  Result := FIntf;
     1581end;
     1582
     1583constructor TResponseDialog.Create(AOwner: TComponent);
     1584begin
     1585  inherited Create(AOwner);
     1586{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1587  FProps := TResponseDialogProperties.Create(Self);
     1588{$ENDIF}
     1589end;
     1590
     1591destructor TResponseDialog.Destroy;
     1592begin
     1593{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1594  FProps.Free;
     1595{$ENDIF}
     1596  inherited Destroy;
     1597end;
     1598
     1599{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1600function TResponseDialog.GetServerProperties: TResponseDialogProperties;
     1601begin
     1602  Result := FProps;
     1603end;
     1604{$ENDIF}
     1605
     1606function  TResponseDialog.ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse;
     1607begin
     1608  Result := DefaultInterface.ProcessSurveyResults(responses, noContinue);
     1609end;
     1610
     1611{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1612constructor TResponseDialogProperties.Create(AServer: TResponseDialog);
     1613begin
     1614  inherited Create;
     1615  FServer := AServer;
     1616end;
     1617
     1618function TResponseDialogProperties.GetDefaultInterface: IResponseDialog;
     1619begin
     1620  Result := FServer.DefaultInterface;
     1621end;
     1622
     1623{$ENDIF}
     1624
    6501625class function CoContextorParticipant.Create: IContextParticipant;
    6511626begin
     
    6581633end;
    6591634
     1635procedure TContextorParticipant.InitServerData;
     1636const
     1637  CServerData: TServerData = (
     1638    ClassID:   '{4BA034A2-D0FA-11D3-818B-0050049598B2}';
     1639    IntfIID:   '{3E3DD272-998E-11D0-808D-00A0240943E4}';
     1640    EventIID:  '';
     1641    LicenseKey: nil;
     1642    Version: 500);
     1643begin
     1644  ServerData := @CServerData;
     1645end;
     1646
     1647procedure TContextorParticipant.Connect;
     1648var
     1649  punk: IUnknown;
     1650begin
     1651  if FIntf = nil then
     1652  begin
     1653    punk := GetServer;
     1654    Fintf:= punk as IContextParticipant;
     1655  end;
     1656end;
     1657
     1658procedure TContextorParticipant.ConnectTo(svrIntf: IContextParticipant);
     1659begin
     1660  Disconnect;
     1661  FIntf := svrIntf;
     1662end;
     1663
     1664procedure TContextorParticipant.DisConnect;
     1665begin
     1666  if Fintf <> nil then
     1667  begin
     1668    FIntf := nil;
     1669  end;
     1670end;
     1671
     1672function TContextorParticipant.GetDefaultInterface: IContextParticipant;
     1673begin
     1674  if FIntf = nil then
     1675    Connect;
     1676  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
     1677  Result := FIntf;
     1678end;
     1679
     1680constructor TContextorParticipant.Create(AOwner: TComponent);
     1681begin
     1682  inherited Create(AOwner);
     1683{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1684  FProps := TContextorParticipantProperties.Create(Self);
     1685{$ENDIF}
     1686end;
     1687
     1688destructor TContextorParticipant.Destroy;
     1689begin
     1690{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1691  FProps.Free;
     1692{$ENDIF}
     1693  inherited Destroy;
     1694end;
     1695
     1696{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1697function TContextorParticipant.GetServerProperties: TContextorParticipantProperties;
     1698begin
     1699  Result := FProps;
     1700end;
     1701{$ENDIF}
     1702
     1703function  TContextorParticipant.ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString;
     1704begin
     1705  Result := DefaultInterface.ContextChangesPending(contextCoupon, reason);
     1706end;
     1707
     1708procedure TContextorParticipant.ContextChangesAccepted(contextCoupon: Integer);
     1709begin
     1710  DefaultInterface.ContextChangesAccepted(contextCoupon);
     1711end;
     1712
     1713procedure TContextorParticipant.ContextChangesCanceled(contextCoupon: Integer);
     1714begin
     1715  DefaultInterface.ContextChangesCanceled(contextCoupon);
     1716end;
     1717
     1718procedure TContextorParticipant.CommonContextTerminated;
     1719begin
     1720  DefaultInterface.CommonContextTerminated;
     1721end;
     1722
     1723procedure TContextorParticipant.Ping;
     1724begin
     1725  DefaultInterface.Ping;
     1726end;
     1727
     1728{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     1729constructor TContextorParticipantProperties.Create(AServer: TContextorParticipant);
     1730begin
     1731  inherited Create;
     1732  FServer := AServer;
     1733end;
     1734
     1735function TContextorParticipantProperties.GetDefaultInterface: IContextParticipant;
     1736begin
     1737  Result := FServer.DefaultInterface;
     1738end;
     1739
     1740{$ENDIF}
     1741{
    6601742procedure Register;
    6611743begin
    662   RegisterComponents('ActiveX',[TContextorControl]);
    663 end;
    664 
     1744  RegisterComponents('Kernel',[TContextorControl]);
     1745  RegisterComponents('Kernel',[TContextor, TContextItemCollection, TContextItem, TResponseDialog,
     1746    TContextorParticipant]);
     1747end;
     1748}
    6651749end.
Note: See TracChangeset for help on using the changeset viewer.