2 #include "exchangeitadaptor.h"
4 #define EXCHANGEIT_GCONF_DIR "/apps/evolution-exchangeit"
6 ExchangeItAdaptor::ExchangeItAdaptor(WvStringParm _key
, WvStringParm _path
,
7 const bool _local
, const UniConf
&parent
) :
14 may_have_local_only_items(true),
15 log("ExchangeItAdaptor", WvLog::Debug1
)
17 version
= state
["version"].getmeint();
18 log("ExchangeItAdaptor created with key: %s\n and version: %s", key
.cstr(), version
);
21 void ExchangeItAdaptor::set_version(const uint32_t _version
)
24 state
["version"].setmeint(version
);
27 void ExchangeItAdaptor::set_key(WvStringParm _key
)
30 state
= state
.parent()[key
];
33 const bool ExchangeItAdaptor::sync_local_items()
36 may_have_local_only_items
= false;
40 WvStringList
* ExchangeItAdaptor::get_item_uids(WvStringParm type
)
43 return get_all_uids();
45 WvStringList
* item_uids
= new WvStringList();
46 UniConf key
= state
[type
];
49 for(i
.rewind();i
.next();)
51 item_uids
->append(i().key().printable());
57 void ExchangeItAdaptor::remove_uid_from_list(WvStringParm uid
, WvStringParm list_type
)
59 state
[list_type
][uid
].remove();