42bddb770f
assoc.h Aggiunta macro di iterazione sugli elementi golem.h Aggiunta gestione della posta golem.cpp Suvvia c'e' la postaa, la posta eletrronicaaa mailbox.h Aggiunto vitrtual davanti al distruttore dei TMessage msksheet.h Aggiunte macro di iterazione sulle righe regexp.h Tolta #define di NULL strings.cpp Aggiunti metodi a TFilename: is_absolute_path, is_relative_path e make_absolute_path strings.h Tolta #include <regexp.h> (-1K nel file .mak) git-svn-id: svn://10.65.10.50/trunk@5626 c028cbd2-c16b-5b4b-a496-9718f37d4682
93 lines
3.0 KiB
C++
Executable File
93 lines
3.0 KiB
C++
Executable File
#ifndef __GOLEM_H
|
|
#define __GOLEM_H
|
|
|
|
#ifndef __STRINGS_H
|
|
#include <strings.h>
|
|
#endif
|
|
|
|
bool goto_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'<p app> per i <p topic> indicati
|
|
bool initiate(const char* app, const char* topic);
|
|
// @cmember Esegue il comando <p cmd>
|
|
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
|