summaryrefslogtreecommitdiffstats
path: root/tderesources/kolab/tdeabc/resourcekolab.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-20 16:27:27 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-20 16:27:27 -0600
commit94273bcb909fac42ef9427e3d8a614cab8c29c66 (patch)
tree91b99186971ecb475db3ca41b1b12df24029e389 /tderesources/kolab/tdeabc/resourcekolab.cpp
parent41b65d69967ad0d35f8b4dd37ac63aad1cebdae9 (diff)
downloadtdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.tar.gz
tdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.zip
Rename KABC namespace
Diffstat (limited to 'tderesources/kolab/tdeabc/resourcekolab.cpp')
-rw-r--r--tderesources/kolab/tdeabc/resourcekolab.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/tderesources/kolab/tdeabc/resourcekolab.cpp b/tderesources/kolab/tdeabc/resourcekolab.cpp
index 226d7da89..f4391f76d 100644
--- a/tderesources/kolab/tdeabc/resourcekolab.cpp
+++ b/tderesources/kolab/tdeabc/resourcekolab.cpp
@@ -60,7 +60,7 @@ class KolabFactory : public KRES::PluginFactoryBase
public:
KRES::Resource *resource( const TDEConfig *config )
{
- return new KABC::ResourceKolab( config );
+ return new TDEABC::ResourceKolab( config );
}
KRES::ConfigWidget *configWidget( TQWidget* )
@@ -76,7 +76,7 @@ static const char* s_attachmentMimeTypeContact = "application/x-vnd.kolab.contac
static const char* s_attachmentMimeTypeDistList = "application/x-vnd.kolab.contact.distlist";
static const char* s_inlineMimeType = "text/x-vcard";
-KABC::ResourceKolab::ResourceKolab( const TDEConfig *config )
+TDEABC::ResourceKolab::ResourceKolab( const TDEConfig *config )
: KPIM::ResourceABC( config ),
Kolab::ResourceKolabBase( "ResourceKolab-KABC" ),
mCachedSubresource( TQString() ), mCachedSubresourceNotFound( false ), mLocked( false )
@@ -87,7 +87,7 @@ KABC::ResourceKolab::ResourceKolab( const TDEConfig *config )
}
}
-KABC::ResourceKolab::~ResourceKolab()
+TDEABC::ResourceKolab::~ResourceKolab()
{
// The resource is deleted on exit (StdAddressBook's KStaticDeleter),
// and it wasn't closed before that, so close here to save the config.
@@ -96,7 +96,7 @@ KABC::ResourceKolab::~ResourceKolab()
}
}
-void KABC::ResourceKolab::loadSubResourceConfig( TDEConfig& config,
+void TDEABC::ResourceKolab::loadSubResourceConfig( TDEConfig& config,
const TQString& name,
const TQString& label,
bool writable )
@@ -108,7 +108,7 @@ void KABC::ResourceKolab::loadSubResourceConfig( TDEConfig& config,
completionWeight ) );
}
-bool KABC::ResourceKolab::doOpen()
+bool TDEABC::ResourceKolab::doOpen()
{
TDEConfig config( configFile() );
@@ -125,12 +125,12 @@ bool KABC::ResourceKolab::doOpen()
return true;
}
-void KABC::ResourceKolab::doClose()
+void TDEABC::ResourceKolab::doClose()
{
writeConfig();
}
-KABC::Ticket * KABC::ResourceKolab::requestSaveTicket()
+TDEABC::Ticket * TDEABC::ResourceKolab::requestSaveTicket()
{
if ( !addressBook() ) {
kdError() << "no addressbook" << endl;
@@ -141,7 +141,7 @@ KABC::Ticket * KABC::ResourceKolab::requestSaveTicket()
return createTicket( this );
}
-void KABC::ResourceKolab::releaseSaveTicket( Ticket* ticket )
+void TDEABC::ResourceKolab::releaseSaveTicket( Ticket* ticket )
{
mLocked = false;
mCachedSubresource = TQString();
@@ -149,17 +149,17 @@ void KABC::ResourceKolab::releaseSaveTicket( Ticket* ticket )
delete ticket;
}
-TQString KABC::ResourceKolab::loadContact( const TQString& contactData,
+TQString TDEABC::ResourceKolab::loadContact( const TQString& contactData,
const TQString& subResource,
TQ_UINT32 sernum,
KMailICalIface::StorageFormat format )
{
- KABC::Addressee addr;
+ TDEABC::Addressee addr;
if ( format == KMailICalIface::StorageXML ) {
Contact contact( contactData, this, subResource, sernum ); // load
contact.saveTo( &addr );
} else {
- KABC::VCardConverter converter;
+ TDEABC::VCardConverter converter;
#if defined(KABC_VCARD_ENCODING_FIX)
addr = converter.parseVCardRaw( contactData.utf8() );
#else
@@ -169,7 +169,7 @@ TQString KABC::ResourceKolab::loadContact( const TQString& contactData,
addr.setResource( this );
addr.setChanged( false );
- KABC::Resource::insertAddressee( addr ); // same as mAddrMap.insert( addr.uid(), addr );
+ TDEABC::Resource::insertAddressee( addr ); // same as mAddrMap.insert( addr.uid(), addr );
mUidMap[ addr.uid() ] = StorageReference( subResource, sernum );
kdDebug(5650) << "Loaded contact uid=" << addr.uid() << " sernum=" << sernum << " fullName=" << addr.name() << endl;
return addr.uid();
@@ -182,11 +182,11 @@ static const struct { const char* mimetype; KMailICalIface::StorageFormat format
{ s_inlineMimeType, KMailICalIface::StorageIcalVcard }
};
-bool KABC::ResourceKolab::loadSubResource( const TQString& subResource )
+bool TDEABC::ResourceKolab::loadSubResource( const TQString& subResource )
{
int count = 0;
if ( !kmailIncidencesCount( count, TQString(), subResource ) ) {
- kdError() << "Communication problem in KABC::ResourceKolab::loadSubResource()\n";
+ kdError() << "Communication problem in TDEABC::ResourceKolab::loadSubResource()\n";
return false;
}
if ( !count )
@@ -217,7 +217,7 @@ bool KABC::ResourceKolab::loadSubResource( const TQString& subResource )
KMailICalIface::StorageFormat format = s_formats[indexFormat].format;
TQMap<TQ_UINT32, TQString> lst;
if ( !kmailIncidences( lst, mimetype, subResource, startIndex, nbMessages ) ) {
- kdError() << "Communication problem in KABC::ResourceKolab::loadSubResource()\n";
+ kdError() << "Communication problem in TDEABC::ResourceKolab::loadSubResource()\n";
if ( progressId )
uiserver.jobFinished( progressId );
return false;
@@ -247,7 +247,7 @@ bool KABC::ResourceKolab::loadSubResource( const TQString& subResource )
return true;
}
-bool KABC::ResourceKolab::load()
+bool TDEABC::ResourceKolab::load()
{
mUidMap.clear();
mAddrMap.clear();
@@ -265,7 +265,7 @@ bool KABC::ResourceKolab::load()
return rc;
}
-bool KABC::ResourceKolab::save( Ticket* )
+bool TDEABC::ResourceKolab::save( Ticket* )
{
bool rc = true;
@@ -330,7 +330,7 @@ void AttachmentList::updateAttachment( const TQByteArray& data, const TQString&
}
}
-bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
+bool TDEABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
{
const TQString uid = addr.uid();
TQString subResource;
@@ -380,7 +380,7 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
s_attachmentMimeTypeDistList : s_attachmentMimeTypeContact;
} else {
mimetype = s_inlineMimeType;
- KABC::VCardConverter converter;
+ TDEABC::VCardConverter converter;
#if defined(KABC_VCARD_ENCODING_FIX)
data = TQString::fromUtf8( converter.createVCardRaw( addr ) );
#else
@@ -411,7 +411,7 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
return rc;
}
-void KABC::ResourceKolab::insertAddressee( const Addressee& addr )
+void TDEABC::ResourceKolab::insertAddressee( const Addressee& addr )
{
const TQString uid = addr.uid();
//kdDebug(5650) << k_funcinfo << uid << endl;
@@ -428,7 +428,7 @@ void KABC::ResourceKolab::insertAddressee( const Addressee& addr )
Resource::insertAddressee( addr );
}
-void KABC::ResourceKolab::removeAddressee( const Addressee& addr )
+void TDEABC::ResourceKolab::removeAddressee( const Addressee& addr )
{
const TQString uid = addr.uid();
if ( mUidMap.find( uid ) == mUidMap.end() ) return;
@@ -451,7 +451,7 @@ void KABC::ResourceKolab::removeAddressee( const Addressee& addr )
* These are the DCOP slots that KMail call to notify when something
* changed.
*/
-bool KABC::ResourceKolab::fromKMailAddIncidence( const TQString& type,
+bool TDEABC::ResourceKolab::fromKMailAddIncidence( const TQString& type,
const TQString& subResource,
TQ_UINT32 sernum,
int format,
@@ -479,7 +479,7 @@ bool KABC::ResourceKolab::fromKMailAddIncidence( const TQString& type,
return true;
}
-void KABC::ResourceKolab::fromKMailDelIncidence( const TQString& type,
+void TDEABC::ResourceKolab::fromKMailDelIncidence( const TQString& type,
const TQString& subResource,
const TQString& uid )
{
@@ -503,7 +503,7 @@ void KABC::ResourceKolab::fromKMailDelIncidence( const TQString& type,
}
}
-void KABC::ResourceKolab::fromKMailRefresh( const TQString& type,
+void TDEABC::ResourceKolab::fromKMailRefresh( const TQString& type,
const TQString& /*subResource*/ )
{
// Check if this is a contact
@@ -515,7 +515,7 @@ void KABC::ResourceKolab::fromKMailRefresh( const TQString& type,
addressBook()->emitAddressBookChanged();
}
-void KABC::ResourceKolab::fromKMailAddSubresource( const TQString& type,
+void TDEABC::ResourceKolab::fromKMailAddSubresource( const TQString& type,
const TQString& subResource,
const TQString& label,
bool writable,
@@ -535,7 +535,7 @@ void KABC::ResourceKolab::fromKMailAddSubresource( const TQString& type,
emit signalSubresourceAdded( this, type, subResource );
}
-void KABC::ResourceKolab::fromKMailDelSubresource( const TQString& type,
+void TDEABC::ResourceKolab::fromKMailDelSubresource( const TQString& type,
const TQString& subResource )
{
if( type != s_kmailContentsType ) return;
@@ -575,7 +575,7 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const TQString& type,
-void KABC::ResourceKolab::fromKMailAsyncLoadResult( const TQMap<TQ_UINT32, TQString>& map,
+void TDEABC::ResourceKolab::fromKMailAsyncLoadResult( const TQMap<TQ_UINT32, TQString>& map,
const TQString& /* type */,
const TQString& folder )
{
@@ -590,12 +590,12 @@ void KABC::ResourceKolab::fromKMailAsyncLoadResult( const TQMap<TQ_UINT32, TQStr
addressBook()->emitAddressBookChanged();
}
-TQStringList KABC::ResourceKolab::subresources() const
+TQStringList TDEABC::ResourceKolab::subresources() const
{
return mSubResources.keys();
}
-bool KABC::ResourceKolab::subresourceActive( const TQString& subresource ) const
+bool TDEABC::ResourceKolab::subresourceActive( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].active();
@@ -607,7 +607,7 @@ bool KABC::ResourceKolab::subresourceActive( const TQString& subresource ) const
return true;
}
-bool KABC::ResourceKolab::subresourceWritable( const TQString& subresource ) const
+bool TDEABC::ResourceKolab::subresourceWritable( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].writable();
@@ -615,7 +615,7 @@ bool KABC::ResourceKolab::subresourceWritable( const TQString& subresource ) con
return false; //better a safe default
}
-int KABC::ResourceKolab::subresourceCompletionWeight( const TQString& subresource ) const
+int TDEABC::ResourceKolab::subresourceCompletionWeight( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].completionWeight();
@@ -626,7 +626,7 @@ int KABC::ResourceKolab::subresourceCompletionWeight( const TQString& subresourc
return 80;
}
-TQString KABC::ResourceKolab::subresourceLabel( const TQString& subresource ) const
+TQString TDEABC::ResourceKolab::subresourceLabel( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].label();
@@ -636,7 +636,7 @@ TQString KABC::ResourceKolab::subresourceLabel( const TQString& subresource ) co
return TQString();
}
-void KABC::ResourceKolab::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight )
+void TDEABC::ResourceKolab::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setCompletionWeight( completionWeight );
@@ -645,7 +645,7 @@ void KABC::ResourceKolab::setSubresourceCompletionWeight( const TQString& subres
}
}
-TQMap<TQString, TQString> KABC::ResourceKolab::uidToResourceMap() const
+TQMap<TQString, TQString> TDEABC::ResourceKolab::uidToResourceMap() const
{
// TODO: Couldn't this be made simpler?
TQMap<TQString, TQString> map;
@@ -655,7 +655,7 @@ TQMap<TQString, TQString> KABC::ResourceKolab::uidToResourceMap() const
return map;
}
-void KABC::ResourceKolab::setSubresourceActive( const TQString &subresource, bool active )
+void TDEABC::ResourceKolab::setSubresourceActive( const TQString &subresource, bool active )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setActive( active );
@@ -668,18 +668,18 @@ void KABC::ResourceKolab::setSubresourceActive( const TQString &subresource, boo
/*virtual*/
-bool KABC::ResourceKolab::addSubresource( const TQString& label, const TQString& parent )
+bool TDEABC::ResourceKolab::addSubresource( const TQString& label, const TQString& parent )
{
return kmailAddSubresource( label, parent, s_kmailContentsType );
}
/*virtual*/
-bool KABC::ResourceKolab::removeSubresource( const TQString& id )
+bool TDEABC::ResourceKolab::removeSubresource( const TQString& id )
{
return kmailRemoveSubresource( id );
}
-void KABC::ResourceKolab::writeConfig()
+void TDEABC::ResourceKolab::writeConfig()
{
TDEConfig config( configFile() );