-
Notifications
You must be signed in to change notification settings - Fork 10
/
UPNPLib_TLB.pas
1853 lines (1638 loc) · 63.4 KB
/
UPNPLib_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 UPNPLib_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.
// ************************************************************************ //
// $Rev: 17244 $
// File generated on 20-12-2012 11:34:23 from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\Windows\system32\upnp.dll (1)
// LIBID: {DB3442A7-A2E9-4A59-9CB5-F5C1A5D901E5}
// LCID: 0
// Helpfile:
// HelpString: UPnP 1.0 Type Library (Control Point)
// DepndLst:
// (1) v2.0 stdole, (C:\Windows\system32\stdole2.tlb)
// Errors:
// Hint: Symbol 'Type' renamed to 'type_'
// Error creating palette bitmap of (TUPnPDeviceFinder) : Server C:\Windows\system32\upnp.dll contains no icons
// Error creating palette bitmap of (TUPnPDevices) : Server C:\Windows\system32\upnp.dll contains no icons
// Error creating palette bitmap of (TUPnPDevice) : Server C:\Windows\system32\upnp.dll contains no icons
// Error creating palette bitmap of (TUPnPServices) : Server C:\Windows\system32\upnp.dll contains no icons
// Error creating palette bitmap of (TUPnPService) : Server C:\Windows\system32\upnp.dll contains no icons
// Error creating palette bitmap of (TUPnPDescriptionDocument) : Server C:\Windows\system32\upnp.dll contains no icons
// ************************************************************************ //
// *************************************************************************//
// 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.
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
{$ALIGN 4}
interface
uses Windows, ActiveX, Classes, Graphics, OleServer, StdVCL, Variants;
// *********************************************************************//
// 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
UPNPLibMajorVersion = 1;
UPNPLibMinorVersion = 0;
LIBID_UPNPLib: TGUID = '{DB3442A7-A2E9-4A59-9CB5-F5C1A5D901E5}';
IID_IUPnPDeviceFinder: TGUID = '{ADDA3D55-6F72-4319-BFF9-18600A539B10}';
IID_IUPnPAddressFamilyControl: TGUID = '{E3BF6178-694E-459F-A5A6-191EA0FFA1C7}';
IID_IUPnPDevices: TGUID = '{FDBC0C73-BDA3-4C66-AC4F-F2D96FDAD68C}';
IID_IUPnPDevice: TGUID = '{3D44D0D1-98C9-4889-ACD1-F9D674BF2221}';
IID_IUPnPServices: TGUID = '{3F8C8E9E-9A7A-4DC8-BC41-FF31FA374956}';
IID_IUPnPService: TGUID = '{A295019C-DC65-47DD-90DC-7FE918A1AB44}';
IID_IUPnPHttpHeaderControl: TGUID = '{0405AF4F-8B5C-447C-80F2-B75984A31F3C}';
CLASS_UPnPDeviceFinder: TGUID = '{E2085F28-FEB7-404A-B8E7-E659BDEAAA02}';
CLASS_UPnPDevices: TGUID = '{B9E84FFD-AD3C-40A4-B835-0882EBCBAAA8}';
CLASS_UPnPDevice: TGUID = '{A32552C5-BA61-457A-B59A-A2561E125E33}';
CLASS_UPnPServices: TGUID = '{C0BC4B4A-A406-4EFC-932F-B8546B8100CC}';
CLASS_UPnPService: TGUID = '{C624BA95-FBCB-4409-8C03-8CCEEC533EF1}';
IID_IUPnPDescriptionDocument: TGUID = '{11D1C1B2-7DAA-4C9E-9595-7F82ED206D1E}';
CLASS_UPnPDescriptionDocument: TGUID = '{1D8A9B47-3A28-4CE2-8A4B-BD34E45BCEEB}';
IID_IUPnPDeviceDocumentAccess: TGUID = '{E7772804-3287-418E-9072-CF2B47238981}';
IID_IUPnPDeviceDocumentAccessEx: TGUID = '{C4BC4050-6178-4BD1-A4B8-6398321F3247}';
IID_IUPnPDeviceFinderCallback: TGUID = '{415A984A-88B3-49F3-92AF-0508BEDF0D6C}';
IID_IUPnPDeviceFinderAddCallbackWithInterface: TGUID = '{983DFC0B-1796-44DF-8975-CA545B620EE5}';
IID_IUPnPServiceCallback: TGUID = '{31FADCA9-AB73-464B-B67D-5C1D0F83C8B8}';
type
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
IUPnPDeviceFinder = interface;
IUPnPDeviceFinderDisp = dispinterface;
IUPnPAddressFamilyControl = interface;
IUPnPDevices = interface;
IUPnPDevicesDisp = dispinterface;
IUPnPDevice = interface;
IUPnPDeviceDisp = dispinterface;
IUPnPServices = interface;
IUPnPServicesDisp = dispinterface;
IUPnPService = interface;
IUPnPServiceDisp = dispinterface;
IUPnPHttpHeaderControl = interface;
IUPnPDescriptionDocument = interface;
IUPnPDescriptionDocumentDisp = dispinterface;
IUPnPDeviceDocumentAccess = interface;
IUPnPDeviceDocumentAccessEx = interface;
IUPnPDeviceFinderCallback = interface;
IUPnPDeviceFinderAddCallbackWithInterface = interface;
IUPnPServiceCallback = interface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
UPnPDeviceFinder = IUPnPDeviceFinder;
UPnPDevices = IUPnPDevices;
UPnPDevice = IUPnPDevice;
UPnPServices = IUPnPServices;
UPnPService = IUPnPService;
UPnPDescriptionDocument = IUPnPDescriptionDocument;
// *********************************************************************//
// Declaration of structures, unions and aliases.
// *********************************************************************//
PUserType1 = ^TGUID; {*}
// *********************************************************************//
// Interface: IUPnPDeviceFinder
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {ADDA3D55-6F72-4319-BFF9-18600A539B10}
// *********************************************************************//
IUPnPDeviceFinder = interface(IDispatch)
['{ADDA3D55-6F72-4319-BFF9-18600A539B10}']
function FindByType(const bstrTypeURI: WideString; dwFlags: LongWord): IUPnPDevices; safecall;
function CreateAsyncFind(const bstrTypeURI: WideString; dwFlags: LongWord;
const punkDeviceFinderCallback: IUnknown): Integer; safecall;
procedure StartAsyncFind(lFindData: Integer); safecall;
procedure CancelAsyncFind(lFindData: Integer); safecall;
function FindByUDN(const bstrUDN: WideString): IUPnPDevice; safecall;
end;
// *********************************************************************//
// DispIntf: IUPnPDeviceFinderDisp
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {ADDA3D55-6F72-4319-BFF9-18600A539B10}
// *********************************************************************//
IUPnPDeviceFinderDisp = dispinterface
['{ADDA3D55-6F72-4319-BFF9-18600A539B10}']
function FindByType(const bstrTypeURI: WideString; dwFlags: LongWord): IUPnPDevices; dispid 1610744809;
function CreateAsyncFind(const bstrTypeURI: WideString; dwFlags: LongWord;
const punkDeviceFinderCallback: IUnknown): Integer; dispid 1610744812;
procedure StartAsyncFind(lFindData: Integer); dispid 1610744813;
procedure CancelAsyncFind(lFindData: Integer); dispid 1610744814;
function FindByUDN(const bstrUDN: WideString): IUPnPDevice; dispid 1610744811;
end;
// *********************************************************************//
// Interface: IUPnPAddressFamilyControl
// Flags: (256) OleAutomation
// GUID: {E3BF6178-694E-459F-A5A6-191EA0FFA1C7}
// *********************************************************************//
IUPnPAddressFamilyControl = interface(IUnknown)
['{E3BF6178-694E-459F-A5A6-191EA0FFA1C7}']
function SetAddressFamily(dwFlags: Integer): HResult; stdcall;
function GetAddressFamily(out pdwFlags: Integer): HResult; stdcall;
end;
// *********************************************************************//
// Interface: IUPnPDevices
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {FDBC0C73-BDA3-4C66-AC4F-F2D96FDAD68C}
// *********************************************************************//
IUPnPDevices = interface(IDispatch)
['{FDBC0C73-BDA3-4C66-AC4F-F2D96FDAD68C}']
function Get_Count: Integer; safecall;
function Get__NewEnum: IUnknown; safecall;
function Get_Item(const bstrUDN: WideString): IUPnPDevice; safecall;
property Count: Integer read Get_Count;
property _NewEnum: IUnknown read Get__NewEnum;
property Item[const bstrUDN: WideString]: IUPnPDevice read Get_Item; default;
end;
// *********************************************************************//
// DispIntf: IUPnPDevicesDisp
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {FDBC0C73-BDA3-4C66-AC4F-F2D96FDAD68C}
// *********************************************************************//
IUPnPDevicesDisp = dispinterface
['{FDBC0C73-BDA3-4C66-AC4F-F2D96FDAD68C}']
property Count: Integer readonly dispid 1610747309;
property _NewEnum: IUnknown readonly dispid -4;
property Item[const bstrUDN: WideString]: IUPnPDevice readonly dispid 0; default;
end;
// *********************************************************************//
// Interface: IUPnPDevice
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {3D44D0D1-98C9-4889-ACD1-F9D674BF2221}
// *********************************************************************//
IUPnPDevice = interface(IDispatch)
['{3D44D0D1-98C9-4889-ACD1-F9D674BF2221}']
function Get_IsRootDevice: WordBool; safecall;
function Get_RootDevice: IUPnPDevice; safecall;
function Get_ParentDevice: IUPnPDevice; safecall;
function Get_HasChildren: WordBool; safecall;
function Get_Children: IUPnPDevices; safecall;
function Get_UniqueDeviceName: WideString; safecall;
function Get_FriendlyName: WideString; safecall;
function Get_type_: WideString; safecall;
function Get_PresentationURL: WideString; safecall;
function Get_ManufacturerName: WideString; safecall;
function Get_ManufacturerURL: WideString; safecall;
function Get_ModelName: WideString; safecall;
function Get_ModelNumber: WideString; safecall;
function Get_Description: WideString; safecall;
function Get_ModelURL: WideString; safecall;
function Get_UPC: WideString; safecall;
function Get_SerialNumber: WideString; safecall;
function IconURL(const bstrEncodingFormat: WideString; lSizeX: Integer; lSizeY: Integer;
lBitDepth: Integer): WideString; safecall;
function Get_Services: IUPnPServices; safecall;
property IsRootDevice: WordBool read Get_IsRootDevice;
property RootDevice: IUPnPDevice read Get_RootDevice;
property ParentDevice: IUPnPDevice read Get_ParentDevice;
property HasChildren: WordBool read Get_HasChildren;
property Children: IUPnPDevices read Get_Children;
property UniqueDeviceName: WideString read Get_UniqueDeviceName;
property FriendlyName: WideString read Get_FriendlyName;
property type_: WideString read Get_type_;
property PresentationURL: WideString read Get_PresentationURL;
property ManufacturerName: WideString read Get_ManufacturerName;
property ManufacturerURL: WideString read Get_ManufacturerURL;
property ModelName: WideString read Get_ModelName;
property ModelNumber: WideString read Get_ModelNumber;
property Description: WideString read Get_Description;
property ModelURL: WideString read Get_ModelURL;
property UPC: WideString read Get_UPC;
property SerialNumber: WideString read Get_SerialNumber;
property Services: IUPnPServices read Get_Services;
end;
// *********************************************************************//
// DispIntf: IUPnPDeviceDisp
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {3D44D0D1-98C9-4889-ACD1-F9D674BF2221}
// *********************************************************************//
IUPnPDeviceDisp = dispinterface
['{3D44D0D1-98C9-4889-ACD1-F9D674BF2221}']
property IsRootDevice: WordBool readonly dispid 1610747809;
property RootDevice: IUPnPDevice readonly dispid 1610747810;
property ParentDevice: IUPnPDevice readonly dispid 1610747811;
property HasChildren: WordBool readonly dispid 1610747812;
property Children: IUPnPDevices readonly dispid 1610747813;
property UniqueDeviceName: WideString readonly dispid 1610747814;
property FriendlyName: WideString readonly dispid 1610747815;
property type_: WideString readonly dispid 1610747816;
property PresentationURL: WideString readonly dispid 1610747817;
property ManufacturerName: WideString readonly dispid 1610747818;
property ManufacturerURL: WideString readonly dispid 1610747819;
property ModelName: WideString readonly dispid 1610747820;
property ModelNumber: WideString readonly dispid 1610747821;
property Description: WideString readonly dispid 1610747822;
property ModelURL: WideString readonly dispid 1610747823;
property UPC: WideString readonly dispid 1610747824;
property SerialNumber: WideString readonly dispid 1610747825;
function IconURL(const bstrEncodingFormat: WideString; lSizeX: Integer; lSizeY: Integer;
lBitDepth: Integer): WideString; dispid 1610747827;
property Services: IUPnPServices readonly dispid 1610747828;
end;
// *********************************************************************//
// Interface: IUPnPServices
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {3F8C8E9E-9A7A-4DC8-BC41-FF31FA374956}
// *********************************************************************//
IUPnPServices = interface(IDispatch)
['{3F8C8E9E-9A7A-4DC8-BC41-FF31FA374956}']
function Get_Count: Integer; safecall;
function Get__NewEnum: IUnknown; safecall;
function Get_Item(const bstrServiceId: WideString): IUPnPService; safecall;
property Count: Integer read Get_Count;
property _NewEnum: IUnknown read Get__NewEnum;
property Item[const bstrServiceId: WideString]: IUPnPService read Get_Item; default;
end;
// *********************************************************************//
// DispIntf: IUPnPServicesDisp
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {3F8C8E9E-9A7A-4DC8-BC41-FF31FA374956}
// *********************************************************************//
IUPnPServicesDisp = dispinterface
['{3F8C8E9E-9A7A-4DC8-BC41-FF31FA374956}']
property Count: Integer readonly dispid 1610745809;
property _NewEnum: IUnknown readonly dispid -4;
property Item[const bstrServiceId: WideString]: IUPnPService readonly dispid 0; default;
end;
// *********************************************************************//
// Interface: IUPnPService
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {A295019C-DC65-47DD-90DC-7FE918A1AB44}
// *********************************************************************//
IUPnPService = interface(IDispatch)
['{A295019C-DC65-47DD-90DC-7FE918A1AB44}']
function QueryStateVariable(const bstrVariableName: WideString): OleVariant; safecall;
function InvokeAction(const bstrActionName: WideString; vInActionArgs: OleVariant;
var pvOutActionArgs: OleVariant): OleVariant; safecall;
function Get_ServiceTypeIdentifier: WideString; safecall;
procedure AddCallback(const pUnkCallback: IUnknown); safecall;
function Get_Id: WideString; safecall;
function Get_LastTransportStatus: Integer; safecall;
property ServiceTypeIdentifier: WideString read Get_ServiceTypeIdentifier;
property Id: WideString read Get_Id;
property LastTransportStatus: Integer read Get_LastTransportStatus;
end;
// *********************************************************************//
// DispIntf: IUPnPServiceDisp
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {A295019C-DC65-47DD-90DC-7FE918A1AB44}
// *********************************************************************//
IUPnPServiceDisp = dispinterface
['{A295019C-DC65-47DD-90DC-7FE918A1AB44}']
function QueryStateVariable(const bstrVariableName: WideString): OleVariant; dispid 1610746309;
function InvokeAction(const bstrActionName: WideString; vInActionArgs: OleVariant;
var pvOutActionArgs: OleVariant): OleVariant; dispid 1610746310;
property ServiceTypeIdentifier: WideString readonly dispid 1610746311;
procedure AddCallback(const pUnkCallback: IUnknown); dispid 1610746312;
property Id: WideString readonly dispid 1610746313;
property LastTransportStatus: Integer readonly dispid 1610746314;
end;
// *********************************************************************//
// Interface: IUPnPHttpHeaderControl
// Flags: (256) OleAutomation
// GUID: {0405AF4F-8B5C-447C-80F2-B75984A31F3C}
// *********************************************************************//
IUPnPHttpHeaderControl = interface(IUnknown)
['{0405AF4F-8B5C-447C-80F2-B75984A31F3C}']
function AddRequestHeaders(const bstrHttpHeaders: WideString): HResult; stdcall;
end;
// *********************************************************************//
// Interface: IUPnPDescriptionDocument
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {11D1C1B2-7DAA-4C9E-9595-7F82ED206D1E}
// *********************************************************************//
IUPnPDescriptionDocument = interface(IDispatch)
['{11D1C1B2-7DAA-4C9E-9595-7F82ED206D1E}']
function Get_ReadyState: Integer; safecall;
procedure Load(const bstrUrl: WideString); safecall;
procedure LoadAsync(const bstrUrl: WideString; const pUnkCallback: IUnknown); safecall;
function Get_LoadResult: Integer; safecall;
procedure Abort; safecall;
function RootDevice: IUPnPDevice; safecall;
function DeviceByUDN(const bstrUDN: WideString): IUPnPDevice; safecall;
property ReadyState: Integer read Get_ReadyState;
property LoadResult: Integer read Get_LoadResult;
end;
// *********************************************************************//
// DispIntf: IUPnPDescriptionDocumentDisp
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {11D1C1B2-7DAA-4C9E-9595-7F82ED206D1E}
// *********************************************************************//
IUPnPDescriptionDocumentDisp = dispinterface
['{11D1C1B2-7DAA-4C9E-9595-7F82ED206D1E}']
property ReadyState: Integer readonly dispid -525;
procedure Load(const bstrUrl: WideString); dispid 1610748309;
procedure LoadAsync(const bstrUrl: WideString; const pUnkCallback: IUnknown); dispid 1610748310;
property LoadResult: Integer readonly dispid 1610748311;
procedure Abort; dispid 1610748312;
function RootDevice: IUPnPDevice; dispid 1610748313;
function DeviceByUDN(const bstrUDN: WideString): IUPnPDevice; dispid 1610748314;
end;
// *********************************************************************//
// Interface: IUPnPDeviceDocumentAccess
// Flags: (0)
// GUID: {E7772804-3287-418E-9072-CF2B47238981}
// *********************************************************************//
IUPnPDeviceDocumentAccess = interface(IUnknown)
['{E7772804-3287-418E-9072-CF2B47238981}']
function GetDocumentURL(out pbstrDocument: WideString): HResult; stdcall;
end;
// *********************************************************************//
// Interface: IUPnPDeviceDocumentAccessEx
// Flags: (0)
// GUID: {C4BC4050-6178-4BD1-A4B8-6398321F3247}
// *********************************************************************//
IUPnPDeviceDocumentAccessEx = interface(IUnknown)
['{C4BC4050-6178-4BD1-A4B8-6398321F3247}']
function GetDocument(out pbstrDocument: WideString): HResult; stdcall;
end;
// *********************************************************************//
// Interface: IUPnPDeviceFinderCallback
// Flags: (0)
// GUID: {415A984A-88B3-49F3-92AF-0508BEDF0D6C}
// *********************************************************************//
IUPnPDeviceFinderCallback = interface(IUnknown)
['{415A984A-88B3-49F3-92AF-0508BEDF0D6C}']
function DeviceAdded(lFindData: Integer; const pDevice: IUPnPDevice): HResult; stdcall;
function DeviceRemoved(lFindData: Integer; const bstrUDN: WideString): HResult; stdcall;
function SearchComplete(lFindData: Integer): HResult; stdcall;
end;
// *********************************************************************//
// Interface: IUPnPDeviceFinderAddCallbackWithInterface
// Flags: (0)
// GUID: {983DFC0B-1796-44DF-8975-CA545B620EE5}
// *********************************************************************//
IUPnPDeviceFinderAddCallbackWithInterface = interface(IUnknown)
['{983DFC0B-1796-44DF-8975-CA545B620EE5}']
function DeviceAddedWithInterface(lFindData: Integer; const pDevice: IUPnPDevice;
var pguidInterface: TGUID): HResult; stdcall;
end;
// *********************************************************************//
// Interface: IUPnPServiceCallback
// Flags: (0)
// GUID: {31FADCA9-AB73-464B-B67D-5C1D0F83C8B8}
// *********************************************************************//
IUPnPServiceCallback = interface(IUnknown)
['{31FADCA9-AB73-464B-B67D-5C1D0F83C8B8}']
function StateVariableChanged(const pus: IUPnPService; pcwszStateVarName: PWideChar;
vaValue: OleVariant): HResult; stdcall;
function ServiceInstanceDied(const pus: IUPnPService): HResult; stdcall;
end;
// *********************************************************************//
// The Class CoUPnPDeviceFinder provides a Create and CreateRemote method to
// create instances of the default interface IUPnPDeviceFinder exposed by
// the CoClass UPnPDeviceFinder. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoUPnPDeviceFinder = class
class function Create: IUPnPDeviceFinder;
class function CreateRemote(const MachineName: string): IUPnPDeviceFinder;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TUPnPDeviceFinder
// Help String : UPnPDeviceFinder Class
// Default Interface: IUPnPDeviceFinder
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TUPnPDeviceFinderProperties= class;
{$ENDIF}
TUPnPDeviceFinder = class(TOleServer)
private
FIntf: IUPnPDeviceFinder;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TUPnPDeviceFinderProperties;
function GetServerProperties: TUPnPDeviceFinderProperties;
{$ENDIF}
function GetDefaultInterface: IUPnPDeviceFinder;
protected
procedure InitServerData; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IUPnPDeviceFinder);
procedure Disconnect; override;
function FindByType(const bstrTypeURI: WideString; dwFlags: LongWord): IUPnPDevices;
function CreateAsyncFind(const bstrTypeURI: WideString; dwFlags: LongWord;
const punkDeviceFinderCallback: IUnknown): Integer;
procedure StartAsyncFind(lFindData: Integer);
procedure CancelAsyncFind(lFindData: Integer);
function FindByUDN(const bstrUDN: WideString): IUPnPDevice;
property DefaultInterface: IUPnPDeviceFinder read GetDefaultInterface;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TUPnPDeviceFinderProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TUPnPDeviceFinder
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TUPnPDeviceFinderProperties = class(TPersistent)
private
FServer: TUPnPDeviceFinder;
function GetDefaultInterface: IUPnPDeviceFinder;
constructor Create(AServer: TUPnPDeviceFinder);
protected
public
property DefaultInterface: IUPnPDeviceFinder read GetDefaultInterface;
published
end;
{$ENDIF}
// *********************************************************************//
// The Class CoUPnPDevices provides a Create and CreateRemote method to
// create instances of the default interface IUPnPDevices exposed by
// the CoClass UPnPDevices. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoUPnPDevices = class
class function Create: IUPnPDevices;
class function CreateRemote(const MachineName: string): IUPnPDevices;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TUPnPDevices
// Help String : UPnPDevices Class
// Default Interface: IUPnPDevices
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TUPnPDevicesProperties= class;
{$ENDIF}
TUPnPDevices = class(TOleServer)
private
FIntf: IUPnPDevices;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TUPnPDevicesProperties;
function GetServerProperties: TUPnPDevicesProperties;
{$ENDIF}
function GetDefaultInterface: IUPnPDevices;
protected
procedure InitServerData; override;
function Get_Count: Integer;
function Get_Item(const bstrUDN: WideString): IUPnPDevice;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IUPnPDevices);
procedure Disconnect; override;
property DefaultInterface: IUPnPDevices read GetDefaultInterface;
property Count: Integer read Get_Count;
property Item[const bstrUDN: WideString]: IUPnPDevice read Get_Item; default;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TUPnPDevicesProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TUPnPDevices
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TUPnPDevicesProperties = class(TPersistent)
private
FServer: TUPnPDevices;
function GetDefaultInterface: IUPnPDevices;
constructor Create(AServer: TUPnPDevices);
protected
function Get_Count: Integer;
function Get_Item(const bstrUDN: WideString): IUPnPDevice;
public
property DefaultInterface: IUPnPDevices read GetDefaultInterface;
published
end;
{$ENDIF}
// *********************************************************************//
// The Class CoUPnPDevice provides a Create and CreateRemote method to
// create instances of the default interface IUPnPDevice exposed by
// the CoClass UPnPDevice. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoUPnPDevice = class
class function Create: IUPnPDevice;
class function CreateRemote(const MachineName: string): IUPnPDevice;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TUPnPDevice
// Help String : UPnPDevice Class
// Default Interface: IUPnPDevice
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TUPnPDeviceProperties= class;
{$ENDIF}
TUPnPDevice = class(TOleServer)
private
FIntf: IUPnPDevice;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TUPnPDeviceProperties;
function GetServerProperties: TUPnPDeviceProperties;
{$ENDIF}
function GetDefaultInterface: IUPnPDevice;
protected
procedure InitServerData; override;
function Get_IsRootDevice: WordBool;
function Get_RootDevice: IUPnPDevice;
function Get_ParentDevice: IUPnPDevice;
function Get_HasChildren: WordBool;
function Get_Children: IUPnPDevices;
function Get_UniqueDeviceName: WideString;
function Get_FriendlyName: WideString;
function Get_type_: WideString;
function Get_PresentationURL: WideString;
function Get_ManufacturerName: WideString;
function Get_ManufacturerURL: WideString;
function Get_ModelName: WideString;
function Get_ModelNumber: WideString;
function Get_Description: WideString;
function Get_ModelURL: WideString;
function Get_UPC: WideString;
function Get_SerialNumber: WideString;
function Get_Services: IUPnPServices;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IUPnPDevice);
procedure Disconnect; override;
function IconURL(const bstrEncodingFormat: WideString; lSizeX: Integer; lSizeY: Integer;
lBitDepth: Integer): WideString;
property DefaultInterface: IUPnPDevice read GetDefaultInterface;
property IsRootDevice: WordBool read Get_IsRootDevice;
property RootDevice: IUPnPDevice read Get_RootDevice;
property ParentDevice: IUPnPDevice read Get_ParentDevice;
property HasChildren: WordBool read Get_HasChildren;
property Children: IUPnPDevices read Get_Children;
property UniqueDeviceName: WideString read Get_UniqueDeviceName;
property FriendlyName: WideString read Get_FriendlyName;
property type_: WideString read Get_type_;
property PresentationURL: WideString read Get_PresentationURL;
property ManufacturerName: WideString read Get_ManufacturerName;
property ManufacturerURL: WideString read Get_ManufacturerURL;
property ModelName: WideString read Get_ModelName;
property ModelNumber: WideString read Get_ModelNumber;
property Description: WideString read Get_Description;
property ModelURL: WideString read Get_ModelURL;
property UPC: WideString read Get_UPC;
property SerialNumber: WideString read Get_SerialNumber;
property Services: IUPnPServices read Get_Services;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TUPnPDeviceProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TUPnPDevice
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TUPnPDeviceProperties = class(TPersistent)
private
FServer: TUPnPDevice;
function GetDefaultInterface: IUPnPDevice;
constructor Create(AServer: TUPnPDevice);
protected
function Get_IsRootDevice: WordBool;
function Get_RootDevice: IUPnPDevice;
function Get_ParentDevice: IUPnPDevice;
function Get_HasChildren: WordBool;
function Get_Children: IUPnPDevices;
function Get_UniqueDeviceName: WideString;
function Get_FriendlyName: WideString;
function Get_type_: WideString;
function Get_PresentationURL: WideString;
function Get_ManufacturerName: WideString;
function Get_ManufacturerURL: WideString;
function Get_ModelName: WideString;
function Get_ModelNumber: WideString;
function Get_Description: WideString;
function Get_ModelURL: WideString;
function Get_UPC: WideString;
function Get_SerialNumber: WideString;
function Get_Services: IUPnPServices;
public
property DefaultInterface: IUPnPDevice read GetDefaultInterface;
published
end;
{$ENDIF}
// *********************************************************************//
// The Class CoUPnPServices provides a Create and CreateRemote method to
// create instances of the default interface IUPnPServices exposed by
// the CoClass UPnPServices. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoUPnPServices = class
class function Create: IUPnPServices;
class function CreateRemote(const MachineName: string): IUPnPServices;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TUPnPServices
// Help String : UPnPServices Class
// Default Interface: IUPnPServices
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TUPnPServicesProperties= class;
{$ENDIF}
TUPnPServices = class(TOleServer)
private
FIntf: IUPnPServices;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TUPnPServicesProperties;
function GetServerProperties: TUPnPServicesProperties;
{$ENDIF}
function GetDefaultInterface: IUPnPServices;
protected
procedure InitServerData; override;
function Get_Count: Integer;
function Get_Item(const bstrServiceId: WideString): IUPnPService;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IUPnPServices);
procedure Disconnect; override;
property DefaultInterface: IUPnPServices read GetDefaultInterface;
property Count: Integer read Get_Count;
property Item[const bstrServiceId: WideString]: IUPnPService read Get_Item; default;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TUPnPServicesProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TUPnPServices
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TUPnPServicesProperties = class(TPersistent)
private
FServer: TUPnPServices;
function GetDefaultInterface: IUPnPServices;
constructor Create(AServer: TUPnPServices);
protected
function Get_Count: Integer;
function Get_Item(const bstrServiceId: WideString): IUPnPService;
public
property DefaultInterface: IUPnPServices read GetDefaultInterface;
published
end;
{$ENDIF}
// *********************************************************************//
// The Class CoUPnPService provides a Create and CreateRemote method to
// create instances of the default interface IUPnPService exposed by
// the CoClass UPnPService. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoUPnPService = class
class function Create: IUPnPService;
class function CreateRemote(const MachineName: string): IUPnPService;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TUPnPService
// Help String : UPnPService Class
// Default Interface: IUPnPService
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TUPnPServiceProperties= class;
{$ENDIF}
TUPnPService = class(TOleServer)
private
FIntf: IUPnPService;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TUPnPServiceProperties;
function GetServerProperties: TUPnPServiceProperties;
{$ENDIF}
function GetDefaultInterface: IUPnPService;
protected
procedure InitServerData; override;
function Get_ServiceTypeIdentifier: WideString;
function Get_Id: WideString;
function Get_LastTransportStatus: Integer;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IUPnPService);
procedure Disconnect; override;
function QueryStateVariable(const bstrVariableName: WideString): OleVariant;
function InvokeAction(const bstrActionName: WideString; vInActionArgs: OleVariant;
var pvOutActionArgs: OleVariant): OleVariant;
procedure AddCallback(const pUnkCallback: IUnknown);
property DefaultInterface: IUPnPService read GetDefaultInterface;
property ServiceTypeIdentifier: WideString read Get_ServiceTypeIdentifier;
property Id: WideString read Get_Id;
property LastTransportStatus: Integer read Get_LastTransportStatus;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TUPnPServiceProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TUPnPService
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TUPnPServiceProperties = class(TPersistent)
private
FServer: TUPnPService;
function GetDefaultInterface: IUPnPService;
constructor Create(AServer: TUPnPService);
protected
function Get_ServiceTypeIdentifier: WideString;
function Get_Id: WideString;
function Get_LastTransportStatus: Integer;
public
property DefaultInterface: IUPnPService read GetDefaultInterface;
published
end;
{$ENDIF}
// *********************************************************************//
// The Class CoUPnPDescriptionDocument provides a Create and CreateRemote method to
// create instances of the default interface IUPnPDescriptionDocument exposed by
// the CoClass UPnPDescriptionDocument. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoUPnPDescriptionDocument = class
class function Create: IUPnPDescriptionDocument;
class function CreateRemote(const MachineName: string): IUPnPDescriptionDocument;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TUPnPDescriptionDocument
// Help String : UPnPDescriptionDocument Class
// Default Interface: IUPnPDescriptionDocument
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TUPnPDescriptionDocumentProperties= class;
{$ENDIF}
TUPnPDescriptionDocument = class(TOleServer)
private
FIntf: IUPnPDescriptionDocument;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TUPnPDescriptionDocumentProperties;
function GetServerProperties: TUPnPDescriptionDocumentProperties;
{$ENDIF}
function GetDefaultInterface: IUPnPDescriptionDocument;
protected
procedure InitServerData; override;
function Get_ReadyState: Integer;
function Get_LoadResult: Integer;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IUPnPDescriptionDocument);
procedure Disconnect; override;
procedure Load(const bstrUrl: WideString);
procedure LoadAsync(const bstrUrl: WideString; const pUnkCallback: IUnknown);
procedure Abort;
function RootDevice: IUPnPDevice;
function DeviceByUDN(const bstrUDN: WideString): IUPnPDevice;
property DefaultInterface: IUPnPDescriptionDocument read GetDefaultInterface;
property ReadyState: Integer read Get_ReadyState;
property LoadResult: Integer read Get_LoadResult;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TUPnPDescriptionDocumentProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TUPnPDescriptionDocument
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TUPnPDescriptionDocumentProperties = class(TPersistent)
private
FServer: TUPnPDescriptionDocument;
function GetDefaultInterface: IUPnPDescriptionDocument;
constructor Create(AServer: TUPnPDescriptionDocument);
protected
function Get_ReadyState: Integer;
function Get_LoadResult: Integer;
public
property DefaultInterface: IUPnPDescriptionDocument read GetDefaultInterface;
published
end;
{$ENDIF}
procedure Register;
resourcestring
dtlServerPage = 'MS Upnp';
dtlOcxPage = 'MS Upnp';
implementation
uses ComObj;
class function CoUPnPDeviceFinder.Create: IUPnPDeviceFinder;
begin
Result := CreateComObject(CLASS_UPnPDeviceFinder) as IUPnPDeviceFinder;
end;
class function CoUPnPDeviceFinder.CreateRemote(const MachineName: string): IUPnPDeviceFinder;
begin
Result := CreateRemoteComObject(MachineName, CLASS_UPnPDeviceFinder) as IUPnPDeviceFinder;
end;
procedure TUPnPDeviceFinder.InitServerData;
const
CServerData: TServerData = (
ClassID: '{E2085F28-FEB7-404A-B8E7-E659BDEAAA02}';
IntfIID: '{ADDA3D55-6F72-4319-BFF9-18600A539B10}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;
procedure TUPnPDeviceFinder.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as IUPnPDeviceFinder;
end;
end;
procedure TUPnPDeviceFinder.ConnectTo(svrIntf: IUPnPDeviceFinder);
begin
Disconnect;
FIntf := svrIntf;
end;
procedure TUPnPDeviceFinder.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;
function TUPnPDeviceFinder.GetDefaultInterface: IUPnPDeviceFinder;
begin