1 /*****************************************************************************/ 2 /* */ 3 /* (C) Copyright 1991-1997 Alberto Pasquale */ 4 /* */ 5 /* A L L R I G H T S R E S E R V E D */ 6 /* */ 7 /*****************************************************************************/ 8 /* */ 9 /* This source code is NOT in the public domain and it CANNOT be used or */ 10 /* distributed without written permission from the author. */ 11 /* */ 12 /*****************************************************************************/ 13 /* */ 14 /* How to contact the author: Alberto Pasquale of 2:332/504@fidonet */ 15 /* Viale Verdi 106 */ 16 /* 41100 Modena */ 17 /* Italy */ 18 /* */ 19 /*****************************************************************************/ 20 21 /* RESPONSE.Hpp */ 22 23 #ifndef RESPONSE_HPP 24 #define RESPONSE_HPP 25 26 #include <time.h> 27 #include <stdarg.h> 28 #include "types.hpp" 29 extern "C" { 30 #include <smapi/msgapi.h> 31 }; 32 33 class _RSP { 34 public: 35 HAREA msg; /* Area handle */ 36 XMSG rsphd; /* MSG header for response */ 37 char *rsptxt; /* text (ASCIIZ); text + tear + Origin (MsgSize+160) */ 38 char *origin; // Origin 39 uint rsplen; /* Lenght of rsptxt */ 40 uint part; /* Part # of message response */ 41 uint partpos; /* "Part #" ofset in subject */ 42 long unix4ascii; // Unix time for ASCII field, to avoid false DUPES with Squish 43 _RSP (void); 44 ~_RSP (void); 45 }; 46 47 48 // if origin == NULL -> no origin 49 50 _RSP *writerspheader (HAREA msg, char *from, ADR *fmadr, char *to, ADR *toadr, 51 char *subject, word flags, char *origin); 52 53 void vwritersp (_RSP *rsp, char *strfmt, va_list args); 54 void writersp (_RSP *rsp, char *strfmt,...); 55 // if rsp == NULL, the function returns immediately, with no error 56 57 void closersp (_RSP *rsp, BOOL thrash = FALSE); 58 59 void getmsgdate(struct _stamp *date, time_t timer); 60 61 dword uid (void); 62 63 void SetOrigin (char *buffer, char *origin, ADR *adr); 64 65 66 #endif 67