31 #ifndef _KPIM_IDENTITYMANAGER_H_
32 #define _KPIM_IDENTITYMANAGER_H_
34 #include <libtdepim/configmanager.h>
36 #include <tqvaluelist.h>
37 #include <dcopobject.h>
38 #include <tdemacros.h>
53 #define IdentityManager TDE_EXPORT IdentityManager
54 class IdentityManager :
public ConfigManager,
public DCOPObject
55 #undef IdentityManager
69 IdentityManager(
bool readonly =
false, TQObject * parent=0,
const char * name=0 );
70 virtual ~IdentityManager();
73 typedef TQValueList<Identity>::Iterator Iterator;
74 typedef TQValueList<Identity>::ConstIterator ConstIterator;
82 bool hasPendingChanges()
const;
85 TQStringList identities()
const;
92 TQStringList shadowIdentities()
const;
103 const Identity & identityForAddress(
const TQString & addresses )
const;
109 bool thatIsMe(
const TQString & addressList )
const;
115 const Identity & identityForName(
const TQString & identityName )
const;
120 const Identity & identityForUoid( uint uoid )
const;
128 const Identity & identityForNameOrDefault(
const TQString & identityName )
const;
135 const Identity & identityForUoidOrDefault( uint uoid )
const;
138 const Identity & defaultIdentity()
const;
146 bool setAsDefault(
const TQString & identityName );
154 bool setAsDefault( uint uoid );
160 Identity & modifyIdentityForName(
const TQString & identityName );
166 Identity & modifyIdentityForUoid( uint uoid );
169 bool removeIdentity(
const TQString & identityName );
171 ConstIterator begin()
const;
172 ConstIterator end()
const;
175 Iterator modifyBegin();
176 Iterator modifyEnd();
178 Identity & newFromScratch(
const TQString & name );
179 Identity & newFromControlCenter(
const TQString & name );
180 Identity & newFromExisting(
const Identity & other,
181 const TQString & name=TQString() );
184 TQStringList allEmails()
const;
191 void changed( uint uoid );
199 void deleted( uint uoid );
209 virtual void createDefaultIdentity( TQString& , TQString& ) {}
212 void slotRollback() { rollback(); };
216 TQValueList<Identity> mIdentities;
218 TQValueList<Identity> mShadowIdentities;
225 void slotIdentitiesChanged( TQCString appId, TQCString objId );
228 void writeConfig()
const;
229 void readConfig(TDEConfigBase* config);
230 TQStringList groupList(TDEConfigBase* config)
const;
231 void createDefaultIdentity();
User identity information.