home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IDDECSET.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
9KB
|
176 lines
#ifndef _IDDECSET_
#define _IDDECSET_
/*******************************************************************************
* FILE NAME: iddecset.hpp *
* *
* DESCRIPTION: *
* This file contains the declaration(s) of the class(es): *
* IDDEActiveServer - Represents a DDE server supporting a *
* particular topic. *
* IDDEActiveServerSet - Set of active DDE servers. *
* IDDEClientHotLinkSet - Set of active hot links. *
* *
* COPYRIGHT: *
* Licensed Materials - Property of IBM *
* (C) Copyright IBM Corporation 1992, 1993 *
* All Rights Reserved *
* US Government Users Restricted Rights - Use, duplication, or *
* disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
*******************************************************************************/
#ifndef _IBASE_
#include <ibase.hpp>
#endif
#ifndef _ISTRING_
#include <istring.hpp>
#endif
#ifndef _IDDEEVT_
#include <iddeevt.hpp>
#endif
#ifndef _IRESLOCK_
#include <ireslock.hpp>
#endif
#ifndef _ISET_H
#include <iset.h>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
class IDDEActiveServer : public IBase {
typedef IBase
Inherited;
/*******************************************************************************
* The IDDEActiveServer class holds information about a dynamic data exchange *
* (DDE) server application and a particular topic the server application *
* supports. *
* *
* Instances of this class are created to provide information about possible *
* conversations when one of the two broadcast functions, supportedTopics or *
* supportingApplications, is invoked. IDDEClientConversation instances *
* create instances of this class, which are not intended to be created by *
* application programmers. *
*******************************************************************************/
public:
/*------------------------ Constructor -----------------------------------------
| The only way to construct instances of this class is with the following |
| arguments: |
| |
| - The name of the server application |
| - The name of the topic supported by the server |
| - A Boolean, which is set to true if the server enforces case |
| sensitivity. |
------------------------------------------------------------------------------*/
IDDEActiveServer ( const char* applicationName,
const char* topicName,
Boolean caseSensitive );
~IDDEActiveServer ( );
/*------------------------------- Accessors ------------------------------------
| Use the following functions to get the accessible attributes |
| of instances of this class: |
| application - Returns the name of the server application. |
| topic - Returns the name of the topic supported by the server. |
| isCaseSensitive - Returns true if the server enforces case sensitivity; |
| otherwise, it returns false. |
------------------------------------------------------------------------------*/
IString
application ( ) const,
topic ( ) const;
Boolean
isCaseSensitive ( ) const;
private:
/*--------------------------------- PRIVATE ----------------------------------*/
IString
strClApplication,
strClTopic;
Boolean
fClCaseSensitive;
}; // IDDEActiveServer
class IDDEActiveServerSet : public ISet<IDDEActiveServer*> {
/*******************************************************************************
* The IDDEActiveServerSet class is a set that was created using the IBM *
* Collection Class Library. The set contains pointers to IDDEActiveServer *
* instances. *
* *
* An application creates an instance of this class to use with the *
* supportingApplications or supportedTopics functions to hold the current *
* set of active servers. If you remove individual elements of this set, *
* delete the IDDEActiveServer instance that the element points to or the *
* memory will not be recovered. *
*******************************************************************************/
public:
/*-------------------------- Constructor and Destructor -----------------------
| The only way to construct instances of this class is by using the default |
| constructor. The destructor for this class removes all elements from the |
| set and deletes them. |
------------------------------------------------------------------------------*/
IDDEActiveServerSet ( );
~IDDEActiveServerSet ( );
private:
/*--------------------------------- PRIVATE ----------------------------------*/
IDDEActiveServerSet ( const IDDEActiveServerSet& aActiveSet );
IDDEActiveServerSet&
operator=( const IDDEActiveServerSet& aActiveSet );
}; // IDDEActiveServerSet
class IDDEClientHotLinkSet : public ISet<IDDEClientHotLinkEvent*> {
/*******************************************************************************
* The IDDEClientHotLinkSet class is a set that was created using the IBM *
* Collection Class Library. The set contains pointers to *
* IDDEClientHotLinkEvent instances. *
* *
* An IDDEClientConversation instance creates instances of this class to keep *
* track of the active hot links for the conversation. An application *
* creates an instance of this class to invoke the hotLInks function to get *
* the current set of active hot links. If you remove individual elements of *
* the set, delete the IDDEClientHotLinkEvent each element points to or the *
* memory will not be recovered. *
* *
* The destructor for this class removes all elements from the set and *
* deletes them. *
*******************************************************************************/
public:
/*-------------------------- Constructor and Destructor ------------------------
| The only way to construct instances of this class is by using the default |
| constructor. |
------------------------------------------------------------------------------*/
IDDEClientHotLinkSet ( );
~IDDEClientHotLinkSet ( );
private:
/*--------------------------------- PRIVATE ----------------------------------*/
friend class IDDEClientConversation;
IDDEClientHotLinkSet ( const IDDEClientHotLinkSet& aHotLinkSet );
IDDEClientHotLinkSet&
operator=( const IDDEClientHotLinkSet& aHotLinkSet );
IPrivateResource
&semaphor ( );
IPrivateResource
priResCl;
}; // IDDEClientHotLinkSet
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
/*--------------------------------- Inlines ----------------------------------*/
#ifndef I_NO_INLINES
#include <iddecset.inl>
#endif
#endif // _IDDECSET_