#ifndef __GOLEM_H #define __GOLEM_H #ifndef __STRINGS_H #include #endif bool goto_url(const char* url); bool edit_url(const char* url); bool print_url(const char* url); class TMail_message : public TString { TString_array _recipients, _copy_recipients, _attachments; TString _subject; TString _sender; protected: bool load_mapi(); void unload_mapi(); bool add_recipient_ex(const char* recipient, int type); public: bool add_recipient(const char* address) { return add_recipient_ex(address, 0); } void set_subject(const char* subject) { _subject = subject; _subject.trim(); } bool add_copy_recipient(const char* address) { return add_recipient_ex(address, 1); } bool attach(const char* filename) { return add_recipient_ex(filename, 2); } void set_sender(const char* address) { _sender = address; _sender.trim(); } TString& operator = (const char* msg) { set(msg); return *this; } TString& operator = (const TString& msg) { set(msg); return *this; } bool send(); TMail_message(const char* recipient, const char* subject = NULL, const char* text = NULL, const char* sender = NULL); virtual ~TMail_message() { } }; // @doc EXTERNAL // @class TDDE | Classe per la gestione del DDE // // @base public | TObject class TDDE : public TObject // @comm Attualmente utilizzato all'avvio di PRASSI per comunicare al Program Manager il nome // dell'utente in modo da comunicarlo a tutti i programmi PRASSI avviati in seguito. // @author:(INTERNAL) Guido // @access:(INTERNAL) Private Member { // @cmember:(INTERNAL) Handle della finestra Windows word _hwnd; // @cmember:(INTERNAL) Handle della finestra del server DDE word _server; // @cmember:(INTERNAL) Puntatore alla funzione di gestione dei messaggi long _old_hook; // @access Public Member 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; } // @cmember Stabilisce il collegamento dell'

per i

indicati bool initiate(const char* app, const char* topic); // @cmember Esegue il comando

bool execute(const char* cmd) const; // @cmember Lancia il server ed esegue un comando bool execute(const char* app, const char* topic, const char* cmd, const char* filename = NULL); // @cmember Chiude la connessione void terminate(); // @cmember Inizia a fornire i servizi di DDE server bool start_server(); word hwnd() const { return _hwnd; } // @cmember Costruttore TDDE(); // @cmember Distruttore virtual ~TDDE(); }; #endif