home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / lora299s.zip / PASSTHR.CPP < prev    next >
C/C++ Source or Header  |  1998-05-12  |  4KB  |  205 lines

  1.  
  2. // LoraBBS Version 2.99 Free Edition
  3. // Copyright (C) 1987-98 Marco Maccaferri
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation; either version 2 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #include "_ldefs.h"
  20. #include "msgbase.h"
  21.  
  22. PASSTHR::PASSTHR (void)
  23. {
  24.    Id = 0L;
  25. }
  26.  
  27. PASSTHR::~PASSTHR (void)
  28. {
  29. }
  30.  
  31. USHORT PASSTHR::Add (VOID)
  32. {
  33.    return (Add (Text));
  34. }
  35.  
  36. USHORT PASSTHR::Add (class TMsgBase *MsgBase)
  37. {
  38.    New ();
  39.  
  40.    strcpy (From, MsgBase->From);
  41.    strcpy (To, MsgBase->To);
  42.    strcpy (Subject, MsgBase->Subject);
  43.  
  44.    if (MsgBase->FromAddress[0] != '\0')
  45.       strcpy (FromAddress, MsgBase->FromAddress);
  46.    if (MsgBase->ToAddress[0] != '\0')
  47.       strcpy (ToAddress, MsgBase->ToAddress);
  48.  
  49.    Written.Day = MsgBase->Written.Day;
  50.    Written.Month = MsgBase->Written.Month;
  51.    Written.Year = MsgBase->Written.Year;
  52.    Written.Hour = MsgBase->Written.Hour;
  53.    Written.Minute = MsgBase->Written.Minute;
  54.    Written.Second = MsgBase->Written.Second;
  55.  
  56.    Arrived.Day = MsgBase->Arrived.Day;
  57.    Arrived.Month = MsgBase->Arrived.Month;
  58.    Arrived.Year = MsgBase->Arrived.Year;
  59.    Arrived.Hour = MsgBase->Arrived.Hour;
  60.    Arrived.Minute = MsgBase->Arrived.Minute;
  61.    Arrived.Second = MsgBase->Arrived.Second;
  62.  
  63.    Crash = MsgBase->Crash;
  64.    Direct = MsgBase->Direct;
  65.    FileAttach = MsgBase->FileAttach;
  66.    FileRequest = MsgBase->FileRequest;
  67.    Hold = MsgBase->Hold;
  68.    Immediate = MsgBase->Immediate;
  69.    Intransit = MsgBase->Intransit;
  70.    KillSent = MsgBase->KillSent;
  71.    Local = MsgBase->Local;
  72.    Private = MsgBase->Private;
  73.    ReceiptRequest = MsgBase->ReceiptRequest;
  74.    Received = MsgBase->Received;
  75.    Sent = MsgBase->Sent;
  76.  
  77.    return (Add (MsgBase->Text));
  78. }
  79.  
  80. USHORT PASSTHR::Add (class TCollection &MsgText)
  81. {
  82.    PSZ p;
  83.  
  84.    Text.Clear ();
  85.    if ((p = (PSZ)MsgText.First ()) != NULL)
  86.       do {
  87.          Text.Add (p);
  88.       } while ((p = (PSZ)MsgText.Next ()) != NULL);
  89.  
  90.    return (TRUE);
  91. }
  92.  
  93. VOID PASSTHR::Close (VOID)
  94. {
  95. }
  96.  
  97. USHORT PASSTHR::Delete (ULONG ulMsg)
  98. {
  99.    ulMsg = ulMsg;
  100.    return (FALSE);
  101. }
  102.  
  103. USHORT PASSTHR::GetHWM (ULONG &ulMsg)
  104. {
  105.    ulMsg = 0L;
  106.    return (TRUE);
  107. }
  108.  
  109. ULONG PASSTHR::Highest (VOID)
  110. {
  111.    return (0L);
  112. }
  113.  
  114. USHORT PASSTHR::Lock (ULONG ulTimeout)
  115. {
  116.    ulTimeout = ulTimeout;
  117.    return (TRUE);
  118. }
  119.  
  120. ULONG PASSTHR::Lowest (VOID)
  121. {
  122.    return (0L);
  123. }
  124.  
  125. ULONG PASSTHR::MsgnToUid (ULONG ulMsg)
  126. {
  127.    return (ulMsg);
  128. }
  129.  
  130. VOID PASSTHR::New (VOID)
  131. {
  132.    From[0] = To[0] = Subject[0] = '\0';
  133.    Crash = Direct = FileAttach = FileRequest = Hold = Immediate = FALSE;
  134.    Intransit = KillSent = Local = Private = ReceiptRequest = Received = FALSE;
  135.    Sent = 0;
  136.    memset (&Written, 0, sizeof (Written));
  137.    Written.Month = 1;
  138.    memset (&Arrived, 0, sizeof (Arrived));
  139.    Arrived.Month = 1;
  140.    Original = Reply = 0L;
  141.    Text.Clear ();
  142. }
  143.  
  144. USHORT PASSTHR::Next (ULONG &ulMsg)
  145. {
  146.    ulMsg = ulMsg;
  147.    return (FALSE);
  148. }
  149.  
  150. ULONG PASSTHR::Number (VOID)
  151. {
  152.    return (0L);
  153. }
  154.  
  155. VOID PASSTHR::Pack (VOID)
  156. {
  157. }
  158.  
  159. USHORT PASSTHR::Previous (ULONG &ulMsg)
  160. {
  161.    ulMsg = ulMsg;
  162.    return (FALSE);
  163. }
  164.  
  165. USHORT PASSTHR::ReadHeader (ULONG ulMsg)
  166. {
  167.    ulMsg = ulMsg;
  168.    return (TRUE);
  169. }
  170.  
  171. USHORT PASSTHR::Read (ULONG ulMsg, SHORT nWidth)
  172. {
  173.    return (Read (ulMsg, Text, nWidth));
  174. }
  175.  
  176. USHORT PASSTHR::Read (ULONG ulMsg, class TCollection &MsgText, SHORT nWidth)
  177. {
  178.    ulMsg = ulMsg;
  179.    MsgText.First ();
  180.    nWidth = nWidth;
  181.  
  182.    return (TRUE);
  183. }
  184.  
  185. VOID PASSTHR::SetHWM (ULONG ulMsg)
  186. {
  187.    ulMsg = ulMsg;
  188. }
  189.  
  190. ULONG PASSTHR::UidToMsgn (ULONG ulMsg)
  191. {
  192.    return (ulMsg);
  193. }
  194.  
  195. VOID PASSTHR::UnLock (VOID)
  196. {
  197. }
  198.  
  199. USHORT PASSTHR::WriteHeader (ULONG ulMsg)
  200. {
  201.    ulMsg = ulMsg;
  202.    return (FALSE);
  203. }
  204.  
  205.