home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / xpcom / src / nsIConnectionPoint.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.7 KB  |  97 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /*
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef __nsIConnectionPoint_h
  20. #define __nsIConnectionPoint_h
  21.  
  22. typedef struct _nsConnection {
  23.   nsISupports *sink;
  24.   void *cookie;
  25. } nsConnection;
  26.  
  27. class nsIConnectionPoint;
  28. class nsIConnectionPointContainer;
  29. class nsIEnumConnections;
  30. class nsIEnumConnectionPoints;
  31.  
  32. /**
  33.  * nsIConnectionPoint
  34.  */
  35.  
  36. // {7BB53331-A405-11d1-A963-00805F8A7AC4}
  37. #define NS_ICONNECTION_POINT_IID \
  38. { 0x7bb53331, 0xa405, 0x11d1, \
  39.   { 0xa9, 0x63, 0x0, 0x80, 0x5f, 0x8a, 0x7a, 0xc4 } }
  40.  
  41. class nsIConnectionPoint: public nsISupports {
  42. public:
  43.   NS_IMETHOD GetConnectionInterface(nsIID *aIID) = 0;
  44.   NS_IMETHOD GetConnectionPointContainer(nsIConnectionPointContainer 
  45.                         **aContainer) = 0;
  46.   NS_IMETHOD Advise(nsISupports *aSink, void *aCookie) = 0;
  47.   NS_IMETHOD Unadvise(void *aCookie) = 0;
  48.   NS_IMETHOD EnumConnections(nsIEnumConnections **aEnum) = 0;
  49. };
  50.  
  51. /**
  52.  *  nsIConnectionPointContainer
  53.  */
  54.  
  55. // {7BB53332-A405-11d1-A963-00805F8A7AC4}
  56. #define NS_ICONNECTION_POINT_CONTAINER_IID \
  57. { 0x7bb53332, 0xa405, 0x11d1, \
  58.   { 0xa9, 0x63, 0x0, 0x80, 0x5f, 0x8a, 0x7a, 0xc4 } }
  59.  
  60. class nsIConnectionPointContainer: public nsISupports {
  61. public:
  62.   NS_IMETHOD EnumConnectionPoints(nsIEnumConnectionPoints **aEnum) = 0;
  63.   NS_IMETHOD FindConnectionPoint(nsIID *aIID,
  64.                  nsIConnectionPoint *aPoint) = 0;
  65. };
  66.  
  67. /**
  68.  * nsIEnumConnections
  69.  */
  70.  
  71. // {7BB53333-A405-11d1-A963-00805F8A7AC4}
  72. #define NS_IENUM_CONNECTIONS_IID \
  73. { 0x7bb53333, 0xa405, 0x11d1, \
  74.   { 0xa9, 0x63, 0x0, 0x80, 0x5f, 0x8a, 0x7a, 0xc4 } }
  75.  
  76. class nsIEnumConnections: public nsISupports {
  77.   NS_IMETHOD Next(nsConnection *aConnection) = 0;
  78.   NS_IMETHOD Reset() = 0;
  79. };
  80.  
  81. /**
  82.  * nsIEnumConnectionPoints
  83.  */
  84.  
  85. // {7BB53333-A405-11d1-A963-00805F8A7AC4}
  86. #define NS_IENUM_CONNECTION_POINTS_IID \
  87. { 0x7bb53333, 0xa405, 0x11d1, \
  88.   { 0xa9, 0x63, 0x0, 0x80, 0x5f, 0x8a, 0x7a, 0xc4 } }
  89.  
  90. class nsIEnumConnectionPoints: public nsISupports {
  91.   NS_IMETHOD Next(nsIConnectionPoint *aConnectionPoint) = 0;
  92.   NS_IMETHOD Reset() = 0;
  93. };
  94.  
  95. #endif
  96.  
  97.