summaryrefslogtreecommitdiffstats
path: root/include/tools/inetmsg.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-02-11 15:14:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-02-11 17:09:08 +0100
commit3939b6d64df3b7ca495d0afb06876e5f5a492116 (patch)
treec8f0a6b113c7eb8893b8a31c1533767e2e93251f /include/tools/inetmsg.hxx
parentWe can put a few more lines inside the #ifndef IOS (diff)
downloadcore-3939b6d64df3b7ca495d0afb06876e5f5a492116.tar.gz
core-3939b6d64df3b7ca495d0afb06876e5f5a492116.zip
Fold INetMessage into INetRFC822Message
Change-Id: I89ba13c02954364044b215ba7df7c563720b92f9
Diffstat (limited to 'include/tools/inetmsg.hxx')
-rw-r--r--include/tools/inetmsg.hxx110
1 files changed, 38 insertions, 72 deletions
diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx
index 912595cab622..fb6370a4d107 100644
--- a/include/tools/inetmsg.hxx
+++ b/include/tools/inetmsg.hxx
@@ -81,7 +81,25 @@ public:
typedef ::std::vector< INetMessageHeader* > HeaderList_impl;
-class INetMessage
+#define INETMSG_RFC822_BCC 0
+#define INETMSG_RFC822_CC 1
+#define INETMSG_RFC822_COMMENTS 2
+#define INETMSG_RFC822_DATE 3
+#define INETMSG_RFC822_FROM 4
+#define INETMSG_RFC822_IN_REPLY_TO 5
+#define INETMSG_RFC822_KEYWORDS 6
+#define INETMSG_RFC822_MESSAGE_ID 7
+#define INETMSG_RFC822_REFERENCES 8
+#define INETMSG_RFC822_REPLY_TO 9
+#define INETMSG_RFC822_RETURN_PATH 10
+#define INETMSG_RFC822_SENDER 11
+#define INETMSG_RFC822_SUBJECT 12
+#define INETMSG_RFC822_TO 13
+#define INETMSG_RFC822_X_MAILER 14
+#define INETMSG_RFC822_RETURN_RECEIPT_TO 15
+#define INETMSG_RFC822_NUMHDR 16
+
+class TOOLS_DLLPUBLIC INetRFC822Message
{
HeaderList_impl m_aHeaderList;
@@ -90,7 +108,9 @@ class INetMessage
SvLockBytesRef m_xDocLB;
void ListCleanup_Impl();
- void ListCopy (const INetMessage& rMsg);
+ void ListCopy (const INetRFC822Message& rMsg);
+
+ sal_uIntPtr m_nIndex[INETMSG_RFC822_NUMHDR];
protected:
OUString GetHeaderName_Impl (
@@ -139,25 +159,11 @@ protected:
virtual SvStream& operator>> (SvStream& rStrm);
public:
- INetMessage() : m_nDocSize(0) {}
- virtual ~INetMessage();
-
- INetMessage (const INetMessage& rMsg)
- : m_nDocSize (rMsg.m_nDocSize),
- m_aDocName (rMsg.m_aDocName),
- m_xDocLB (rMsg.m_xDocLB)
- {
- ListCopy (rMsg);
- }
+ INetRFC822Message();
+ INetRFC822Message (const INetRFC822Message& rMsg);
+ virtual ~INetRFC822Message();
- INetMessage& operator= (const INetMessage& rMsg)
- {
- m_nDocSize = rMsg.m_nDocSize;
- m_aDocName = rMsg.m_aDocName;
- m_xDocLB = rMsg.m_xDocLB;
- ListCopy (rMsg);
- return *this;
- }
+ INetRFC822Message& operator= (const INetRFC822Message& rMsg);
sal_uIntPtr GetHeaderCount() const { return m_aHeaderList.size(); }
@@ -194,61 +200,9 @@ public:
SvLockBytes* GetDocumentLB() const { return m_xDocLB; }
void SetDocumentLB (SvLockBytes *pDocLB) { m_xDocLB = pDocLB; }
- friend SvStream& WriteINetMessage(
- SvStream& rStrm, const INetMessage& rMsg)
- {
- return rMsg.operator<< (rStrm);
- }
-
- friend SvStream& ReadINetMessage (
- SvStream& rStrm, INetMessage& rMsg)
- {
- return rMsg.operator>> (rStrm);
- }
-};
-
-#define INETMSG_RFC822_BCC 0
-#define INETMSG_RFC822_CC 1
-#define INETMSG_RFC822_COMMENTS 2
-#define INETMSG_RFC822_DATE 3
-#define INETMSG_RFC822_FROM 4
-#define INETMSG_RFC822_IN_REPLY_TO 5
-#define INETMSG_RFC822_KEYWORDS 6
-#define INETMSG_RFC822_MESSAGE_ID 7
-#define INETMSG_RFC822_REFERENCES 8
-#define INETMSG_RFC822_REPLY_TO 9
-#define INETMSG_RFC822_RETURN_PATH 10
-#define INETMSG_RFC822_SENDER 11
-#define INETMSG_RFC822_SUBJECT 12
-#define INETMSG_RFC822_TO 13
-#define INETMSG_RFC822_X_MAILER 14
-#define INETMSG_RFC822_RETURN_RECEIPT_TO 15
-#define INETMSG_RFC822_NUMHDR 16
-
-class TOOLS_DLLPUBLIC INetRFC822Message : public INetMessage
-{
- sal_uIntPtr m_nIndex[INETMSG_RFC822_NUMHDR];
-
-protected:
- virtual SvStream& operator<< (SvStream& rStrm) const SAL_OVERRIDE;
- virtual SvStream& operator>> (SvStream& rStrm) SAL_OVERRIDE;
-
-public:
- INetRFC822Message();
- INetRFC822Message (const INetRFC822Message& rMsg);
- virtual ~INetRFC822Message();
-
- INetRFC822Message& operator= (const INetRFC822Message& rMsg);
-
static bool ParseDateField (
const OUString& rDateField, DateTime& rDateTime);
- using INetMessage::SetHeaderField;
- virtual sal_uIntPtr SetHeaderField (
- const INetMessageHeader &rHeader,
- sal_uIntPtr nIndex = ((sal_uIntPtr)-1)
- ) SAL_OVERRIDE;
-
// Header fields.
OUString GetBCC() const
@@ -358,6 +312,18 @@ public:
// Stream operators.
+ friend SvStream& WriteINetMessage(
+ SvStream& rStrm, const INetRFC822Message& rMsg)
+ {
+ return rMsg.operator<< (rStrm);
+ }
+
+ friend SvStream& ReadINetMessage (
+ SvStream& rStrm, INetRFC822Message& rMsg)
+ {
+ return rMsg.operator>> (rStrm);
+ }
+
friend SvStream& operator<< (
SvStream& rStrm, const INetRFC822Message& rMsg)
{