|
|
@ -191,7 +191,7 @@ bool ResourceXMLRPC::doOpen()
|
|
|
|
mServer->setUrl( KURL( mPrefs->url() ) );
|
|
|
|
mServer->setUrl( KURL( mPrefs->url() ) );
|
|
|
|
mServer->setUserAgent( "KDE-Calendar" );
|
|
|
|
mServer->setUserAgent( "KDE-Calendar" );
|
|
|
|
|
|
|
|
|
|
|
|
TQMap<TQString, TQVariant> args;
|
|
|
|
TQStringVariantMap args;
|
|
|
|
args.insert( "domain", mPrefs->domain() );
|
|
|
|
args.insert( "domain", mPrefs->domain() );
|
|
|
|
args.insert( "username", mPrefs->user() );
|
|
|
|
args.insert( "username", mPrefs->user() );
|
|
|
|
args.insert( "password", mPrefs->password() );
|
|
|
|
args.insert( "password", mPrefs->password() );
|
|
|
@ -209,7 +209,7 @@ void ResourceXMLRPC::doClose()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug(5800) << "ResourceXMLRPC::doClose()" << endl;
|
|
|
|
kdDebug(5800) << "ResourceXMLRPC::doClose()" << endl;
|
|
|
|
|
|
|
|
|
|
|
|
TQMap<TQString, TQVariant> args;
|
|
|
|
TQStringVariantMap args;
|
|
|
|
args.insert( "sessionid", mSessionID );
|
|
|
|
args.insert( "sessionid", mSessionID );
|
|
|
|
args.insert( "kp3", mKp3 );
|
|
|
|
args.insert( "kp3", mKp3 );
|
|
|
|
|
|
|
|
|
|
|
@ -238,7 +238,7 @@ bool ResourceXMLRPC::doLoad()
|
|
|
|
mTodoStateMapper.setIdentifier( type() + "_" + identifier() );
|
|
|
|
mTodoStateMapper.setIdentifier( type() + "_" + identifier() );
|
|
|
|
mTodoStateMapper.load();
|
|
|
|
mTodoStateMapper.load();
|
|
|
|
|
|
|
|
|
|
|
|
TQMap<TQString, TQVariant> args, columns;
|
|
|
|
TQStringVariantMap args, columns;
|
|
|
|
args.insert( "start", TQDateTime( TQDate::currentDate().addDays( -12 ) ) );
|
|
|
|
args.insert( "start", TQDateTime( TQDate::currentDate().addDays( -12 ) ) );
|
|
|
|
args.insert( "end", TQDateTime( TQDate::currentDate().addDays( 2000 ) ) );
|
|
|
|
args.insert( "end", TQDateTime( TQDate::currentDate().addDays( 2000 ) ) );
|
|
|
|
|
|
|
|
|
|
|
@ -256,7 +256,7 @@ bool ResourceXMLRPC::doLoad()
|
|
|
|
this, TQT_SLOT( listTodosFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
|
|
|
|
this, TQT_SLOT( listTodosFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
|
|
|
|
this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
|
|
|
|
this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
mServer->call( LoadEventCategoriesCommand, TQVariant( TQMap<TQString, TQVariant>() ),
|
|
|
|
mServer->call( LoadEventCategoriesCommand, TQVariant( TQStringVariantMap() ),
|
|
|
|
this, TQT_SLOT( loadEventCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
|
|
|
|
this, TQT_SLOT( loadEventCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
|
|
|
|
this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
|
|
|
|
this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
|
|
|
|
|
|
|
|
|
|
|
@ -281,7 +281,7 @@ bool ResourceXMLRPC::doSave()
|
|
|
|
uint counter = 0;
|
|
|
|
uint counter = 0;
|
|
|
|
for ( evIt = events.begin(); evIt != events.end(); ++evIt ) {
|
|
|
|
for ( evIt = events.begin(); evIt != events.end(); ++evIt ) {
|
|
|
|
if ( !(*evIt)->isReadOnly() ) {
|
|
|
|
if ( !(*evIt)->isReadOnly() ) {
|
|
|
|
TQMap<TQString, TQVariant> args;
|
|
|
|
TQStringVariantMap args;
|
|
|
|
writeEvent( (*evIt), args );
|
|
|
|
writeEvent( (*evIt), args );
|
|
|
|
|
|
|
|
|
|
|
|
args.insert( "id", idMapper().remoteId( (*evIt)->uid() ).toInt() );
|
|
|
|
args.insert( "id", idMapper().remoteId( (*evIt)->uid() ).toInt() );
|
|
|
@ -297,7 +297,7 @@ bool ResourceXMLRPC::doSave()
|
|
|
|
|
|
|
|
|
|
|
|
for ( todoIt = todos.begin(); todoIt != todos.end(); ++todoIt ) {
|
|
|
|
for ( todoIt = todos.begin(); todoIt != todos.end(); ++todoIt ) {
|
|
|
|
if ( !(*todoIt)->isReadOnly() ) {
|
|
|
|
if ( !(*todoIt)->isReadOnly() ) {
|
|
|
|
TQMap<TQString, TQVariant> args;
|
|
|
|
TQStringVariantMap args;
|
|
|
|
writeTodo( (*todoIt), args );
|
|
|
|
writeTodo( (*todoIt), args );
|
|
|
|
|
|
|
|
|
|
|
|
args.insert( "id", idMapper().remoteId( (*todoIt)->uid() ).toInt() );
|
|
|
|
args.insert( "id", idMapper().remoteId( (*todoIt)->uid() ).toInt() );
|
|
|
@ -329,7 +329,7 @@ TDEABC::Lock *ResourceXMLRPC::lock()
|
|
|
|
|
|
|
|
|
|
|
|
bool ResourceXMLRPC::addEvent( Event* ev )
|
|
|
|
bool ResourceXMLRPC::addEvent( Event* ev )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQMap<TQString, TQVariant> args;
|
|
|
|
TQStringVariantMap args;
|
|
|
|
|
|
|
|
|
|
|
|
disableChangeNotification();
|
|
|
|
disableChangeNotification();
|
|
|
|
|
|
|
|
|
|
|
@ -409,7 +409,7 @@ Event::List ResourceXMLRPC::rawEvents()
|
|
|
|
|
|
|
|
|
|
|
|
bool ResourceXMLRPC::addTodo( Todo *todo )
|
|
|
|
bool ResourceXMLRPC::addTodo( Todo *todo )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQMap<TQString, TQVariant> args;
|
|
|
|
TQStringVariantMap args;
|
|
|
|
|
|
|
|
|
|
|
|
disableChangeNotification();
|
|
|
|
disableChangeNotification();
|
|
|
|
|
|
|
|
|
|
|
@ -516,7 +516,7 @@ void ResourceXMLRPC::reload()
|
|
|
|
void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
|
|
|
|
void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
|
|
|
|
const TQVariant& )
|
|
|
|
const TQVariant& )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQMap<TQString, TQVariant> map = variant[ 0 ].toMap();
|
|
|
|
TQStringVariantMap map = variant[ 0 ].toMap();
|
|
|
|
|
|
|
|
|
|
|
|
KURL url = KURL( mPrefs->url() );
|
|
|
|
KURL url = KURL( mPrefs->url() );
|
|
|
|
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
|
|
|
|
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
|
|
|
@ -536,7 +536,7 @@ void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
|
|
|
|
void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant,
|
|
|
|
void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant,
|
|
|
|
const TQVariant& )
|
|
|
|
const TQVariant& )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQMap<TQString, TQVariant> map = variant[ 0 ].toMap();
|
|
|
|
TQStringVariantMap map = variant[ 0 ].toMap();
|
|
|
|
|
|
|
|
|
|
|
|
if ( map[ "GOODBYE" ].toString() != "XOXO" )
|
|
|
|
if ( map[ "GOODBYE" ].toString() != "XOXO" )
|
|
|
|
kdError() << "logout failed" << endl;
|
|
|
|
kdError() << "logout failed" << endl;
|
|
|
@ -562,7 +562,7 @@ void ResourceXMLRPC::listEventsFinished( const TQValueList<TQVariant>& list,
|
|
|
|
|
|
|
|
|
|
|
|
bool changed = false;
|
|
|
|
bool changed = false;
|
|
|
|
for ( eventIt = eventList.begin(); eventIt != eventList.end(); ++eventIt ) {
|
|
|
|
for ( eventIt = eventList.begin(); eventIt != eventList.end(); ++eventIt ) {
|
|
|
|
TQMap<TQString, TQVariant> map = (*eventIt).toMap();
|
|
|
|
TQStringVariantMap map = (*eventIt).toMap();
|
|
|
|
|
|
|
|
|
|
|
|
Event *event = new Event;
|
|
|
|
Event *event = new Event;
|
|
|
|
event->setFloats( false );
|
|
|
|
event->setFloats( false );
|
|
|
@ -644,8 +644,8 @@ void ResourceXMLRPC::loadEventCategoriesFinished( const TQValueList<TQVariant> &
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mEventCategoryMap.clear();
|
|
|
|
mEventCategoryMap.clear();
|
|
|
|
|
|
|
|
|
|
|
|
const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap();
|
|
|
|
const TQStringVariantMap map = mapList[ 0 ].toMap();
|
|
|
|
TQMap<TQString, TQVariant>::ConstIterator it;
|
|
|
|
TQStringVariantMap::ConstIterator it;
|
|
|
|
|
|
|
|
|
|
|
|
KPimPrefs prefs( "korganizerrc" );
|
|
|
|
KPimPrefs prefs( "korganizerrc" );
|
|
|
|
for ( it = map.begin(); it != map.end(); ++it ) {
|
|
|
|
for ( it = map.begin(); it != map.end(); ++it ) {
|
|
|
@ -673,7 +673,7 @@ void ResourceXMLRPC::listTodosFinished( const TQValueList<TQVariant>& list,
|
|
|
|
|
|
|
|
|
|
|
|
bool changed = false;
|
|
|
|
bool changed = false;
|
|
|
|
for ( todoIt = todoList.begin(); todoIt != todoList.end(); ++todoIt ) {
|
|
|
|
for ( todoIt = todoList.begin(); todoIt != todoList.end(); ++todoIt ) {
|
|
|
|
TQMap<TQString, TQVariant> map = (*todoIt).toMap();
|
|
|
|
TQStringVariantMap map = (*todoIt).toMap();
|
|
|
|
|
|
|
|
|
|
|
|
Todo *todo = new Todo;
|
|
|
|
Todo *todo = new Todo;
|
|
|
|
|
|
|
|
|
|
|
@ -749,8 +749,8 @@ void ResourceXMLRPC::loadTodoCategoriesFinished( const TQValueList<TQVariant> &m
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mTodoCategoryMap.clear();
|
|
|
|
mTodoCategoryMap.clear();
|
|
|
|
|
|
|
|
|
|
|
|
const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap();
|
|
|
|
const TQStringVariantMap map = mapList[ 0 ].toMap();
|
|
|
|
TQMap<TQString, TQVariant>::ConstIterator it;
|
|
|
|
TQStringVariantMap::ConstIterator it;
|
|
|
|
|
|
|
|
|
|
|
|
KPimPrefs prefs( "korganizerrc" );
|
|
|
|
KPimPrefs prefs( "korganizerrc" );
|
|
|
|
for ( it = map.begin(); it != map.end(); ++it ) {
|
|
|
|
for ( it = map.begin(); it != map.end(); ++it ) {
|
|
|
@ -773,7 +773,7 @@ void ResourceXMLRPC::fault( int error, const TQString& errorMsg,
|
|
|
|
mSynchronizer->stop();
|
|
|
|
mSynchronizer->stop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *event,
|
|
|
|
void ResourceXMLRPC::readEvent( const TQStringVariantMap &args, Event *event,
|
|
|
|
TQString &uid )
|
|
|
|
TQString &uid )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// for recurrence
|
|
|
|
// for recurrence
|
|
|
@ -784,7 +784,7 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
|
|
|
|
TQDateTime rEndDate;
|
|
|
|
TQDateTime rEndDate;
|
|
|
|
TQValueList<TQDateTime> rExceptions;
|
|
|
|
TQValueList<TQDateTime> rExceptions;
|
|
|
|
|
|
|
|
|
|
|
|
TQMap<TQString, TQVariant>::ConstIterator it;
|
|
|
|
TQStringVariantMap::ConstIterator it;
|
|
|
|
for ( it = args.begin(); it != args.end(); ++it ) {
|
|
|
|
for ( it = args.begin(); it != args.end(); ++it ) {
|
|
|
|
if ( it.key() == "id" ) {
|
|
|
|
if ( it.key() == "id" ) {
|
|
|
|
uid = it.data().toString();
|
|
|
|
uid = it.data().toString();
|
|
|
@ -816,8 +816,8 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
|
|
|
|
event->setSecrecy( (it.data().toString() == "public" ?
|
|
|
|
event->setSecrecy( (it.data().toString() == "public" ?
|
|
|
|
Incidence::SecrecyPublic : Incidence::SecrecyPrivate) );
|
|
|
|
Incidence::SecrecyPublic : Incidence::SecrecyPrivate) );
|
|
|
|
} else if ( it.key() == "category" ) {
|
|
|
|
} else if ( it.key() == "category" ) {
|
|
|
|
const TQMap<TQString, TQVariant> categories = it.data().toMap();
|
|
|
|
const TQStringVariantMap categories = it.data().toMap();
|
|
|
|
TQMap<TQString, TQVariant>::ConstIterator catIt;
|
|
|
|
TQStringVariantMap::ConstIterator catIt;
|
|
|
|
|
|
|
|
|
|
|
|
TQStringList eventCategories;
|
|
|
|
TQStringList eventCategories;
|
|
|
|
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
|
|
|
|
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
|
|
|
@ -850,17 +850,17 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
|
|
|
|
} else if ( it.key() == "recur_data" ) {
|
|
|
|
} else if ( it.key() == "recur_data" ) {
|
|
|
|
rData = it.data().toInt();
|
|
|
|
rData = it.data().toInt();
|
|
|
|
} else if ( it.key() == "recur_exception" ) {
|
|
|
|
} else if ( it.key() == "recur_exception" ) {
|
|
|
|
const TQMap<TQString, TQVariant> dateList = it.data().toMap();
|
|
|
|
const TQStringVariantMap dateList = it.data().toMap();
|
|
|
|
TQMap<TQString, TQVariant>::ConstIterator dateIt;
|
|
|
|
TQStringVariantMap::ConstIterator dateIt;
|
|
|
|
|
|
|
|
|
|
|
|
for ( dateIt = dateList.begin(); dateIt != dateList.end(); ++dateIt )
|
|
|
|
for ( dateIt = dateList.begin(); dateIt != dateList.end(); ++dateIt )
|
|
|
|
rExceptions.append( (*dateIt).toDateTime() );
|
|
|
|
rExceptions.append( (*dateIt).toDateTime() );
|
|
|
|
} else if ( it.key() == "participants" ) {
|
|
|
|
} else if ( it.key() == "participants" ) {
|
|
|
|
const TQMap<TQString, TQVariant> persons = it.data().toMap();
|
|
|
|
const TQStringVariantMap persons = it.data().toMap();
|
|
|
|
TQMap<TQString, TQVariant>::ConstIterator personsIt;
|
|
|
|
TQStringVariantMap::ConstIterator personsIt;
|
|
|
|
|
|
|
|
|
|
|
|
for ( personsIt = persons.begin(); personsIt != persons.end(); ++personsIt ) {
|
|
|
|
for ( personsIt = persons.begin(); personsIt != persons.end(); ++personsIt ) {
|
|
|
|
TQMap<TQString, TQVariant> person = (*personsIt).toMap();
|
|
|
|
TQStringVariantMap person = (*personsIt).toMap();
|
|
|
|
Attendee::PartStat status = Attendee::InProcess;
|
|
|
|
Attendee::PartStat status = Attendee::InProcess;
|
|
|
|
if ( person[ "status" ] == "A" )
|
|
|
|
if ( person[ "status" ] == "A" )
|
|
|
|
status = Attendee::Accepted;
|
|
|
|
status = Attendee::Accepted;
|
|
|
@ -878,11 +878,11 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
|
|
|
|
event->addAttendee( attendee );
|
|
|
|
event->addAttendee( attendee );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if ( it.key() == "alarm" ) {
|
|
|
|
} else if ( it.key() == "alarm" ) {
|
|
|
|
const TQMap<TQString, TQVariant> alarmList = it.data().toMap();
|
|
|
|
const TQStringVariantMap alarmList = it.data().toMap();
|
|
|
|
TQMap<TQString, TQVariant>::ConstIterator alarmIt;
|
|
|
|
TQStringVariantMap::ConstIterator alarmIt;
|
|
|
|
|
|
|
|
|
|
|
|
for ( alarmIt = alarmList.begin(); alarmIt != alarmList.end(); ++alarmIt ) {
|
|
|
|
for ( alarmIt = alarmList.begin(); alarmIt != alarmList.end(); ++alarmIt ) {
|
|
|
|
TQMap<TQString, TQVariant> alarm = (*alarmIt).toMap();
|
|
|
|
TQStringVariantMap alarm = (*alarmIt).toMap();
|
|
|
|
|
|
|
|
|
|
|
|
Alarm *vAlarm = event->newAlarm();
|
|
|
|
Alarm *vAlarm = event->newAlarm();
|
|
|
|
vAlarm->setText( event->summary() );
|
|
|
|
vAlarm->setText( event->summary() );
|
|
|
@ -940,7 +940,7 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
|
|
|
|
setRights( event, rights );
|
|
|
|
setRights( event, rights );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args )
|
|
|
|
void ResourceXMLRPC::writeEvent( Event *event, TQStringVariantMap &args )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
args.insert( "start", event->dtStart() );
|
|
|
|
args.insert( "start", event->dtStart() );
|
|
|
|
|
|
|
|
|
|
|
@ -961,7 +961,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
|
|
|
|
// CATEGORY
|
|
|
|
// CATEGORY
|
|
|
|
const TQStringList categories = event->categories();
|
|
|
|
const TQStringList categories = event->categories();
|
|
|
|
TQStringList::ConstIterator catIt;
|
|
|
|
TQStringList::ConstIterator catIt;
|
|
|
|
TQMap<TQString, TQVariant> catMap;
|
|
|
|
TQStringVariantMap catMap;
|
|
|
|
int counter = 0;
|
|
|
|
int counter = 0;
|
|
|
|
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
|
|
|
|
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
|
|
|
|
TQMap<TQString, int>::Iterator it = mEventCategoryMap.find( *catIt );
|
|
|
|
TQMap<TQString, int>::Iterator it = mEventCategoryMap.find( *catIt );
|
|
|
@ -990,7 +990,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
|
|
|
|
args.insert( "recur_interval", int( 0 ) );
|
|
|
|
args.insert( "recur_interval", int( 0 ) );
|
|
|
|
args.insert( "recur_enddate", TQDateTime() );
|
|
|
|
args.insert( "recur_enddate", TQDateTime() );
|
|
|
|
args.insert( "recur_data", int( 0 ) );
|
|
|
|
args.insert( "recur_data", int( 0 ) );
|
|
|
|
args.insert( "recur_exception", TQMap<TQString, TQVariant>() );
|
|
|
|
args.insert( "recur_exception", TQStringVariantMap() );
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
switch ( rec->recurrenceType() ) {
|
|
|
|
switch ( rec->recurrenceType() ) {
|
|
|
|
case Recurrence::rDaily:
|
|
|
|
case Recurrence::rDaily:
|
|
|
@ -1036,7 +1036,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
|
|
|
|
// TODO: Also use exception dates!
|
|
|
|
// TODO: Also use exception dates!
|
|
|
|
const TQValueList<TQDateTime> dates = event->recurrence()->exDateTimes();
|
|
|
|
const TQValueList<TQDateTime> dates = event->recurrence()->exDateTimes();
|
|
|
|
TQValueList<TQDateTime>::ConstIterator dateIt;
|
|
|
|
TQValueList<TQDateTime>::ConstIterator dateIt;
|
|
|
|
TQMap<TQString, TQVariant> exMap;
|
|
|
|
TQStringVariantMap exMap;
|
|
|
|
int counter = 0;
|
|
|
|
int counter = 0;
|
|
|
|
for ( dateIt = dates.begin(); dateIt != dates.end(); ++dateIt, ++counter )
|
|
|
|
for ( dateIt = dates.begin(); dateIt != dates.end(); ++dateIt, ++counter )
|
|
|
|
exMap.insert( TQString::number( counter ), *dateIt );
|
|
|
|
exMap.insert( TQString::number( counter ), *dateIt );
|
|
|
@ -1047,9 +1047,9 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
|
|
|
|
// PARTICIPANTS
|
|
|
|
// PARTICIPANTS
|
|
|
|
const Attendee::List attendees = event->attendees();
|
|
|
|
const Attendee::List attendees = event->attendees();
|
|
|
|
Attendee::List::ConstIterator attIt;
|
|
|
|
Attendee::List::ConstIterator attIt;
|
|
|
|
TQMap<TQString, TQVariant> persons;
|
|
|
|
TQStringVariantMap persons;
|
|
|
|
for ( attIt = attendees.begin(); attIt != attendees.end(); ++attIt ) {
|
|
|
|
for ( attIt = attendees.begin(); attIt != attendees.end(); ++attIt ) {
|
|
|
|
TQMap<TQString, TQVariant> person;
|
|
|
|
TQStringVariantMap person;
|
|
|
|
TQString status;
|
|
|
|
TQString status;
|
|
|
|
|
|
|
|
|
|
|
|
if ( (*attIt)->status() == Attendee::Accepted )
|
|
|
|
if ( (*attIt)->status() == Attendee::Accepted )
|
|
|
@ -1072,9 +1072,9 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
|
|
|
|
// ALARMS
|
|
|
|
// ALARMS
|
|
|
|
const Alarm::List alarms = event->alarms();
|
|
|
|
const Alarm::List alarms = event->alarms();
|
|
|
|
Alarm::List::ConstIterator alarmIt;
|
|
|
|
Alarm::List::ConstIterator alarmIt;
|
|
|
|
TQMap<TQString, TQVariant> alarmMap;
|
|
|
|
TQStringVariantMap alarmMap;
|
|
|
|
for ( alarmIt = alarms.begin(); alarmIt != alarms.end(); ++alarmIt ) {
|
|
|
|
for ( alarmIt = alarms.begin(); alarmIt != alarms.end(); ++alarmIt ) {
|
|
|
|
TQMap<TQString, TQVariant> alarm;
|
|
|
|
TQStringVariantMap alarm;
|
|
|
|
alarm.insert( "time", (*alarmIt)->time() );
|
|
|
|
alarm.insert( "time", (*alarmIt)->time() );
|
|
|
|
alarm.insert( "offset", (*alarmIt)->startOffset().asSeconds() );
|
|
|
|
alarm.insert( "offset", (*alarmIt)->startOffset().asSeconds() );
|
|
|
|
alarm.insert( "enabled", ( (*alarmIt)->enabled() ? int( 1 ) : int( 0 ) ) );
|
|
|
|
alarm.insert( "enabled", ( (*alarmIt)->enabled() ? int( 1 ) : int( 0 ) ) );
|
|
|
@ -1085,7 +1085,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
|
|
|
|
args.insert( "alarm", alarmMap );
|
|
|
|
args.insert( "alarm", alarmMap );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args )
|
|
|
|
void ResourceXMLRPC::writeTodo( Todo* todo, TQStringVariantMap& args )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
args.insert( "subject", todo->summary() );
|
|
|
|
args.insert( "subject", todo->summary() );
|
|
|
|
args.insert( "des", todo->description() );
|
|
|
|
args.insert( "des", todo->description() );
|
|
|
@ -1093,7 +1093,7 @@ void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args )
|
|
|
|
(todo->secrecy() == Todo::SecrecyPublic ? "public" : "private" ) );
|
|
|
|
(todo->secrecy() == Todo::SecrecyPublic ? "public" : "private" ) );
|
|
|
|
|
|
|
|
|
|
|
|
// CATEGORIES
|
|
|
|
// CATEGORIES
|
|
|
|
TQMap<TQString, TQVariant> catMap;
|
|
|
|
TQStringVariantMap catMap;
|
|
|
|
|
|
|
|
|
|
|
|
const TQStringList categories = todo->categories();
|
|
|
|
const TQStringList categories = todo->categories();
|
|
|
|
TQStringList::ConstIterator catIt;
|
|
|
|
TQStringList::ConstIterator catIt;
|
|
|
@ -1124,7 +1124,7 @@ void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args )
|
|
|
|
args.insert( "status", status );
|
|
|
|
args.insert( "status", status );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ResourceXMLRPC::readTodo( const TQMap<TQString, TQVariant>& args, Todo *todo, TQString &uid )
|
|
|
|
void ResourceXMLRPC::readTodo( const TQStringVariantMap& args, Todo *todo, TQString &uid )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uid = args[ "id" ].toString();
|
|
|
|
uid = args[ "id" ].toString();
|
|
|
|
|
|
|
|
|
|
|
@ -1141,8 +1141,8 @@ void ResourceXMLRPC::readTodo( const TQMap<TQString, TQVariant>& args, Todo *tod
|
|
|
|
todo->setSecrecy( args[ "access" ].toString() == "public" ? Todo::SecrecyPublic : Todo::SecrecyPrivate );
|
|
|
|
todo->setSecrecy( args[ "access" ].toString() == "public" ? Todo::SecrecyPublic : Todo::SecrecyPrivate );
|
|
|
|
|
|
|
|
|
|
|
|
// CATEGORIES
|
|
|
|
// CATEGORIES
|
|
|
|
const TQMap<TQString, TQVariant> categories = args[ "category" ].toMap();
|
|
|
|
const TQStringVariantMap categories = args[ "category" ].toMap();
|
|
|
|
TQMap<TQString, TQVariant>::ConstIterator it;
|
|
|
|
TQStringVariantMap::ConstIterator it;
|
|
|
|
|
|
|
|
|
|
|
|
TQStringList todoCategories;
|
|
|
|
TQStringList todoCategories;
|
|
|
|
for ( it = categories.begin(); it != categories.end(); ++it ) {
|
|
|
|
for ( it = categories.begin(); it != categories.end(); ++it ) {
|
|
|
|