home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
IOC
/
DDE
/
ASERVER.HPP
< prev
next >
Wrap
Text File
|
1995-05-09
|
5KB
|
98 lines
#ifndef ASERVERWINDOW_HPP
#define ASERVERWINDOW_HPP
/******************************************************************************/
/* DDE SERVER SAMPLE PROGRAM: Class Header (ASERVER.HPP) */
/* */
/* COPYRIGHT: Copyright (C) International Business Machines Corp., 1992,1993. */
/* */
/* DISCLAIMER OF WARRANTIES: */
/* The following [enclosed] code is sample code created by IBM */
/* Corporation. This sample code is not part of any standard IBM product */
/* and is provided to you solely for the purpose of assisting you in the */
/* development of your applications. The code is provided "AS IS", */
/* without warranty of any kind. IBM shall not be liable for any damages */
/* arising out of your use of the sample code, even if they have been */
/* advised of the possibility of such damages. */
/******************************************************************************/
// NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE
#include <iframe.hpp> //IFrameWindow
#include <iddetsrv.hpp> //IDDEServer Classes
class ISplitCanvas;
class IStaticText;
class IListBox;
class IMultiLineEdit;
class IInfoArea;
class AServerWindow;
class ATopicServer : public IDDETopicServer {
public:
ATopicServer(const char* app, //ATopicServer Constructor
const char* topic,
AServerWindow* mainWin) ;
Boolean acceptConversation( //Start conversation
unsigned long conversationId,
IDDEBeginEvent& event);
Boolean beginHotLink(
unsigned long conversationId,
IDDEServerHotLinkEvent& event);
Boolean pokeData( //Poke Data
unsigned long conversationId,
IDDEPokeEvent& event);
Boolean requestData( //Client requesting data
unsigned long conversationId,
IDDERequestDataEvent& event);
void requestHotLinkData( //Client requesting hot link
IDDERequestDataEvent& event);
void hotLinkEnded(
unsigned long conversationId,
IDDEEvent& event);
void conversationEnded( //End conversation
unsigned long conversationId,
IDDEEndEvent& conv);
AServerWindow * mainWindow() const { return serverWindow;}
private:
AServerWindow * serverWindow;
}; /* End of ATopicServer */
/**********************************************************/
/* Define our DDE Server Active conversation Window */
/**********************************************************/
class AServerWindow : public IFrameWindow
{
public:
AServerWindow (unsigned long windowId); //Constructor
virtual Boolean log(char * message); //Log message to window
virtual Boolean addDone(char * newDone); //Add item to done list
virtual Boolean addTodo(char * newTodo); //Add item to todo list
virtual Boolean moreTodo(); //Add more to todo list
virtual Boolean addHot(); //Set hot link active flag
virtual Boolean removeHot(); //Set hot link active flag
virtual IString nextTodo(); //Get next todo
virtual IString todo(); //Get todo count
virtual IString work(); //Get work count
virtual IString done(); //Get done count
virtual Boolean updateStatus(); //Update status line
private:
ISplitCanvas statusLine; //Status line
IStaticText todoStatus; //Todo list status
IStaticText workStatus; //Work list status
IStaticText doneStatus; //Done list status
ISplitCanvas cArea; //Client area canvas
ISplitCanvas dArea; //Data area canvas
IListBox todoList; //Todo list
IListBox workList; //Work list
IListBox doneList; //Done list
IMultiLineEdit mle; //MLE to log status
IInfoArea infoArea; //Information Area
ATopicServer server; //DDE Topic Server
int hot; //true=hot link active
}; /* End of AServerWindow */
#endif