1995-05-16 09:35:12 +00:00
|
|
|
#ifndef __GOLEM_H
|
|
|
|
#define __GOLEM_H
|
|
|
|
|
1996-06-27 07:15:21 +00:00
|
|
|
#ifndef __STRINGS_H
|
|
|
|
#include <strings.h>
|
|
|
|
#endif
|
|
|
|
|
1997-11-07 08:51:14 +00:00
|
|
|
bool goto_url(const char* url);
|
|
|
|
bool print_url(const char* url);
|
|
|
|
|
1996-02-05 19:00:53 +00:00
|
|
|
// @doc EXTERNAL
|
1995-06-19 08:13:19 +00:00
|
|
|
|
1996-02-05 19:00:53 +00:00
|
|
|
// @class TDDE | Classe per la gestione del DDE
|
|
|
|
//
|
1996-06-07 15:59:22 +00:00
|
|
|
// @base public | TObject
|
|
|
|
class TDDE : public TObject
|
1996-02-05 19:00:53 +00:00
|
|
|
|
|
|
|
// @comm Attualmente utilizzato all'avvio di PRASSI per comunicare al Program Manager il nome
|
1996-06-07 15:59:22 +00:00
|
|
|
// dell'utente in modo da comunicarlo a tutti i programmi PRASSI avviati in seguito.
|
1996-02-05 19:00:53 +00:00
|
|
|
|
|
|
|
// @author:(INTERNAL) Guido
|
|
|
|
|
|
|
|
// @access:(INTERNAL) Private Member
|
1995-06-19 08:13:19 +00:00
|
|
|
{
|
1996-02-05 19:00:53 +00:00
|
|
|
// @cmember:(INTERNAL) Handle della finestra Windows
|
1995-06-19 08:13:19 +00:00
|
|
|
word _hwnd;
|
1996-02-05 19:00:53 +00:00
|
|
|
// @cmember:(INTERNAL) Handle della finestra del server DDE
|
1995-06-19 08:13:19 +00:00
|
|
|
word _server;
|
1996-02-05 19:00:53 +00:00
|
|
|
// @cmember:(INTERNAL) Puntatore alla funzione di gestione dei messaggi
|
1995-06-19 08:13:19 +00:00
|
|
|
long _old_hook;
|
1996-06-07 15:59:22 +00:00
|
|
|
|
1996-02-05 19:00:53 +00:00
|
|
|
// @access Public Member
|
1996-06-07 15:59:22 +00:00
|
|
|
public:
|
|
|
|
virtual bool do_initiate(word id, const TString& topic) { return FALSE; }
|
|
|
|
virtual bool do_execute(word id, const TString& cmd) { return FALSE; }
|
|
|
|
virtual bool do_ack(word id) { _server = id; return TRUE; }
|
|
|
|
virtual bool do_terminate(word id) { return FALSE; }
|
|
|
|
virtual bool do_custom_message(word msg, word wparam, long lparam) { return FALSE; }
|
|
|
|
virtual const char* get_app_name() const { return NULL; }
|
|
|
|
virtual const char* get_topics() const { return NULL; }
|
|
|
|
|
1996-02-05 19:00:53 +00:00
|
|
|
// @cmember Stabilisce il collegamento dell'<p app> per i <p topic> indicati
|
1995-06-19 08:13:19 +00:00
|
|
|
bool initiate(const char* app, const char* topic);
|
1996-02-05 19:00:53 +00:00
|
|
|
// @cmember Esegue il comando <p cmd>
|
1995-06-19 08:13:19 +00:00
|
|
|
bool execute(const char* cmd) const;
|
1996-06-27 07:15:21 +00:00
|
|
|
// @cmember Lancia il server ed esegue un comando
|
|
|
|
bool execute(const char* app, const char* topic, const char* cmd, const char* filename = NULL);
|
1996-02-05 19:00:53 +00:00
|
|
|
// @cmember Chiude la connessione
|
1995-06-19 08:13:19 +00:00
|
|
|
void terminate();
|
1996-06-07 15:59:22 +00:00
|
|
|
|
1996-06-27 07:15:21 +00:00
|
|
|
|
1996-06-10 15:41:53 +00:00
|
|
|
// @cmember Inizia a fornire i servizi di DDE server
|
|
|
|
bool start_server();
|
|
|
|
|
1996-06-07 15:59:22 +00:00
|
|
|
word hwnd() const { return _hwnd; }
|
1995-06-19 08:13:19 +00:00
|
|
|
|
1996-02-05 19:00:53 +00:00
|
|
|
// @cmember Costruttore
|
1995-06-19 08:13:19 +00:00
|
|
|
TDDE();
|
1996-02-05 19:00:53 +00:00
|
|
|
// @cmember Distruttore
|
1995-06-19 08:13:19 +00:00
|
|
|
virtual ~TDDE();
|
|
|
|
};
|
|
|
|
|
1995-05-16 09:35:12 +00:00
|
|
|
#endif
|