summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopeteblacklister.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 17:25:43 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 17:25:43 -0600
commit903aacf3fda692b6fa7e7934ea158653b99cc6a5 (patch)
tree37409851c95238b97d8a162ff501b8500ae1b216 /kopete/libkopete/kopeteblacklister.cpp
parent9c9412b30c54468adc9e506cc76c5d113fbf5056 (diff)
downloadtdenetwork-903aacf3fda692b6fa7e7934ea158653b99cc6a5.tar.gz
tdenetwork-903aacf3fda692b6fa7e7934ea158653b99cc6a5.zip
Fix FTBFS
Diffstat (limited to 'kopete/libkopete/kopeteblacklister.cpp')
-rw-r--r--kopete/libkopete/kopeteblacklister.cpp109
1 files changed, 0 insertions, 109 deletions
diff --git a/kopete/libkopete/kopeteblacklister.cpp b/kopete/libkopete/kopeteblacklister.cpp
deleted file mode 100644
index e249d736..00000000
--- a/kopete/libkopete/kopeteblacklister.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- kopeteblacklister.cpp - Kopete BlackLister
-
- Copyright (c) 2004 by Roie Kerstein <sf_kersteinroie@bezeqint.net>
-
- *************************************************************************
- * *
- * This library is free software; you can redistribute it and/or *
- * modify it under the terms of the GNU Lesser General Public *
- * License as published by the Free Software Foundation; either *
- * version 2 of the License, or (at your option) any later version. *
- * *
- *************************************************************************
-*/
-
-#include "kopeteblacklister.h"
-
-#include "kopetecontact.h"
-
-#include <tdeconfig.h>
-#include <kglobal.h>
-
-#include <tqstringlist.h>
-
-namespace Kopete
-{
-
-class BlackLister::Private
-{
-public:
- TQStringList blacklist;
- TQString owner;
- TQString protocol;
-};
-
-
-BlackLister::BlackLister(const TQString &protocolId, const TQString &accountId, TQObject *parent, const char *name)
- : TQObject(parent, name), d( new Private )
-{
- TDEConfig *config = TDEGlobal::config();
-
- d->owner = accountId;
- d->protocol = protocolId;
- config->setGroup("BlackLister");
- d->blacklist = config->readListEntry( d->protocol + TQString::fromLatin1("_") + d->owner );
-}
-
-BlackLister::~BlackLister()
-{
- delete d;
-}
-
-
-bool BlackLister::isBlocked(const TQString &contactId)
-{
- return (d->blacklist.find( contactId ) != d->blacklist.end() );
-}
-
-bool BlackLister::isBlocked(Contact *contact)
-{
- return isBlocked(contact->contactId());
-}
-
-void BlackLister::addContact(const TQString &contactId)
-{
- if( !isBlocked(contactId) )
- {
- d->blacklist += contactId;
- saveToDisk();
- emit contactAdded( contactId );
- }
-}
-
-void BlackLister::addContact(Contact *contact)
-{
- TQString temp = contact->contactId();
-
- addContact( temp );
-}
-
-void BlackLister::removeContact(Contact *contact)
-{
- TQString temp = contact->contactId();
-
- removeContact( temp );
-}
-
-void BlackLister::saveToDisk()
-{
- TDEConfig *config = TDEGlobal::config();
-
- config->setGroup("BlackLister");
- config->writeEntry( d->protocol + TQString::fromLatin1("_") + d->owner, d->blacklist );
- config->sync();
-}
-
-void BlackLister::removeContact(const TQString &contactId)
-{
- if( isBlocked(contactId) )
- {
- d->blacklist.remove( contactId );
- saveToDisk();
- emit contactRemoved( contactId );
- }
-}
-
-}
-
-#include "kopeteblacklister.moc"