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

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

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

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

    LICENSE:      Biblio-Tec license (BiblTec.txt)
*/
#include "alffdde.h"
//
// Server functions
//
class _TECLIBCLASS ALFFDdeServer: public ALFFDde
  {
    public:
      //
      // Constructor for a specific service and topic
      // Service is shared between instances
      //
      ALFFDdeServer(const char* service,const char * topic);
      ~ALFFDdeServer();
      virtual char far* GetClassName() {return "ALFFDdeServer";}

      //
      // Servers can pass data between several clients and save
      // remaking data each time
      //
      HDDEDATA MakePermanentData(LPBYTE source,DWORD length,HSZ item);

//    protected:

      // Set service name (static)
      void DefineService(const char* service);

      //
      // One of several server functions which are virtual
      // due to static call back the others are in the base DDE class
      //
      virtual bool ProvidesItem(HSZ queryItem);

      //
      // Tell DDEML to tell us to post the changes to clients
      //
      void PostAdvise(HSZ ddeItem);

      HSZ ddeTopic; // topic for this instance on server
  };
#endif