[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: groupwise_in_anger: kdenetwork/kopete/protocols/groupwise/libgroupwise/tasks
From: Will Stephenson <lists () stevello ! free-online ! co ! uk>
Date: 2004-09-06 18:05:25
Message-ID: 20040906180525.F2612175F () office ! kde ! org
[Download RAW message or body]
CVS commit by wstephens:
Extract user properties as well as the basic details
M +19 -1 getdetailstask.cpp 1.1.2.5
--- kdenetwork/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp #1.1.2.4:1.1.2.5
@@ -33,5 +33,5 @@ void GetDetailsTask::userDNs( const QStr
for ( QStringList::ConstIterator it = userDNs.begin(); it != userDNs.end(); ++it )
{
- lst.append( new Field::SingleField( NM_A_SZ_USERID, 0, NMFIELD_TYPE_UTF8, *it ) );
+ lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_UTF8, *it ) );
}
createTransfer( "getdetails", lst );
@@ -85,4 +85,22 @@ ContactDetails GetDetailsTask::extractUs
if ( ( sf = fields.findSingleField ( NM_A_SZ_MESSAGE_BODY ) ) )
cd.awayMessage = sf->value().toString();
+ Field::MultiField * mf;
+ QMap< QString, QString > propMap;
+ if ( ( mf = fields.findMultiField ( NM_A_FA_INFO_DISPLAY_ARRAY ) ) )
+ {
+ Field::FieldList fl = mf->fields();
+ const Field::FieldListIterator end = fl.end();
+ for ( Field::FieldListIterator it = fl.begin(); it != end; ++it )
+ {
+ Field::SingleField * propField = static_cast<Field::SingleField *>( *it );
+ QString propName = propField->tag();
+ QString propValue = propField->value().toString();
+ propMap.insert( propName, propValue );
+ }
+ }
+ if ( !propMap.empty() )
+ {
+ cd.properties = propMap;
+ }
return cd;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic