konq_historycomm.h
00001 /* This file is part of the KDE project 00002 Copyright (C) 2000 Carsten Pfeiffer <pfeiffer@kde.org> 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; see the file COPYING. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef KONQ_HISTORYCOMM_H 00021 #define KONQ_HISTORYCOMM_H 00022 00023 #include <tqdatetime.h> 00024 #include <tqstringlist.h> 00025 00026 #include <dcopobject.h> 00027 #include <kurl.h> 00028 00029 class KonqHistoryEntry 00030 { 00031 public: 00032 //Should URLs be marshaled as strings (for DCOP, V2 history format)? 00033 static bool marshalURLAsStrings; 00034 KonqHistoryEntry() 00035 : numberOfTimesVisited(1) {} 00036 00037 KURL url; 00038 TQString typedURL; 00039 TQString title; 00040 TQ_UINT32 numberOfTimesVisited; 00041 TQDateTime firstVisited; 00042 TQDateTime lastVisited; 00043 }; 00044 00045 00046 // TQDataStream operators (read and write a KonqHistoryEntry 00047 // from/into a QDataStream 00048 TQDataStream& operator<< (TQDataStream& s, const KonqHistoryEntry& e); 00049 TQDataStream& operator>> (TQDataStream& s, KonqHistoryEntry& e); 00050 00052 00053 00059 class KonqHistoryComm : public DCOPObject 00060 { 00061 K_DCOP 00062 00063 protected: 00064 KonqHistoryComm( TQCString objId ) : DCOPObject( objId ) {} 00065 00066 k_dcop: 00067 virtual ASYNC notifyHistoryEntry( KonqHistoryEntry e, TQCString saveId) = 0; 00068 virtual ASYNC notifyMaxCount( TQ_UINT32 count, TQCString saveId ) = 0; 00069 virtual ASYNC notifyMaxAge( TQ_UINT32 days, TQCString saveId ) = 0; 00070 virtual ASYNC notifyClear( TQCString saveId ) = 0; 00071 virtual ASYNC notifyRemove( KURL url, TQCString saveId ) = 0; 00072 virtual ASYNC notifyRemove( KURL::List url, TQCString saveId ) = 0; 00073 virtual TQStringList allURLs() const = 0; 00074 00075 }; 00076 00077 #endif // KONQ_HISTORYCOMM_H