summaryrefslogtreecommitdiffstats
path: root/tderesources/scalix/tdeabc
diff options
context:
space:
mode:
Diffstat (limited to 'tderesources/scalix/tdeabc')
-rw-r--r--tderesources/scalix/tdeabc/contact.cpp54
-rw-r--r--tderesources/scalix/tdeabc/contact.h4
-rw-r--r--tderesources/scalix/tdeabc/resourcescalix.cpp66
-rw-r--r--tderesources/scalix/tdeabc/resourcescalix.h2
-rw-r--r--tderesources/scalix/tdeabc/resourcescalix_plugin.cpp2
5 files changed, 64 insertions, 64 deletions
diff --git a/tderesources/scalix/tdeabc/contact.cpp b/tderesources/scalix/tdeabc/contact.cpp
index 457a34e7..190837a0 100644
--- a/tderesources/scalix/tdeabc/contact.cpp
+++ b/tderesources/scalix/tdeabc/contact.cpp
@@ -30,7 +30,7 @@ using namespace Scalix;
static TQMap<TQString, TQString> *s_distListMap = 0;
static KStaticDeleter< TQMap<TQString, TQString> > sd;
-static TQString custom( const TQString &name, const KABC::Addressee &addr, const TQString &defaultValue = TQString() )
+static TQString custom( const TQString &name, const TDEABC::Addressee &addr, const TQString &defaultValue = TQString() )
{
const TQString value = addr.custom( "Scalix", name );
if ( value.isEmpty() )
@@ -39,12 +39,12 @@ static TQString custom( const TQString &name, const KABC::Addressee &addr, const
return value;
}
-static void setCustom( const TQString &name, const TQString &value, KABC::Addressee &addr )
+static void setCustom( const TQString &name, const TQString &value, TDEABC::Addressee &addr )
{
addr.insertCustom( "Scalix", name, value );
}
-TQString Contact::toXml( const KABC::Addressee &addr )
+TQString Contact::toXml( const TDEABC::Addressee &addr )
{
/**
* Handle distribution lists.
@@ -118,44 +118,44 @@ TQString Contact::toXml( const KABC::Addressee &addr )
TQString( "</email%1_display_name>" ).arg( i + 1 ) + "\n";
}
- KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Home );
+ TDEABC::PhoneNumber phone = addr.phoneNumber( TDEABC::PhoneNumber::Home );
xml += "<home_phone_number>" + phone.number() + "</home_phone_number>\n";
- phone = addr.phoneNumber( KABC::PhoneNumber::Work );
+ phone = addr.phoneNumber( TDEABC::PhoneNumber::Work );
xml += "<work_phone_number>" + phone.number() + "</work_phone_number>\n";
- phone = addr.phoneNumber( KABC::PhoneNumber::Work | KABC::PhoneNumber::Fax );
+ phone = addr.phoneNumber( TDEABC::PhoneNumber::Work | TDEABC::PhoneNumber::Fax );
xml += "<work_fax_number>" + phone.number() + "</work_fax_number>\n";
- phone = addr.phoneNumber( KABC::PhoneNumber::Cell );
+ phone = addr.phoneNumber( TDEABC::PhoneNumber::Cell );
xml += "<mobile_phone_number>" + phone.number() + "</mobile_phone_number>\n";
- const KABC::Address workAddress = addr.address( KABC::Address::Work );
+ const TDEABC::Address workAddress = addr.address( TDEABC::Address::Work );
xml += "<work_address_street>" + workAddress.street() + "</work_address_street>\n";
xml += "<work_address_zip>" + workAddress.postalCode() + "</work_address_zip>\n";
xml += "<work_address_city>" + workAddress.locality() + "</work_address_city>\n";
xml += "<work_address_state>" + workAddress.region() + "</work_address_state>\n";
xml += "<work_address_country>" + workAddress.country() + "</work_address_country>\n";
- const KABC::Address homeAddress = addr.address( KABC::Address::Home );
+ const TDEABC::Address homeAddress = addr.address( TDEABC::Address::Home );
xml += "<home_address_street>" + homeAddress.street() + "</home_address_street>\n";
xml += "<home_address_zip>" + homeAddress.postalCode() + "</home_address_zip>\n";
xml += "<home_address_city>" + homeAddress.locality() + "</home_address_city>\n";
xml += "<home_address_state>" + homeAddress.region() + "</home_address_state>\n";
xml += "<home_address_country>" + homeAddress.country() + "</home_address_country>\n";
- const KABC::Address otherAddress = addr.address( KABC::Address::Dom );
+ const TDEABC::Address otherAddress = addr.address( TDEABC::Address::Dom );
xml += "<other_address_street>" + otherAddress.street() + "</other_address_street>\n";
xml += "<other_address_zip>" + otherAddress.postalCode() + "</other_address_zip>\n";
xml += "<other_address_city>" + otherAddress.locality() + "</other_address_city>\n";
xml += "<other_address_state>" + otherAddress.region() + "</other_address_state>\n";
xml += "<other_address_country>" + otherAddress.country() + "</other_address_country>\n";
- if ( homeAddress.type() & KABC::Address::Pref )
+ if ( homeAddress.type() & TDEABC::Address::Pref )
xml += "<selected_mailing_address>1</selected_mailing_address>\n";
- else if ( workAddress.type() & KABC::Address::Pref )
+ else if ( workAddress.type() & TDEABC::Address::Pref )
xml += "<selected_mailing_address>2</selected_mailing_address>\n";
- else if ( otherAddress.type() & KABC::Address::Pref )
+ else if ( otherAddress.type() & TDEABC::Address::Pref )
xml += "<selected_mailing_address>3</selected_mailing_address>\n";
xml += "<im_address>" + addr.custom( "KADDRESSBOOK", "X-IMAddress" ) + "</im_address>\n";
@@ -176,7 +176,7 @@ TQString Contact::toXml( const KABC::Addressee &addr )
return xml;
}
-KABC::Addressee Contact::fromXml( const TQString &xml )
+TDEABC::Addressee Contact::fromXml( const TQString &xml )
{
TQDomDocument document;
@@ -184,7 +184,7 @@ KABC::Addressee Contact::fromXml( const TQString &xml )
int errorLine, errorColumn;
if ( !document.setContent( xml, true, &errorMsg, &errorLine, &errorColumn ) ) {
tqDebug( "Error parsing XML in Scalix::Contact::fromXml: %s (%d,%d)", errorMsg.latin1(), errorLine, errorColumn );
- return KABC::Addressee();
+ return TDEABC::Addressee();
}
TQDomElement contactElement = document.documentElement();
@@ -208,16 +208,16 @@ KABC::Addressee Contact::fromXml( const TQString &xml )
return list;
} else {
tqDebug( "Error interpreting XML in Scalix::Contact::fromXml: no 'contact' or 'distlist' tag found" );
- return KABC::Addressee();
+ return TDEABC::Addressee();
}
}
TQString emails[ 3 ];
- KABC::Address homeAddress( KABC::Address::Home );
- KABC::Address workAddress( KABC::Address::Work );
- KABC::Address otherAddress( KABC::Address::Dom );
+ TDEABC::Address homeAddress( TDEABC::Address::Home );
+ TDEABC::Address workAddress( TDEABC::Address::Work );
+ TDEABC::Address otherAddress( TDEABC::Address::Dom );
- KABC::Addressee addr;
+ TDEABC::Addressee addr;
setCustom( "comes_from_scalix", "true", addr );
TQDomNode node = contactElement.firstChild();
@@ -275,13 +275,13 @@ KABC::Addressee Contact::fromXml( const TQString &xml )
// phone numbers
else if ( element.tagName() == "home_phone_number" )
- addr.insertPhoneNumber( KABC::PhoneNumber( element.text(), KABC::PhoneNumber::Home ) );
+ addr.insertPhoneNumber( TDEABC::PhoneNumber( element.text(), TDEABC::PhoneNumber::Home ) );
else if ( element.tagName() == "work_phone_number" )
- addr.insertPhoneNumber( KABC::PhoneNumber( element.text(), KABC::PhoneNumber::Work ) );
+ addr.insertPhoneNumber( TDEABC::PhoneNumber( element.text(), TDEABC::PhoneNumber::Work ) );
else if ( element.tagName() == "work_fax_number" )
- addr.insertPhoneNumber( KABC::PhoneNumber( element.text(), KABC::PhoneNumber::Work | KABC::PhoneNumber::Fax ) );
+ addr.insertPhoneNumber( TDEABC::PhoneNumber( element.text(), TDEABC::PhoneNumber::Work | TDEABC::PhoneNumber::Fax ) );
else if ( element.tagName() == "mobile_phone_number" )
- addr.insertPhoneNumber( KABC::PhoneNumber( element.text(), KABC::PhoneNumber::Cell ) );
+ addr.insertPhoneNumber( TDEABC::PhoneNumber( element.text(), TDEABC::PhoneNumber::Cell ) );
// address (work)
else if ( element.tagName() == "work_address_street" )
@@ -322,13 +322,13 @@ KABC::Addressee Contact::fromXml( const TQString &xml )
else if ( element.tagName() == "selected_mailing_address" )
switch ( element.text().toInt() ) {
case 1:
- homeAddress.setType( homeAddress.type() | KABC::Address::Pref );
+ homeAddress.setType( homeAddress.type() | TDEABC::Address::Pref );
break;
case 2:
- workAddress.setType( workAddress.type() | KABC::Address::Pref );
+ workAddress.setType( workAddress.type() | TDEABC::Address::Pref );
break;
case 3:
- otherAddress.setType( otherAddress.type() | KABC::Address::Pref );
+ otherAddress.setType( otherAddress.type() | TDEABC::Address::Pref );
break;
default:
Q_ASSERT( !"Unknown selected_mailing_address enum" );
diff --git a/tderesources/scalix/tdeabc/contact.h b/tderesources/scalix/tdeabc/contact.h
index 33ea1a9c..a8284255 100644
--- a/tderesources/scalix/tdeabc/contact.h
+++ b/tderesources/scalix/tdeabc/contact.h
@@ -28,8 +28,8 @@ namespace Scalix {
class Contact
{
public:
- static TQString toXml( const KABC::Addressee &addr );
- static KABC::Addressee fromXml( const TQString &xml );
+ static TQString toXml( const TDEABC::Addressee &addr );
+ static TDEABC::Addressee fromXml( const TQString &xml );
};
}
diff --git a/tderesources/scalix/tdeabc/resourcescalix.cpp b/tderesources/scalix/tdeabc/resourcescalix.cpp
index ea3928a5..dc953ded 100644
--- a/tderesources/scalix/tdeabc/resourcescalix.cpp
+++ b/tderesources/scalix/tdeabc/resourcescalix.cpp
@@ -61,7 +61,7 @@ class ScalixFactory : public KRES::PluginFactoryBase
public:
KRES::Resource *resource( const TDEConfig *config )
{
- return new KABC::ResourceScalix( config );
+ return new TDEABC::ResourceScalix( config );
}
KRES::ConfigWidget *configWidget( TQWidget* )
@@ -77,7 +77,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 = "application/scalix-properties";
-KABC::ResourceScalix::ResourceScalix( const TDEConfig *config )
+TDEABC::ResourceScalix::ResourceScalix( const TDEConfig *config )
: KPIM::ResourceABC( config ),
Scalix::ResourceScalixBase( "ResourceScalix-KABC" ),
mCachedSubresource( TQString() ), mLocked( false )
@@ -85,7 +85,7 @@ KABC::ResourceScalix::ResourceScalix( const TDEConfig *config )
setType( "scalix" );
}
-KABC::ResourceScalix::~ResourceScalix()
+TDEABC::ResourceScalix::~ResourceScalix()
{
// The resource is deleted on exit (StdAddressBook's KStaticDeleter),
// and it wasn't closed before that, so close here to save the config.
@@ -94,7 +94,7 @@ KABC::ResourceScalix::~ResourceScalix()
}
}
-void KABC::ResourceScalix::loadSubResourceConfig( TDEConfig& config,
+void TDEABC::ResourceScalix::loadSubResourceConfig( TDEConfig& config,
const TQString& name,
const TQString& label,
bool writable )
@@ -106,7 +106,7 @@ void KABC::ResourceScalix::loadSubResourceConfig( TDEConfig& config,
completionWeight ) );
}
-bool KABC::ResourceScalix::doOpen()
+bool TDEABC::ResourceScalix::doOpen()
{
TDEConfig config( configFile() );
@@ -123,7 +123,7 @@ bool KABC::ResourceScalix::doOpen()
return true;
}
-void KABC::ResourceScalix::doClose()
+void TDEABC::ResourceScalix::doClose()
{
TDEConfig config( configFile() );
@@ -135,7 +135,7 @@ void KABC::ResourceScalix::doClose()
}
}
-KABC::Ticket * KABC::ResourceScalix::requestSaveTicket()
+TDEABC::Ticket * TDEABC::ResourceScalix::requestSaveTicket()
{
if ( !addressBook() ) {
kdError() << "no addressbook" << endl;
@@ -146,29 +146,29 @@ KABC::Ticket * KABC::ResourceScalix::requestSaveTicket()
return createTicket( this );
}
-void KABC::ResourceScalix::releaseSaveTicket( Ticket* ticket )
+void TDEABC::ResourceScalix::releaseSaveTicket( Ticket* ticket )
{
mLocked = false;
mCachedSubresource = TQString();
delete ticket;
}
-TQString KABC::ResourceScalix::loadContact( const TQString& contactData,
+TQString TDEABC::ResourceScalix::loadContact( const TQString& contactData,
const TQString& subResource,
TQ_UINT32 sernum,
KMailICalIface::StorageFormat )
{
- KABC::Addressee addr = Contact::fromXml( contactData );
+ TDEABC::Addressee addr = Contact::fromXml( 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();
}
-bool KABC::ResourceScalix::loadSubResource( const TQString& subResource )
+bool TDEABC::ResourceScalix::loadSubResource( const TQString& subResource )
{
bool scalixcontacts = loadSubResourceHelper( subResource, s_attachmentMimeTypeContact, KMailICalIface::StorageXML );
bool scalixdistlists = loadSubResourceHelper( subResource, s_attachmentMimeTypeDistList, KMailICalIface::StorageXML );
@@ -176,13 +176,13 @@ bool KABC::ResourceScalix::loadSubResource( const TQString& subResource )
return scalixcontacts && scalixdistlists && vcardstyle;
}
-bool KABC::ResourceScalix::loadSubResourceHelper( const TQString& subResource,
+bool TDEABC::ResourceScalix::loadSubResourceHelper( const TQString& subResource,
const char* mimetype,
KMailICalIface::StorageFormat format )
{
int count = 0;
if ( !kmailIncidencesCount( count, mimetype, subResource ) ) {
- kdError() << "Communication problem in KABC::ResourceScalix::loadSubResourceHelper()\n";
+ kdError() << "Communication problem in TDEABC::ResourceScalix::loadSubResourceHelper()\n";
return false;
}
if ( !count )
@@ -229,7 +229,7 @@ bool KABC::ResourceScalix::loadSubResourceHelper( const TQString& subResource,
return true;
}
-bool KABC::ResourceScalix::load()
+bool TDEABC::ResourceScalix::load()
{
mUidMap.clear();
mAddrMap.clear();
@@ -247,7 +247,7 @@ bool KABC::ResourceScalix::load()
return rc;
}
-bool KABC::ResourceScalix::save( Ticket* )
+bool TDEABC::ResourceScalix::save( Ticket* )
{
bool rc = true;
@@ -312,7 +312,7 @@ void AttachmentList::updateAttachment( const TQByteArray& data, const TQString&
}
}
-bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr )
+bool TDEABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr )
{
const TQString uid = addr.uid();
TQString subResource;
@@ -372,7 +372,7 @@ bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr )
return rc;
}
-void KABC::ResourceScalix::insertAddressee( const Addressee& addr )
+void TDEABC::ResourceScalix::insertAddressee( const Addressee& addr )
{
const TQString uid = addr.uid();
//kdDebug(5650) << k_funcinfo << uid << endl;
@@ -389,7 +389,7 @@ void KABC::ResourceScalix::insertAddressee( const Addressee& addr )
Resource::insertAddressee( addr );
}
-void KABC::ResourceScalix::removeAddressee( const Addressee& addr )
+void TDEABC::ResourceScalix::removeAddressee( const Addressee& addr )
{
const TQString uid = addr.uid();
if ( mUidMap.find( uid ) == mUidMap.end() ) return;
@@ -412,7 +412,7 @@ void KABC::ResourceScalix::removeAddressee( const Addressee& addr )
* These are the DCOP slots that KMail call to notify when something
* changed.
*/
-bool KABC::ResourceScalix::fromKMailAddIncidence( const TQString& type,
+bool TDEABC::ResourceScalix::fromKMailAddIncidence( const TQString& type,
const TQString& subResource,
TQ_UINT32 sernum,
int format,
@@ -440,7 +440,7 @@ bool KABC::ResourceScalix::fromKMailAddIncidence( const TQString& type,
return true;
}
-void KABC::ResourceScalix::fromKMailDelIncidence( const TQString& type,
+void TDEABC::ResourceScalix::fromKMailDelIncidence( const TQString& type,
const TQString& subResource,
const TQString& uid )
{
@@ -464,7 +464,7 @@ void KABC::ResourceScalix::fromKMailDelIncidence( const TQString& type,
}
}
-void KABC::ResourceScalix::fromKMailRefresh( const TQString& type,
+void TDEABC::ResourceScalix::fromKMailRefresh( const TQString& type,
const TQString& /*subResource*/ )
{
// Check if this is a contact
@@ -476,7 +476,7 @@ void KABC::ResourceScalix::fromKMailRefresh( const TQString& type,
addressBook()->emitAddressBookChanged();
}
-void KABC::ResourceScalix::fromKMailAddSubresource( const TQString& type,
+void TDEABC::ResourceScalix::fromKMailAddSubresource( const TQString& type,
const TQString& subResource,
const TQString& label,
bool writable )
@@ -495,7 +495,7 @@ void KABC::ResourceScalix::fromKMailAddSubresource( const TQString& type,
emit signalSubresourceAdded( this, type, subResource );
}
-void KABC::ResourceScalix::fromKMailDelSubresource( const TQString& type,
+void TDEABC::ResourceScalix::fromKMailDelSubresource( const TQString& type,
const TQString& subResource )
{
if( type != s_kmailContentsType ) return;
@@ -535,7 +535,7 @@ void KABC::ResourceScalix::fromKMailDelSubresource( const TQString& type,
-void KABC::ResourceScalix::fromKMailAsyncLoadResult( const TQMap<TQ_UINT32, TQString>& map,
+void TDEABC::ResourceScalix::fromKMailAsyncLoadResult( const TQMap<TQ_UINT32, TQString>& map,
const TQString& /* type */,
const TQString& folder )
{
@@ -550,12 +550,12 @@ void KABC::ResourceScalix::fromKMailAsyncLoadResult( const TQMap<TQ_UINT32, TQSt
addressBook()->emitAddressBookChanged();
}
-TQStringList KABC::ResourceScalix::subresources() const
+TQStringList TDEABC::ResourceScalix::subresources() const
{
return mSubResources.keys();
}
-bool KABC::ResourceScalix::subresourceActive( const TQString& subresource ) const
+bool TDEABC::ResourceScalix::subresourceActive( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].active();
@@ -567,7 +567,7 @@ bool KABC::ResourceScalix::subresourceActive( const TQString& subresource ) cons
return true;
}
-bool KABC::ResourceScalix::subresourceWritable( const TQString& subresource ) const
+bool TDEABC::ResourceScalix::subresourceWritable( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].writable();
@@ -575,7 +575,7 @@ bool KABC::ResourceScalix::subresourceWritable( const TQString& subresource ) co
return false; //better a safe default
}
-int KABC::ResourceScalix::subresourceCompletionWeight( const TQString& subresource ) const
+int TDEABC::ResourceScalix::subresourceCompletionWeight( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].completionWeight();
@@ -586,7 +586,7 @@ int KABC::ResourceScalix::subresourceCompletionWeight( const TQString& subresour
return 80;
}
-TQString KABC::ResourceScalix::subresourceLabel( const TQString& subresource ) const
+TQString TDEABC::ResourceScalix::subresourceLabel( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].label();
@@ -596,7 +596,7 @@ TQString KABC::ResourceScalix::subresourceLabel( const TQString& subresource ) c
return TQString();
}
-void KABC::ResourceScalix::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight )
+void TDEABC::ResourceScalix::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setCompletionWeight( completionWeight );
@@ -605,7 +605,7 @@ void KABC::ResourceScalix::setSubresourceCompletionWeight( const TQString& subre
}
}
-TQMap<TQString, TQString> KABC::ResourceScalix::uidToResourceMap() const
+TQMap<TQString, TQString> TDEABC::ResourceScalix::uidToResourceMap() const
{
// TODO: Couldn't this be made simpler?
TQMap<TQString, TQString> map;
@@ -615,7 +615,7 @@ TQMap<TQString, TQString> KABC::ResourceScalix::uidToResourceMap() const
return map;
}
-void KABC::ResourceScalix::setSubresourceActive( const TQString &subresource, bool active )
+void TDEABC::ResourceScalix::setSubresourceActive( const TQString &subresource, bool active )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setActive( active );
diff --git a/tderesources/scalix/tdeabc/resourcescalix.h b/tderesources/scalix/tdeabc/resourcescalix.h
index dbb0b93c..0fa58cdf 100644
--- a/tderesources/scalix/tdeabc/resourcescalix.h
+++ b/tderesources/scalix/tdeabc/resourcescalix.h
@@ -41,7 +41,7 @@
#include <kmail/kmailicalIface.h>
#include <tdepimmacros.h>
-namespace KABC {
+namespace TDEABC {
class FormatPlugin;
diff --git a/tderesources/scalix/tdeabc/resourcescalix_plugin.cpp b/tderesources/scalix/tdeabc/resourcescalix_plugin.cpp
index cdfc8f30..ee84b7be 100644
--- a/tderesources/scalix/tdeabc/resourcescalix_plugin.cpp
+++ b/tderesources/scalix/tdeabc/resourcescalix_plugin.cpp
@@ -40,7 +40,7 @@ class ScalixFactory : public KRES::PluginFactoryBase
public:
KRES::Resource *resource( const TDEConfig *config )
{
- return new KABC::ResourceScalix( config );
+ return new TDEABC::ResourceScalix( config );
}
KRES::ConfigWidget *configWidget( TQWidget* )