home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / IDDECSET.HPP < prev    next >
C/C++ Source or Header  |  1993-10-22  |  9KB  |  176 lines

  1. #ifndef _IDDECSET_
  2. #define _IDDECSET_
  3. /*******************************************************************************
  4. * FILE NAME: iddecset.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the declaration(s) of the class(es):                    *
  8. *     IDDEActiveServer       - Represents a DDE server supporting a            *
  9. *                              particular topic.                               *
  10. *     IDDEActiveServerSet    - Set of active DDE servers.                      *
  11. *     IDDEClientHotLinkSet   - Set of active hot links.                        *
  12. *                                                                              *
  13. * COPYRIGHT:                                                                   *
  14. *   Licensed Materials - Property of IBM                                       *
  15. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  16. *   All Rights Reserved                                                        *
  17. *   US Government Users Restricted Rights - Use, duplication, or               *
  18. *   disclosure                                                                 *
  19. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  20. *                                                                              *
  21. *******************************************************************************/
  22. #ifndef _IBASE_
  23.   #include <ibase.hpp>
  24. #endif
  25. #ifndef _ISTRING_
  26.   #include <istring.hpp>
  27. #endif
  28. #ifndef _IDDEEVT_
  29.   #include <iddeevt.hpp>
  30. #endif
  31. #ifndef _IRESLOCK_
  32.   #include <ireslock.hpp>
  33. #endif
  34. #ifndef _ISET_H
  35.   #include <iset.h>
  36. #endif
  37.  
  38. /*----------------------------------------------------------------------------*/
  39. /* Align classes on four byte boundary.                                       */
  40. /*----------------------------------------------------------------------------*/
  41. #pragma pack(4)
  42.  
  43. class IDDEActiveServer : public IBase {
  44. typedef IBase
  45.   Inherited;
  46. /*******************************************************************************
  47. * The IDDEActiveServer class holds information about a dynamic data exchange   *
  48. * (DDE) server application and a particular topic the server application       *
  49. * supports.                                                                    *
  50. *                                                                              *
  51. * Instances of this class are created to provide information about possible    *
  52. * conversations when one of the two broadcast functions, supportedTopics or    *
  53. * supportingApplications, is invoked.  IDDEClientConversation instances        *
  54. * create instances of this class, which are not intended to be created by      *
  55. * application programmers.                                                     *
  56. *******************************************************************************/
  57. public:
  58. /*------------------------ Constructor -----------------------------------------
  59. | The only way to construct instances of this class is with the following      |
  60. | arguments:                                                                   |
  61. |                                                                              |
  62. |    - The name of the server application                                      |
  63. |    - The name of the topic supported by the server                           |
  64. |    - A Boolean, which is set to true if the server enforces case             |
  65. |      sensitivity.                                                            |
  66. ------------------------------------------------------------------------------*/
  67.   IDDEActiveServer  ( const char* applicationName,
  68.                       const char* topicName,
  69.                       Boolean     caseSensitive );
  70.  
  71.   ~IDDEActiveServer ( );
  72.  
  73. /*------------------------------- Accessors ------------------------------------
  74. | Use the following functions to get the accessible attributes                 |
  75. | of instances of this class:                                                  |
  76. |   application     - Returns the name of the server application.              |
  77. |   topic           - Returns the name of the topic supported by the server.   |
  78. |   isCaseSensitive - Returns true if the server enforces case sensitivity;    |
  79. |                     otherwise, it returns false.                             |
  80. ------------------------------------------------------------------------------*/
  81. IString
  82.   application ( ) const,
  83.   topic       ( ) const;
  84.  
  85. Boolean
  86.   isCaseSensitive ( ) const;
  87.  
  88. private:
  89. /*--------------------------------- PRIVATE ----------------------------------*/
  90. IString
  91.   strClApplication,
  92.   strClTopic;
  93. Boolean
  94.   fClCaseSensitive;
  95.  
  96. }; // IDDEActiveServer
  97.  
  98. class IDDEActiveServerSet : public ISet<IDDEActiveServer*> {
  99. /*******************************************************************************
  100. * The IDDEActiveServerSet class is a set that was created using the IBM        *
  101. * Collection Class Library.  The set contains pointers to IDDEActiveServer     *
  102. * instances.                                                                   *
  103. *                                                                              *
  104. * An application creates an instance of this class to use with the             *
  105. * supportingApplications or supportedTopics functions to hold the current      *
  106. * set of active servers.  If you remove individual elements of this set,       *
  107. * delete the IDDEActiveServer instance that the element points to or the       *
  108. * memory will not be recovered.                                                *
  109. *******************************************************************************/
  110. public:
  111. /*-------------------------- Constructor and Destructor -----------------------
  112. | The only way to construct instances of this class is by using the default    |
  113. | constructor.  The destructor for this class removes all elements from the    |
  114. | set and deletes them.                                                        |
  115. ------------------------------------------------------------------------------*/
  116.   IDDEActiveServerSet  ( );
  117.  
  118.   ~IDDEActiveServerSet ( );
  119.  
  120. private:
  121. /*--------------------------------- PRIVATE ----------------------------------*/
  122.   IDDEActiveServerSet ( const IDDEActiveServerSet& aActiveSet );
  123. IDDEActiveServerSet&
  124.   operator=( const IDDEActiveServerSet& aActiveSet );
  125.  
  126. }; // IDDEActiveServerSet
  127.  
  128. class IDDEClientHotLinkSet : public ISet<IDDEClientHotLinkEvent*> {
  129. /*******************************************************************************
  130. * The IDDEClientHotLinkSet class is a set that was created using the IBM       *
  131. * Collection Class Library.  The set contains pointers to                      *
  132. * IDDEClientHotLinkEvent instances.                                            *
  133. *                                                                              *
  134. * An IDDEClientConversation instance creates instances of this class to keep   *
  135. * track of the active hot links for the conversation.  An application          *
  136. * creates an instance of this class to invoke the hotLInks function to get     *
  137. * the current set of active hot links.  If you remove individual elements of   *
  138. * the set, delete the IDDEClientHotLinkEvent each element points to or the     *
  139. * memory will not be recovered.                                                *
  140. *                                                                              *
  141. * The destructor for this class removes all elements from the set and          *
  142. * deletes them.                                                                *
  143. *******************************************************************************/
  144. public:
  145. /*-------------------------- Constructor and Destructor ------------------------
  146. | The only way to construct instances of this class is by using the default    |
  147. | constructor.                                                                 |
  148. ------------------------------------------------------------------------------*/
  149.   IDDEClientHotLinkSet  ( );
  150.   ~IDDEClientHotLinkSet ( );
  151.  
  152. private:
  153. /*--------------------------------- PRIVATE ----------------------------------*/
  154. friend class IDDEClientConversation;
  155.   IDDEClientHotLinkSet ( const IDDEClientHotLinkSet& aHotLinkSet );
  156. IDDEClientHotLinkSet&
  157.   operator=( const IDDEClientHotLinkSet& aHotLinkSet );
  158. IPrivateResource
  159.  &semaphor ( );
  160. IPrivateResource
  161.   priResCl;
  162.  
  163. }; // IDDEClientHotLinkSet
  164.  
  165. /*----------------------------------------------------------------------------*/
  166. /* Resume compiler default packing.                                           */
  167. /*----------------------------------------------------------------------------*/
  168. #pragma pack()
  169.  
  170. /*--------------------------------- Inlines ----------------------------------*/
  171. #ifndef I_NO_INLINES
  172.   #include <iddecset.inl>
  173. #endif
  174.  
  175. #endif // _IDDECSET_
  176.