-
Notifications
You must be signed in to change notification settings - Fork 1
/
VERGENCECONTEXTORLib_TLB.pas
1749 lines (1549 loc) · 60 KB
/
VERGENCECONTEXTORLib_TLB.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
unit VERGENCECONTEXTORLib_TLB;
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
// manual modifications will be lost.
// ************************************************************************ //
// PASTLWTR : $Revision: 1.88.1.0.1.0 $
// File generated on 2/9/2004 9:12:53 AM from Type Library described below.
// *************************************************************************//
// NOTE:
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties
// which return objects that may need to be explicitly created via a function
// call prior to any access via the property. These items have been disabled
// in order to prevent accidental use from within the object inspector. You
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively
// removing them from the $IFDEF blocks. However, such items must still be
// programmatically created via a method of the appropriate CoClass before
// they can be used.
// ************************************************************************ //
// Type Lib: D:\Development\BDK32_p40\Source\VergenceContextor.dll (1)
// IID\LCID: {30AFBABD-5FD3-11D3-8727-0060B0B5E137}\0
// Helpfile:
// DepndLst:
// (1) v2.0 stdole, (C:\WINNT\System32\stdole2.tlb)
// (2) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)
// Errors:
// Hint: Member 'Set' of 'IResponseDialogAccessor' changed to 'Set_'
// Error creating palette bitmap of (TContextor) : Invalid GUID format
// Error creating palette bitmap of (TContextItemCollection) : Invalid GUID format
// Error creating palette bitmap of (TContextItem) : Invalid GUID format
// Error creating palette bitmap of (TResponseDialog) : Invalid GUID format
// Error creating palette bitmap of (TContextorParticipant) : Invalid GUID format
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
interface
uses Windows, ActiveX, Classes, Graphics, OleServer;
// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:
// Type Libraries : LIBID_xxxx
// CoClasses : CLASS_xxxx
// DISPInterfaces : DIID_xxxx
// Non-DISP interfaces: IID_xxxx
// *********************************************************************//
const
// TypeLibrary Major and minor versions
VERGENCECONTEXTORLibMajorVersion = 1;
VERGENCECONTEXTORLibMinorVersion = 0;
LIBID_VERGENCECONTEXTORLib: TGUID = '{30AFBABD-5FD3-11D3-8727-0060B0B5E137}';
DIID__IContextChangesSink: TGUID = '{6BED8971-B3DD-11D3-8736-0060B0B5E137}';
IID_IContextor: TGUID = '{8D879F5D-5FE6-11D3-8727-0060B0B5E137}';
IID_IContextParticipant: TGUID = '{3E3DD272-998E-11D0-808D-00A0240943E4}';
IID_IContextItemCollection: TGUID = '{AC4C0271-615A-11D3-84B5-0000861FDD4F}';
IID_IContextItem: TGUID = '{AC4C0273-615A-11D3-84B5-0000861FDD4F}';
IID_IResponseContextChange: TGUID = '{CBC6D968-9F6D-416A-8AA7-99172E588DF0}';
IID_IResponseDialogAccessor: TGUID = '{86592071-F3BA-11D3-8181-005004A0F801}';
IID_IContextChangesSink: TGUID = '{0B437E31-620E-11D3-84B6-0000861FDD4F}';
IID_IResponseDialog: TGUID = '{9D33ECF1-8277-11D3-8525-0000861FDD4F}';
CLASS_Contextor: TGUID = '{D5C9CC98-5FDB-11D3-8727-0060B0B5E137}';
CLASS_ContextorControl: TGUID = '{8778ACF7-5CA9-11D3-8727-0060B0B5E137}';
CLASS_ContextItemCollection: TGUID = '{AC4C0272-615A-11D3-84B5-0000861FDD4F}';
CLASS_ContextItem: TGUID = '{AC4C0274-615A-11D3-84B5-0000861FDD4F}';
CLASS_ResponseDialog: TGUID = '{9D33ECF2-8277-11D3-8525-0000861FDD4F}';
IID_ISetHook: TGUID = '{8D879FDD-5FE6-11D3-8727-0060B0B5E137}';
CLASS_ContextorParticipant: TGUID = '{4BA034A2-D0FA-11D3-818B-0050049598B2}';
// *********************************************************************//
// Declaration of Enumerations defined in Type Library
// *********************************************************************//
// Constants for enum __MIDL___MIDL_itf_VergenceContextor_0000_0002
type
__MIDL___MIDL_itf_VergenceContextor_0000_0002 = TOleEnum;
const
CsNotRunning = $00000001;
CsParticipating = $00000002;
CsSuspended = $00000003;
// Constants for enum __MIDL___MIDL_itf_VergenceContextor_0000_0001
type
__MIDL___MIDL_itf_VergenceContextor_0000_0001 = TOleEnum;
const
ApNone = $00000001;
ApGet = $00000002;
ApSet = $00000003;
// Constants for enum __MIDL___MIDL_itf_VergenceContextor_0000_0003
type
__MIDL___MIDL_itf_VergenceContextor_0000_0003 = TOleEnum;
const
UrCommit = $00000001;
UrCancel = $00000002;
UrBreak = $00000003;
type
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
_IContextChangesSink = dispinterface;
IContextor = interface;
IContextorDisp = dispinterface;
IContextParticipant = interface;
IContextParticipantDisp = dispinterface;
IContextItemCollection = interface;
IContextItemCollectionDisp = dispinterface;
IContextItem = interface;
IContextItemDisp = dispinterface;
IResponseContextChange = interface;
IResponseContextChangeDisp = dispinterface;
IResponseDialogAccessor = interface;
IResponseDialogAccessorDisp = dispinterface;
IContextChangesSink = interface;
IContextChangesSinkDisp = dispinterface;
IResponseDialog = interface;
IResponseDialogDisp = dispinterface;
ISetHook = interface;
ISetHookDisp = dispinterface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
Contextor = IContextor;
ContextorControl = IContextor;
ContextItemCollection = IContextItemCollection;
ContextItem = IContextItem;
ResponseDialog = IResponseDialog;
ContextorParticipant = IContextParticipant;
// *********************************************************************//
// Declaration of structures, unions and aliases.
// *********************************************************************//
ContextorState = __MIDL___MIDL_itf_VergenceContextor_0000_0002;
AccessPrivilege = __MIDL___MIDL_itf_VergenceContextor_0000_0001;
UserResponse = __MIDL___MIDL_itf_VergenceContextor_0000_0003;
// *********************************************************************//
// DispIntf: _IContextChangesSink
// Flags: (4096) Dispatchable
// GUID: {6BED8971-B3DD-11D3-8736-0060B0B5E137}
// *********************************************************************//
_IContextChangesSink = dispinterface
['{6BED8971-B3DD-11D3-8736-0060B0B5E137}']
procedure Pending(const aContextItemCollection: IDispatch); dispid 1;
procedure Committed; dispid 2;
procedure Canceled; dispid 3;
end;
// *********************************************************************//
// Interface: IContextor
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {8D879F5D-5FE6-11D3-8727-0060B0B5E137}
// *********************************************************************//
IContextor = interface(IDispatch)
['{8D879F5D-5FE6-11D3-8727-0060B0B5E137}']
procedure Run(const applicationLabel: WideString; const passcode: WideString; survey: WordBool;
const initialNotificationFilter: WideString); safecall;
procedure Suspend; safecall;
procedure Resume; safecall;
function Get_State: ContextorState; safecall;
function GetPrivilege(const subj: WideString): AccessPrivilege; safecall;
function Get_CurrentContext: IContextItemCollection; safecall;
procedure StartContextChange; safecall;
function EndContextChange(commit: WordBool;
const aContextItemCollection: IContextItemCollection): UserResponse; safecall;
procedure SetSurveyResponse(const reason: WideString); safecall;
function Get_NotificationFilter: WideString; safecall;
procedure Set_NotificationFilter(const filter: WideString); safecall;
function Get_Name: WideString; safecall;
property State: ContextorState read Get_State;
property CurrentContext: IContextItemCollection read Get_CurrentContext;
property NotificationFilter: WideString read Get_NotificationFilter write Set_NotificationFilter;
property Name: WideString read Get_Name;
end;
// *********************************************************************//
// DispIntf: IContextorDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {8D879F5D-5FE6-11D3-8727-0060B0B5E137}
// *********************************************************************//
IContextorDisp = dispinterface
['{8D879F5D-5FE6-11D3-8727-0060B0B5E137}']
procedure Run(const applicationLabel: WideString; const passcode: WideString; survey: WordBool;
const initialNotificationFilter: WideString); dispid 1;
procedure Suspend; dispid 2;
procedure Resume; dispid 3;
property State: ContextorState readonly dispid 4;
function GetPrivilege(const subj: WideString): AccessPrivilege; dispid 5;
property CurrentContext: IContextItemCollection readonly dispid 6;
procedure StartContextChange; dispid 7;
function EndContextChange(commit: WordBool;
const aContextItemCollection: IContextItemCollection): UserResponse; dispid 8;
procedure SetSurveyResponse(const reason: WideString); dispid 9;
property NotificationFilter: WideString dispid 10;
property Name: WideString readonly dispid 11;
end;
// *********************************************************************//
// Interface: IContextParticipant
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {3E3DD272-998E-11D0-808D-00A0240943E4}
// *********************************************************************//
IContextParticipant = interface(IDispatch)
['{3E3DD272-998E-11D0-808D-00A0240943E4}']
function ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString; safecall;
procedure ContextChangesAccepted(contextCoupon: Integer); safecall;
procedure ContextChangesCanceled(contextCoupon: Integer); safecall;
procedure CommonContextTerminated; safecall;
procedure Ping; safecall;
end;
// *********************************************************************//
// DispIntf: IContextParticipantDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {3E3DD272-998E-11D0-808D-00A0240943E4}
// *********************************************************************//
IContextParticipantDisp = dispinterface
['{3E3DD272-998E-11D0-808D-00A0240943E4}']
function ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString; dispid 1610743808;
procedure ContextChangesAccepted(contextCoupon: Integer); dispid 1610743809;
procedure ContextChangesCanceled(contextCoupon: Integer); dispid 1610743810;
procedure CommonContextTerminated; dispid 1610743811;
procedure Ping; dispid 1610743812;
end;
// *********************************************************************//
// Interface: IContextItemCollection
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {AC4C0271-615A-11D3-84B5-0000861FDD4F}
// *********************************************************************//
IContextItemCollection = interface(IDispatch)
['{AC4C0271-615A-11D3-84B5-0000861FDD4F}']
function Count: Integer; safecall;
procedure Add(const aContextItem: IContextItem); safecall;
procedure Remove(const contextItemName: WideString); safecall;
procedure RemoveAll; safecall;
function Present(key: OleVariant): IContextItem; safecall;
function Get__NewEnum: IUnknown; safecall;
function Item(key: OleVariant): IContextItem; safecall;
property _NewEnum: IUnknown read Get__NewEnum;
end;
// *********************************************************************//
// DispIntf: IContextItemCollectionDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {AC4C0271-615A-11D3-84B5-0000861FDD4F}
// *********************************************************************//
IContextItemCollectionDisp = dispinterface
['{AC4C0271-615A-11D3-84B5-0000861FDD4F}']
function Count: Integer; dispid 1;
procedure Add(const aContextItem: IContextItem); dispid 2;
procedure Remove(const contextItemName: WideString); dispid 3;
procedure RemoveAll; dispid 4;
function Present(key: OleVariant): IContextItem; dispid 5;
property _NewEnum: IUnknown readonly dispid -4;
function Item(key: OleVariant): IContextItem; dispid 0;
end;
// *********************************************************************//
// Interface: IContextItem
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {AC4C0273-615A-11D3-84B5-0000861FDD4F}
// *********************************************************************//
IContextItem = interface(IDispatch)
['{AC4C0273-615A-11D3-84B5-0000861FDD4F}']
function Get_Subject: WideString; safecall;
procedure Set_Subject(const pVal: WideString); safecall;
function Get_Role: WideString; safecall;
procedure Set_Role(const pVal: WideString); safecall;
function Get_Prefix: WideString; safecall;
procedure Set_Prefix(const pVal: WideString); safecall;
function Get_Suffix: WideString; safecall;
procedure Set_Suffix(const pVal: WideString); safecall;
function Get_Name: WideString; safecall;
procedure Set_Name(const pVal: WideString); safecall;
function Get_Value: WideString; safecall;
procedure Set_Value(const pVal: WideString); safecall;
function Clone: IContextItem; safecall;
property Subject: WideString read Get_Subject write Set_Subject;
property Role: WideString read Get_Role write Set_Role;
property Prefix: WideString read Get_Prefix write Set_Prefix;
property Suffix: WideString read Get_Suffix write Set_Suffix;
property Name: WideString read Get_Name write Set_Name;
property Value: WideString read Get_Value write Set_Value;
end;
// *********************************************************************//
// DispIntf: IContextItemDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {AC4C0273-615A-11D3-84B5-0000861FDD4F}
// *********************************************************************//
IContextItemDisp = dispinterface
['{AC4C0273-615A-11D3-84B5-0000861FDD4F}']
property Subject: WideString dispid 1;
property Role: WideString dispid 2;
property Prefix: WideString dispid 3;
property Suffix: WideString dispid 4;
property Name: WideString dispid 5;
property Value: WideString dispid 6;
function Clone: IContextItem; dispid 7;
end;
// *********************************************************************//
// Interface: IResponseContextChange
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {CBC6D968-9F6D-416A-8AA7-99172E588DF0}
// *********************************************************************//
IResponseContextChange = interface(IDispatch)
['{CBC6D968-9F6D-416A-8AA7-99172E588DF0}']
procedure StartResponseContextChange; safecall;
function EndResponseContextChange(commit: WordBool;
const aContextItemCollection: IContextItemCollection;
var noContinue: WordBool): OleVariant; safecall;
procedure CommitContextChange; safecall;
procedure CancelContextChange; safecall;
end;
// *********************************************************************//
// DispIntf: IResponseContextChangeDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {CBC6D968-9F6D-416A-8AA7-99172E588DF0}
// *********************************************************************//
IResponseContextChangeDisp = dispinterface
['{CBC6D968-9F6D-416A-8AA7-99172E588DF0}']
procedure StartResponseContextChange; dispid 1;
function EndResponseContextChange(commit: WordBool;
const aContextItemCollection: IContextItemCollection;
var noContinue: WordBool): OleVariant; dispid 2;
procedure CommitContextChange; dispid 3;
procedure CancelContextChange; dispid 4;
end;
// *********************************************************************//
// Interface: IResponseDialogAccessor
// Flags: (4432) Hidden Dual OleAutomation Dispatchable
// GUID: {86592071-F3BA-11D3-8181-005004A0F801}
// *********************************************************************//
IResponseDialogAccessor = interface(IDispatch)
['{86592071-F3BA-11D3-8181-005004A0F801}']
procedure Reset; safecall;
procedure Set_(const aResponseDialog: IResponseDialog); safecall;
end;
// *********************************************************************//
// DispIntf: IResponseDialogAccessorDisp
// Flags: (4432) Hidden Dual OleAutomation Dispatchable
// GUID: {86592071-F3BA-11D3-8181-005004A0F801}
// *********************************************************************//
IResponseDialogAccessorDisp = dispinterface
['{86592071-F3BA-11D3-8181-005004A0F801}']
procedure Reset; dispid 1;
procedure Set_(const aResponseDialog: IResponseDialog); dispid 2;
end;
// *********************************************************************//
// Interface: IContextChangesSink
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {0B437E31-620E-11D3-84B6-0000861FDD4F}
// *********************************************************************//
IContextChangesSink = interface(IDispatch)
['{0B437E31-620E-11D3-84B6-0000861FDD4F}']
procedure Pending(const aContextItemCollection: IDispatch); safecall;
procedure Committed; safecall;
procedure Canceled; safecall;
end;
// *********************************************************************//
// DispIntf: IContextChangesSinkDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {0B437E31-620E-11D3-84B6-0000861FDD4F}
// *********************************************************************//
IContextChangesSinkDisp = dispinterface
['{0B437E31-620E-11D3-84B6-0000861FDD4F}']
procedure Pending(const aContextItemCollection: IDispatch); dispid 1;
procedure Committed; dispid 2;
procedure Canceled; dispid 3;
end;
// *********************************************************************//
// Interface: IResponseDialog
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {9D33ECF1-8277-11D3-8525-0000861FDD4F}
// *********************************************************************//
IResponseDialog = interface(IDispatch)
['{9D33ECF1-8277-11D3-8525-0000861FDD4F}']
function ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse; safecall;
end;
// *********************************************************************//
// DispIntf: IResponseDialogDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {9D33ECF1-8277-11D3-8525-0000861FDD4F}
// *********************************************************************//
IResponseDialogDisp = dispinterface
['{9D33ECF1-8277-11D3-8525-0000861FDD4F}']
function ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse; dispid 1;
end;
// *********************************************************************//
// Interface: ISetHook
// Flags: (4432) Hidden Dual OleAutomation Dispatchable
// GUID: {8D879FDD-5FE6-11D3-8727-0060B0B5E137}
// *********************************************************************//
ISetHook = interface(IDispatch)
['{8D879FDD-5FE6-11D3-8727-0060B0B5E137}']
procedure SetParticipant(const aContextParticipant: IContextParticipant); safecall;
end;
// *********************************************************************//
// DispIntf: ISetHookDisp
// Flags: (4432) Hidden Dual OleAutomation Dispatchable
// GUID: {8D879FDD-5FE6-11D3-8727-0060B0B5E137}
// *********************************************************************//
ISetHookDisp = dispinterface
['{8D879FDD-5FE6-11D3-8727-0060B0B5E137}']
procedure SetParticipant(const aContextParticipant: IContextParticipant); dispid 1;
end;
// *********************************************************************//
// The Class CoContextor provides a Create and CreateRemote method to
// create instances of the default interface IContextor exposed by
// the CoClass Contextor. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoContextor = class
class function Create: IContextor;
class function CreateRemote(const MachineName: string): IContextor;
end;
TContextorPending = procedure(Sender: TObject; var aContextItemCollection: OleVariant) of object;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TContextor
// Help String : Vergence Contextor
// Default Interface: IContextor
// Def. Intf. DISP? : No
// Event Interface: _IContextChangesSink
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TContextorProperties= class;
{$ENDIF}
TContextor = class(TOleServer)
private
FOnPending: TContextorPending;
FOnCommitted: TNotifyEvent;
FOnCanceled: TNotifyEvent;
FIntf: IContextor;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TContextorProperties;
function GetServerProperties: TContextorProperties;
{$ENDIF}
function GetDefaultInterface: IContextor;
protected
procedure InitServerData; override;
procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
function Get_State: ContextorState;
function Get_CurrentContext: IContextItemCollection;
function Get_NotificationFilter: WideString;
procedure Set_NotificationFilter(const filter: WideString);
function Get_Name: WideString;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IContextor);
procedure Disconnect; override;
procedure Run(const applicationLabel: WideString; const passcode: WideString; survey: WordBool;
const initialNotificationFilter: WideString);
procedure Suspend;
procedure Resume;
function GetPrivilege(const subj: WideString): AccessPrivilege;
procedure StartContextChange;
function EndContextChange(commit: WordBool;
const aContextItemCollection: IContextItemCollection): UserResponse;
procedure SetSurveyResponse(const reason: WideString);
property DefaultInterface: IContextor read GetDefaultInterface;
property State: ContextorState read Get_State;
property CurrentContext: IContextItemCollection read Get_CurrentContext;
property Name: WideString read Get_Name;
property NotificationFilter: WideString read Get_NotificationFilter write Set_NotificationFilter;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TContextorProperties read GetServerProperties;
{$ENDIF}
property OnPending: TContextorPending read FOnPending write FOnPending;
property OnCommitted: TNotifyEvent read FOnCommitted write FOnCommitted;
property OnCanceled: TNotifyEvent read FOnCanceled write FOnCanceled;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TContextor
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TContextorProperties = class(TPersistent)
private
FServer: TContextor;
function GetDefaultInterface: IContextor;
constructor Create(AServer: TContextor);
protected
function Get_State: ContextorState;
function Get_CurrentContext: IContextItemCollection;
function Get_NotificationFilter: WideString;
procedure Set_NotificationFilter(const filter: WideString);
function Get_Name: WideString;
public
property DefaultInterface: IContextor read GetDefaultInterface;
published
property NotificationFilter: WideString read Get_NotificationFilter write Set_NotificationFilter;
end;
{$ENDIF}
// *********************************************************************//
// OLE Control Proxy class declaration
// Control Name : TContextorControl
// Help String : Vergence ContextorControl
// Default Interface: IContextor
// Def. Intf. DISP? : No
// Event Interface: _IContextChangesSink
// TypeFlags : (2) CanCreate
// *********************************************************************//
TContextorControlPending = procedure(Sender: TObject; const aContextItemCollection: IDispatch) of object;
TContextorControl = class(TOleControl)
private
FOnPending: TContextorControlPending;
FOnCommitted: TNotifyEvent;
FOnCanceled: TNotifyEvent;
FIntf: IContextor;
function GetControlInterface: IContextor;
protected
procedure CreateControl;
procedure InitControlData; override;
function Get_CurrentContext: IContextItemCollection;
public
procedure Run(const applicationLabel: WideString; const passcode: WideString; survey: WordBool;
const initialNotificationFilter: WideString);
procedure Suspend;
procedure Resume;
function GetPrivilege(const subj: WideString): AccessPrivilege;
procedure StartContextChange;
function EndContextChange(commit: WordBool;
const aContextItemCollection: IContextItemCollection): UserResponse;
procedure SetSurveyResponse(const reason: WideString);
property ControlInterface: IContextor read GetControlInterface;
property DefaultInterface: IContextor read GetControlInterface;
property State: TOleEnum index 4 read GetTOleEnumProp;
property CurrentContext: IContextItemCollection read Get_CurrentContext;
property Name: WideString index 11 read GetWideStringProp;
published
property NotificationFilter: WideString index 10 read GetWideStringProp write SetWideStringProp stored False;
property OnPending: TContextorControlPending read FOnPending write FOnPending;
property OnCommitted: TNotifyEvent read FOnCommitted write FOnCommitted;
property OnCanceled: TNotifyEvent read FOnCanceled write FOnCanceled;
end;
// *********************************************************************//
// The Class CoContextItemCollection provides a Create and CreateRemote method to
// create instances of the default interface IContextItemCollection exposed by
// the CoClass ContextItemCollection. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoContextItemCollection = class
class function Create: IContextItemCollection;
class function CreateRemote(const MachineName: string): IContextItemCollection;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TContextItemCollection
// Help String : Vergence ContextItemCollection
// Default Interface: IContextItemCollection
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TContextItemCollectionProperties= class;
{$ENDIF}
TContextItemCollection = class(TOleServer)
private
FIntf: IContextItemCollection;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TContextItemCollectionProperties;
function GetServerProperties: TContextItemCollectionProperties;
{$ENDIF}
function GetDefaultInterface: IContextItemCollection;
protected
procedure InitServerData; override;
function Get__NewEnum: IUnknown;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IContextItemCollection);
procedure Disconnect; override;
function Count: Integer;
procedure Add(const aContextItem: IContextItem);
procedure Remove(const contextItemName: WideString);
procedure RemoveAll;
function Present(key: OleVariant): IContextItem;
function Item(key: OleVariant): IContextItem;
property DefaultInterface: IContextItemCollection read GetDefaultInterface;
property _NewEnum: IUnknown read Get__NewEnum;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TContextItemCollectionProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TContextItemCollection
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TContextItemCollectionProperties = class(TPersistent)
private
FServer: TContextItemCollection;
function GetDefaultInterface: IContextItemCollection;
constructor Create(AServer: TContextItemCollection);
protected
function Get__NewEnum: IUnknown;
public
property DefaultInterface: IContextItemCollection read GetDefaultInterface;
published
end;
{$ENDIF}
// *********************************************************************//
// The Class CoContextItem provides a Create and CreateRemote method to
// create instances of the default interface IContextItem exposed by
// the CoClass ContextItem. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoContextItem = class
class function Create: IContextItem;
class function CreateRemote(const MachineName: string): IContextItem;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TContextItem
// Help String : Vergence ContextItem
// Default Interface: IContextItem
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TContextItemProperties= class;
{$ENDIF}
TContextItem = class(TOleServer)
private
FIntf: IContextItem;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TContextItemProperties;
function GetServerProperties: TContextItemProperties;
{$ENDIF}
function GetDefaultInterface: IContextItem;
protected
procedure InitServerData; override;
function Get_Subject: WideString;
procedure Set_Subject(const pVal: WideString);
function Get_Role: WideString;
procedure Set_Role(const pVal: WideString);
function Get_Prefix: WideString;
procedure Set_Prefix(const pVal: WideString);
function Get_Suffix: WideString;
procedure Set_Suffix(const pVal: WideString);
function Get_Name: WideString;
procedure Set_Name(const pVal: WideString);
function Get_Value: WideString;
procedure Set_Value(const pVal: WideString);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IContextItem);
procedure Disconnect; override;
function Clone: IContextItem;
property DefaultInterface: IContextItem read GetDefaultInterface;
property Subject: WideString read Get_Subject write Set_Subject;
property Role: WideString read Get_Role write Set_Role;
property Prefix: WideString read Get_Prefix write Set_Prefix;
property Suffix: WideString read Get_Suffix write Set_Suffix;
property Name: WideString read Get_Name write Set_Name;
property Value: WideString read Get_Value write Set_Value;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TContextItemProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TContextItem
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TContextItemProperties = class(TPersistent)
private
FServer: TContextItem;
function GetDefaultInterface: IContextItem;
constructor Create(AServer: TContextItem);
protected
function Get_Subject: WideString;
procedure Set_Subject(const pVal: WideString);
function Get_Role: WideString;
procedure Set_Role(const pVal: WideString);
function Get_Prefix: WideString;
procedure Set_Prefix(const pVal: WideString);
function Get_Suffix: WideString;
procedure Set_Suffix(const pVal: WideString);
function Get_Name: WideString;
procedure Set_Name(const pVal: WideString);
function Get_Value: WideString;
procedure Set_Value(const pVal: WideString);
public
property DefaultInterface: IContextItem read GetDefaultInterface;
published
property Subject: WideString read Get_Subject write Set_Subject;
property Role: WideString read Get_Role write Set_Role;
property Prefix: WideString read Get_Prefix write Set_Prefix;
property Suffix: WideString read Get_Suffix write Set_Suffix;
property Name: WideString read Get_Name write Set_Name;
property Value: WideString read Get_Value write Set_Value;
end;
{$ENDIF}
// *********************************************************************//
// The Class CoResponseDialog provides a Create and CreateRemote method to
// create instances of the default interface IResponseDialog exposed by
// the CoClass ResponseDialog. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoResponseDialog = class
class function Create: IResponseDialog;
class function CreateRemote(const MachineName: string): IResponseDialog;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TResponseDialog
// Help String : Vergence ResponseDialog
// Default Interface: IResponseDialog
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TResponseDialogProperties= class;
{$ENDIF}
TResponseDialog = class(TOleServer)
private
FIntf: IResponseDialog;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TResponseDialogProperties;
function GetServerProperties: TResponseDialogProperties;
{$ENDIF}
function GetDefaultInterface: IResponseDialog;
protected
procedure InitServerData; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IResponseDialog);
procedure Disconnect; override;
function ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse;
property DefaultInterface: IResponseDialog read GetDefaultInterface;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TResponseDialogProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TResponseDialog
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TResponseDialogProperties = class(TPersistent)
private
FServer: TResponseDialog;
function GetDefaultInterface: IResponseDialog;
constructor Create(AServer: TResponseDialog);
protected
public
property DefaultInterface: IResponseDialog read GetDefaultInterface;
published
end;
{$ENDIF}
// *********************************************************************//
// The Class CoContextorParticipant provides a Create and CreateRemote method to
// create instances of the default interface IContextParticipant exposed by
// the CoClass ContextorParticipant. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoContextorParticipant = class
class function Create: IContextParticipant;
class function CreateRemote(const MachineName: string): IContextParticipant;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TContextorParticipant
// Help String : ContextorParticipant Class
// Default Interface: IContextParticipant
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TContextorParticipantProperties= class;
{$ENDIF}
TContextorParticipant = class(TOleServer)
private
FIntf: IContextParticipant;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TContextorParticipantProperties;
function GetServerProperties: TContextorParticipantProperties;
{$ENDIF}
function GetDefaultInterface: IContextParticipant;
protected
procedure InitServerData; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IContextParticipant);
procedure Disconnect; override;
function ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString;
procedure ContextChangesAccepted(contextCoupon: Integer);
procedure ContextChangesCanceled(contextCoupon: Integer);
procedure CommonContextTerminated;
procedure Ping;
property DefaultInterface: IContextParticipant read GetDefaultInterface;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TContextorParticipantProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TContextorParticipant
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TContextorParticipantProperties = class(TPersistent)
private
FServer: TContextorParticipant;
function GetDefaultInterface: IContextParticipant;
constructor Create(AServer: TContextorParticipant);
protected
public
property DefaultInterface: IContextParticipant read GetDefaultInterface;
published
end;
{$ENDIF}
{
procedure Register;
}
implementation
uses ComObj;
class function CoContextor.Create: IContextor;
begin
Result := CreateComObject(CLASS_Contextor) as IContextor;
end;
class function CoContextor.CreateRemote(const MachineName: string): IContextor;
begin
Result := CreateRemoteComObject(MachineName, CLASS_Contextor) as IContextor;
end;
procedure TContextor.InitServerData;
const
CServerData: TServerData = (
ClassID: '{D5C9CC98-5FDB-11D3-8727-0060B0B5E137}';
IntfIID: '{8D879F5D-5FE6-11D3-8727-0060B0B5E137}';
EventIID: '{6BED8971-B3DD-11D3-8736-0060B0B5E137}';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;
procedure TContextor.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
ConnectEvents(punk);
Fintf:= punk as IContextor;
end;
end;
procedure TContextor.ConnectTo(svrIntf: IContextor);
begin
Disconnect;
FIntf := svrIntf;
ConnectEvents(FIntf);
end;
procedure TContextor.DisConnect;
begin
if Fintf <> nil then
begin
DisconnectEvents(FIntf);
FIntf := nil;
end;
end;
function TContextor.GetDefaultInterface: IContextor;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
Result := FIntf;
end;
constructor TContextor.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TContextorProperties.Create(Self);
{$ENDIF}
end;
destructor TContextor.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TContextor.GetServerProperties: TContextorProperties;
begin
Result := FProps;
end;
{$ENDIF}
procedure TContextor.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
case DispID of
-1: Exit; // DISPID_UNKNOWN
1: if Assigned(FOnPending) then
FOnPending(Self, Params[0] {const IDispatch});
2: if Assigned(FOnCommitted) then
FOnCommitted(Self);
3: if Assigned(FOnCanceled) then
FOnCanceled(Self);
end; {case DispID}
end;