summaryrefslogtreecommitdiffabout
path: root/kabc/plugins
Unidiff
Diffstat (limited to 'kabc/plugins') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/dir/resourcedir.cpp7
-rw-r--r--kabc/plugins/dir/resourcedir.h2
-rw-r--r--kabc/plugins/file/resourcefile.cpp16
-rw-r--r--kabc/plugins/file/resourcefile.h4
-rw-r--r--kabc/plugins/ldap/resourceldap.cpp7
-rw-r--r--kabc/plugins/ldap/resourceldap.h2
-rw-r--r--kabc/plugins/opie/resourceopie.cpp11
-rw-r--r--kabc/plugins/opie/resourceopie.h4
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.cpp11
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.h4
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.cpp8
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.h4
12 files changed, 35 insertions, 45 deletions
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index e58e4f7..e2b7b08 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -55,13 +55,12 @@ $Id$
55 55
56//US 56//US
57#include <qdir.h> 57#include <qdir.h>
58 58
59#define NO_DIRWATCH 59#define NO_DIRWATCH
60#include "resourcedir.h" 60#include "resourcedir.h"
61#include "syncprefwidget.h"
62 61
63//#define ALLOW_LOCKING 62//#define ALLOW_LOCKING
64 63
65using namespace KABC; 64using namespace KABC;
66 65
67extern "C" 66extern "C"
@@ -71,20 +70,20 @@ __declspec(dllexport)
71{ 70{
72#endif 71#endif
73 72
74//US void *init_kabc_dir() 73//US void *init_kabc_dir()
75 void *init_microkabc_dir() 74 void *init_microkabc_dir()
76 { 75 {
77 return new KRES::PluginFactory<ResourceDir,ResourceDirConfig, SyncPrefWidgetContainer>(); 76 return new KRES::PluginFactory<ResourceDir,ResourceDirConfig>();
78 } 77 }
79#ifndef _WIN32_ 78#ifndef _WIN32_
80} 79}
81#endif 80#endif
82 81
83ResourceDir::ResourceDir( const KConfig *config, bool syncable ) 82ResourceDir::ResourceDir( const KConfig *config )
84 : Resource( config, syncable ) 83 : Resource( config )
85{ 84{
86 QString path; 85 QString path;
87 86
88 KConfig *cfg = (KConfig *)config; 87 KConfig *cfg = (KConfig *)config;
89 if ( cfg ) { 88 if ( cfg ) {
90//US path = config->readEntry( "FilePath" ); 89//US path = config->readEntry( "FilePath" );
diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h
index 77cd18c..6c1e922 100644
--- a/kabc/plugins/dir/resourcedir.h
+++ b/kabc/plugins/dir/resourcedir.h
@@ -46,13 +46,13 @@ class FormatPlugin;
46*/ 46*/
47class ResourceDir : public Resource 47class ResourceDir : public Resource
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
50 50
51public: 51public:
52 ResourceDir( const KConfig*, bool syncable ); 52 ResourceDir( const KConfig* );
53 ~ResourceDir(); 53 ~ResourceDir();
54 54
55 virtual void writeConfig( KConfig* ); 55 virtual void writeConfig( KConfig* );
56 56
57 virtual bool doOpen(); 57 virtual bool doOpen();
58 virtual void doClose(); 58 virtual void doClose();
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index 163f2b4..dc5932f 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -48,13 +48,12 @@ $Id$
48 48
49#include "resource.h" 49#include "resource.h"
50#include "resourcefileconfig.h" 50#include "resourcefileconfig.h"
51#include "stdaddressbook.h" 51#include "stdaddressbook.h"
52#define NO_DIRWATCH 52#define NO_DIRWATCH
53#include "resourcefile.h" 53#include "resourcefile.h"
54#include "syncprefwidget.h"
55 54
56//#define ALLOW_LOCKING 55//#define ALLOW_LOCKING
57 56
58 57
59 58
60using namespace KABC; 59using namespace KABC;
@@ -66,27 +65,24 @@ __declspec(dllexport)
66{ 65{
67#endif 66#endif
68 67
69//US void *init_kabc_file() 68//US void *init_kabc_file()
70 void *init_microkabc_file() 69 void *init_microkabc_file()
71 { 70 {
72 return new KRES::PluginFactory<ResourceFile,ResourceFileConfig, SyncPrefWidgetContainer>(); 71 return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>();
73 } 72 }
74#ifndef _WIN32_ 73#ifndef _WIN32_
75} 74}
76#endif 75#endif
77 76
78ResourceFile::ResourceFile( const KConfig *config, bool syncable ) 77ResourceFile::ResourceFile( const KConfig *config )
79 : Resource( config, syncable ) , mFormat( 0 ) 78 : Resource( config ) , mFormat( 0 )
80{ 79{
81 QString fileName, formatName, default_fileName; 80 QString fileName, formatName, default_fileName;
82 81
83 if (syncable == true) 82 default_fileName = StdAddressBook::fileName();
84 default_fileName = "/home/polo/kdepim/apps/kabc/localfile.vcf";
85 else
86 default_fileName = StdAddressBook::fileName();
87 83
88 KConfig *cfg = (KConfig *)config; 84 KConfig *cfg = (KConfig *)config;
89 if ( cfg ) { 85 if ( cfg ) {
90 fileName = cfg->readEntry( "FileName", default_fileName ); 86 fileName = cfg->readEntry( "FileName", default_fileName );
91 formatName = cfg->readEntry( "FileFormat", "vcard" ); 87 formatName = cfg->readEntry( "FileFormat", "vcard" );
92 } else { 88 } else {
@@ -94,15 +90,15 @@ ResourceFile::ResourceFile( const KConfig *config, bool syncable )
94 formatName = "vcard"; 90 formatName = "vcard";
95 } 91 }
96 92
97 init( fileName, formatName ); 93 init( fileName, formatName );
98} 94}
99 95
100ResourceFile::ResourceFile( const QString &fileName, bool syncable , 96ResourceFile::ResourceFile( const QString &fileName ,
101 const QString &formatName ) 97 const QString &formatName )
102 : Resource( 0, syncable ) 98 : Resource( 0 )
103{ 99{
104// qDebug("ResourceFile::ResourceFile : 3 %s, %s", fileName.latin1(), formatName.latin1()); 100// qDebug("ResourceFile::ResourceFile : 3 %s, %s", fileName.latin1(), formatName.latin1());
105 init( fileName, formatName ); 101 init( fileName, formatName );
106} 102}
107 103
108void ResourceFile::init( const QString &fileName, const QString &formatName ) 104void ResourceFile::init( const QString &fileName, const QString &formatName )
diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h
index 8339340..b4421b2 100644
--- a/kabc/plugins/file/resourcefile.h
+++ b/kabc/plugins/file/resourcefile.h
@@ -55,18 +55,18 @@ public:
55 55
56 /** 56 /**
57 Constructor. 57 Constructor.
58 58
59 @param cfg The config object where custom resource settings are stored. 59 @param cfg The config object where custom resource settings are stored.
60 */ 60 */
61 ResourceFile( const KConfig *cfg, bool syncable ); 61 ResourceFile( const KConfig *cfg );
62 62
63 /** 63 /**
64 Construct file resource on file @arg fileName using format @arg formatName. 64 Construct file resource on file @arg fileName using format @arg formatName.
65 */ 65 */
66 ResourceFile( const QString &fileName, bool syncable , const QString &formatName = "vcard" ); 66 ResourceFile( const QString &fileName , const QString &formatName = "vcard" );
67 67
68 /** 68 /**
69 * Destructor. 69 * Destructor.
70 */ 70 */
71 ~ResourceFile(); 71 ~ResourceFile();
72 72
diff --git a/kabc/plugins/ldap/resourceldap.cpp b/kabc/plugins/ldap/resourceldap.cpp
index 17f115d..55c43af 100644
--- a/kabc/plugins/ldap/resourceldap.cpp
+++ b/kabc/plugins/ldap/resourceldap.cpp
@@ -33,30 +33,29 @@ $Id$
33#include <kstringhandler.h> 33#include <kstringhandler.h>
34 34
35#include <stdlib.h> 35#include <stdlib.h>
36 36
37#include "resourceldap.h" 37#include "resourceldap.h"
38#include "resourceldapconfig.h" 38#include "resourceldapconfig.h"
39#include "syncprefwidget.h"
40 39
41using namespace KABC; 40using namespace KABC;
42 41
43extern "C" 42extern "C"
44{ 43{
45//US void *init_kabc_ldap() 44//US void *init_kabc_ldap()
46 void *init_microkabc_ldap() 45 void *init_microkabc_ldap()
47 { 46 {
48 return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig, SyncPrefWidgetContainer>(); 47 return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig>();
49 } 48 }
50} 49}
51 50
52void addModOp( LDAPMod ***pmods, const QString &attr, const QString &value ); 51void addModOp( LDAPMod ***pmods, const QString &attr, const QString &value );
53 52
54 53
55ResourceLDAP::ResourceLDAP( const KConfig *config, bool syncable ) 54ResourceLDAP::ResourceLDAP( const KConfig *config )
56 : Resource( config, syncable ), mPort( 389 ), mLdap( 0 ) 55 : Resource( config ), mPort( 389 ), mLdap( 0 )
57{ 56{
58 KConfig *cfg = (KConfig *)config; 57 KConfig *cfg = (KConfig *)config;
59 if ( cfg ) { 58 if ( cfg ) {
60 mUser = cfg->readEntry( "LdapUser" ); 59 mUser = cfg->readEntry( "LdapUser" );
61 mPassword = KStringHandler::obscure( cfg->readEntry( "LdapPassword" ) ); 60 mPassword = KStringHandler::obscure( cfg->readEntry( "LdapPassword" ) );
62 mDn = cfg->readEntry( "LdapDn" ); 61 mDn = cfg->readEntry( "LdapDn" );
diff --git a/kabc/plugins/ldap/resourceldap.h b/kabc/plugins/ldap/resourceldap.h
index 0aad3c1..0625f30 100644
--- a/kabc/plugins/ldap/resourceldap.h
+++ b/kabc/plugins/ldap/resourceldap.h
@@ -40,13 +40,13 @@ class KConfig;
40namespace KABC { 40namespace KABC {
41 41
42class ResourceLDAP : public Resource 42class ResourceLDAP : public Resource
43{ 43{
44public: 44public:
45 45
46 ResourceLDAP( const KConfig*, bool syncable ); 46 ResourceLDAP( const KConfig* );
47 47
48 virtual void writeConfig( KConfig* ); 48 virtual void writeConfig( KConfig* );
49 49
50 virtual bool doOpen(); 50 virtual bool doOpen();
51 virtual void doClose(); 51 virtual void doClose();
52 52
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp
index 22237dc..f610b38 100644
--- a/kabc/plugins/opie/resourceopie.cpp
+++ b/kabc/plugins/opie/resourceopie.cpp
@@ -47,43 +47,42 @@ $Id$
47 47
48#include <opie/ocontactaccess.h> 48#include <opie/ocontactaccess.h>
49#include <opie/ocontactaccessbackend_xml.h> 49#include <opie/ocontactaccessbackend_xml.h>
50 50
51#include "resourceopieconfig.h" 51#include "resourceopieconfig.h"
52#include "stdaddressbook.h" 52#include "stdaddressbook.h"
53#include "syncprefwidget.h"
54 53
55#include "opieconverter.h" 54#include "opieconverter.h"
56 55
57#include "resourceopie.h" 56#include "resourceopie.h"
58 57
59using namespace KABC; 58using namespace KABC;
60extern "C" 59extern "C"
61{ 60{
62 void *init_microkabc_opie() 61 void *init_microkabc_opie()
63 { 62 {
64 return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig, SyncPrefWidgetContainer>(); 63 return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig>();
65 } 64 }
66} 65}
67 66
68ResourceOpie::ResourceOpie( const KConfig *config, bool syncable ) 67ResourceOpie::ResourceOpie( const KConfig *config )
69 : Resource( config, syncable ), mAccess(0), mConverter (0) 68 : Resource( config ), mAccess(0), mConverter (0)
70{ 69{
71 QString fileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml"; 70 QString fileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml";
72 71
73 KConfig *cfg = (KConfig *)config; 72 KConfig *cfg = (KConfig *)config;
74 if ( cfg ) { 73 if ( cfg ) {
75 fileName = cfg->readEntry( "FileName", fileName ); 74 fileName = cfg->readEntry( "FileName", fileName );
76 75
77 } 76 }
78 77
79 init( fileName ); 78 init( fileName );
80} 79}
81 80
82ResourceOpie::ResourceOpie( const QString &fileName, bool syncable ) 81ResourceOpie::ResourceOpie( const QString &fileName )
83 : Resource( 0, syncable ) 82 : Resource( 0 )
84{ 83{
85 init( fileName ); 84 init( fileName );
86} 85}
87 86
88void ResourceOpie::init( const QString &fileName ) 87void ResourceOpie::init( const QString &fileName )
89{ 88{
diff --git a/kabc/plugins/opie/resourceopie.h b/kabc/plugins/opie/resourceopie.h
index d5b4ebd..9d05c70 100644
--- a/kabc/plugins/opie/resourceopie.h
+++ b/kabc/plugins/opie/resourceopie.h
@@ -54,18 +54,18 @@ public:
54 54
55 /** 55 /**
56 Constructor. 56 Constructor.
57 57
58 @param cfg The config object where custom resource settings are stored. 58 @param cfg The config object where custom resource settings are stored.
59 */ 59 */
60 ResourceOpie( const KConfig *cfg, bool syncable ); 60 ResourceOpie( const KConfig *cfg );
61 61
62 /** 62 /**
63 Construct file resource on file @arg fileName using format @arg formatName. 63 Construct file resource on file @arg fileName using format @arg formatName.
64 */ 64 */
65 ResourceOpie( const QString &fileName, bool syncable ); 65 ResourceOpie( const QString &fileName );
66 66
67 /** 67 /**
68 * Destructor. 68 * Destructor.
69 */ 69 */
70 ~ResourceOpie(); 70 ~ResourceOpie();
71 71
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp
index f9cabcb..deb218b 100644
--- a/kabc/plugins/qtopia/resourceqtopia.cpp
+++ b/kabc/plugins/qtopia/resourceqtopia.cpp
@@ -46,35 +46,34 @@ $Id$
46 46
47 47
48#include "resourceqtopiaconfig.h" 48#include "resourceqtopiaconfig.h"
49#include "stdaddressbook.h" 49#include "stdaddressbook.h"
50 50
51#include "qtopiaconverter.h" 51#include "qtopiaconverter.h"
52#include "syncprefwidget.h"
53 52
54#include "resourceqtopia.h" 53#include "resourceqtopia.h"
55 54
56using namespace KABC; 55using namespace KABC;
57extern "C" 56extern "C"
58{ 57{
59 void *init_microkabc_qtopia() 58 void *init_microkabc_qtopia()
60 { 59 {
61 return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig, SyncPrefWidgetContainer>(); 60 return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig>();
62 } 61 }
63} 62}
64 63
65ResourceQtopia::ResourceQtopia( const KConfig *config, bool syncable ) 64ResourceQtopia::ResourceQtopia( const KConfig *config )
66 : Resource( config, syncable ), mConverter (0) 65 : Resource( config ), mConverter (0)
67{ 66{
68 // we can not choose the filename. Therefore use the default to display 67 // we can not choose the filename. Therefore use the default to display
69 QString fileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml"; 68 QString fileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml";
70 init( fileName ); 69 init( fileName );
71} 70}
72 71
73ResourceQtopia::ResourceQtopia( const QString &fileName, bool syncable ) 72ResourceQtopia::ResourceQtopia( const QString &fileName )
74 : Resource( 0, syncable ) 73 : Resource( 0 )
75{ 74{
76 init( fileName ); 75 init( fileName );
77} 76}
78 77
79void ResourceQtopia::init( const QString &fileName ) 78void ResourceQtopia::init( const QString &fileName )
80{ 79{
diff --git a/kabc/plugins/qtopia/resourceqtopia.h b/kabc/plugins/qtopia/resourceqtopia.h
index eace280..ff6350d 100644
--- a/kabc/plugins/qtopia/resourceqtopia.h
+++ b/kabc/plugins/qtopia/resourceqtopia.h
@@ -55,18 +55,18 @@ public:
55 55
56 /** 56 /**
57 Constructor. 57 Constructor.
58 58
59 @param cfg The config object where custom resource settings are stored. 59 @param cfg The config object where custom resource settings are stored.
60 */ 60 */
61 ResourceQtopia( const KConfig *cfg, bool syncable ); 61 ResourceQtopia( const KConfig *cfg );
62 62
63 /** 63 /**
64 Construct file resource on file @arg fileName using format @arg formatName. 64 Construct file resource on file @arg fileName using format @arg formatName.
65 */ 65 */
66 ResourceQtopia( const QString &fileName, bool syncable ); 66 ResourceQtopia( const QString &fileName );
67 67
68 /** 68 /**
69 * Destructor. 69 * Destructor.
70 */ 70 */
71 ~ResourceQtopia(); 71 ~ResourceQtopia();
72 72
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
index c013f52..2cdf4bf 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
@@ -47,29 +47,27 @@ $Id$
47 47
48#include <libkdepim/ksyncprofile.h> 48#include <libkdepim/ksyncprofile.h>
49 49
50#include "resourcesharpdtmconfig.h" 50#include "resourcesharpdtmconfig.h"
51#include "resourcesharpdtm.h" 51#include "resourcesharpdtm.h"
52 52
53#include "syncprefwidget.h"
54
55#include "stdaddressbook.h" 53#include "stdaddressbook.h"
56 54
57#include "sharpdtmconverter.h" 55#include "sharpdtmconverter.h"
58//#define ALLOW_LOCKING 56//#define ALLOW_LOCKING
59using namespace KABC; 57using namespace KABC;
60extern "C" 58extern "C"
61{ 59{
62 void *init_microkabc_sharpdtm() 60 void *init_microkabc_sharpdtm()
63 { 61 {
64 return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig,SyncPrefWidgetContainer>(); 62 return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig>();
65 } 63 }
66} 64}
67 65
68ResourceSharpDTM::ResourceSharpDTM( const KConfig *config, bool syncable ) 66ResourceSharpDTM::ResourceSharpDTM( const KConfig *config )
69 : Resource( config, syncable ), mConverter (0) 67 : Resource( config ), mConverter (0)
70{ 68{
71 // we can not choose the filename. Therefore use the default to display 69 // we can not choose the filename. Therefore use the default to display
72 70
73 QString fileName = SlZDataBase::addressbookFileName(); 71 QString fileName = SlZDataBase::addressbookFileName();
74 init( fileName ); 72 init( fileName );
75} 73}
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.h b/kabc/plugins/sharpdtm/resourcesharpdtm.h
index f386e69..64d06f9 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.h
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.h
@@ -55,18 +55,18 @@ public:
55 55
56 /** 56 /**
57 Constructor. 57 Constructor.
58 58
59 @param cfg The config object where custom resource settings are stored. 59 @param cfg The config object where custom resource settings are stored.
60 */ 60 */
61 ResourceSharpDTM( const KConfig *cfg, bool syncable ); 61 ResourceSharpDTM( const KConfig *cfg );
62 62
63 /** 63 /**
64 Construct file resource on file @arg fileName using format @arg formatName. 64 Construct file resource on file @arg fileName using format @arg formatName.
65 */ 65 */
66 ResourceSharpDTM( const QString &fileName, bool syncable ); 66 ResourceSharpDTM( const QString &fileName );
67 67
68 /** 68 /**
69 * Destructor. 69 * Destructor.
70 */ 70 */
71 ~ResourceSharpDTM(); 71 ~ResourceSharpDTM();
72 72