blob: 4cfe4ae2cbc130c1a561d7de17f203ca42dbbcfb (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
//
// C++ Interface: %{MODULE}
//
// Description:
//
//
// Author: Roie Kerstein <[email protected]>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef ADDBOOKMARKSPLUGIN_H
#define ADDBOOKMARKSPLUGIN_H
#include "addbookmarksprefssettings.h"
#include <kgenericfactory.h>
#include <kopeteplugin.h>
#include <kbookmarkmanager.h>
#include <tdeio/job.h>
#include <tqcstring.h>
#include <tqmap.h>
/**
@author Roie Kerstein <[email protected]>
*/
class BookmarksPlugin : public Kopete::Plugin
{
TQ_OBJECT
public:
BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &args);
private:
typedef struct S_URLANDNAME{
KURL url;
TQString sender;
} URLandName;
typedef TQMap<TDEIO::TransferJob*,URLandName> JobsToURLsMap;
JobsToURLsMap m_map;
BookmarksPrefsSettings m_settings;
void addKopeteBookmark( const KURL& url, const TQString& sender );
KURL::List* extractURLsFromString( const TQString& text );
KBookmarkGroup getKopeteFolder();
KBookmarkGroup getFolder( KBookmarkGroup group, const TQString& folder );
TQTextCodec* getPageEncoding( const TQByteArray& data );
public slots:
void slotBookmarkURLsInMessage(Kopete::Message & msg);
void slotReloadSettings();
private slots:
void slotAddKopeteBookmark( TDEIO::Job *transfer, const TQByteArray &data );
};
typedef KGenericFactory<BookmarksPlugin> BookmarksPluginFactory;
#endif
|