summaryrefslogtreecommitdiffstats
path: root/libkonq/konq_historycomm.cc
blob: 6cfd9b53f81b7c1f7d272ff82020d85ba3521646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "konq_historycomm.h"

bool KonqHistoryEntry::marshalURLAsStrings;

// TQDataStream operators (read and write a KonqHistoryEntry
// from/into a TQDataStream)
TQDataStream& operator<< (TQDataStream& s, const KonqHistoryEntry& e) {
    if (KonqHistoryEntry::marshalURLAsStrings)
	s << e.url.url();
    else
	s << e.url;

    s << e.typedURL;
    s << e.title;
    s << e.numberOfTimesVisited;
    s << e.firstVisited;
    s << e.lastVisited;

    return s;
}

TQDataStream& operator>> (TQDataStream& s, KonqHistoryEntry& e) {
    if (KonqHistoryEntry::marshalURLAsStrings)
    {
	TQString url;
	s >> url;
	e.url = url;
    }
    else
    {
	s>>e.url;
    }

    s >> e.typedURL;
    s >> e.title;
    s >> e.numberOfTimesVisited;
    s >> e.firstVisited;
    s >> e.lastVisited;

    return s;
}