#ifndef _ALFFDDECLIENT_H
#define _ALFFDDECLIENT_H
/*  Project Biblio-Tec

	 SUBSYSTEM:    TEC30r.dll Library (TecLib)
	 FILE:         alffddec.h
	 AUTHOR:       Alcindo Ferreira Filho

	 OVERVIEW:
	 Class definition of ALFFDdeClient the DDE Client to be used
    together DDE Server Class (ALFFDdeServer) for implementing
    DDE communications.

    COPYRIGHT:    © 2005
                  Alcindo Ferreira Filho
                  <alcindo@inttec.com.br>

    LICENSE:      Biblio-Tec license (BiblTec.txt)
*/
#include "alffdde.h"
// Wrap client functions...
class _TECLIBCLASS ALFFDdeClient: public ALFFDde
  {

    public:
      ALFFDdeClient(const char* service,const char * topic);
      ~ALFFDdeClient();
      virtual char far* GetClassName() {return "ALFFDdeClient";}
//
// Conversation
//
      virtual bool Connect();
      virtual void Disconnect();
      bool IsConnected() { return conversation != 0; }
//
// Start update when changed
//
      bool StartAdvise(HSZ item);
//
// End update when changed
//
      void StopAdvise(HSZ item);

//
// Send command to server
//
      bool SendCommand(unsigned char* inData, DWORD inDataLen);

//
// Send unsolicited data to server
//
      bool SendData(HSZ item, HDDEDATA data);

//
// Ask for specific data from server
//
      HDDEDATA RequestData(HSZ item);

    protected:
//
// Conversation is disconnecting - do you need to
// do anything?
//
      virtual void NotifyDisconnect(HCONV convId);
//
// Client conversation
//
    HCONV conversation;

//
// This client instance deals with this server and topic
//
    HSZ   clientService;
    HSZ   clientTopic;
  };
#endif