smf/smfservermodule/smfcommon/smfcontact.cpp
author cgandhi
Thu, 05 Aug 2010 16:48:48 +0530
changeset 18 013a02bf2bb0
child 25 a180113055cb
permissions -rw-r--r--
pushing changes for common libs and trace messages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     1
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     2
 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     3
 * All rights reserved.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     5
 * under the terms of the "Eclipse Public License v1.0" 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     6
 * which accompanies  this distribution, and is available
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html"
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     8
 *
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     9
 * Initial Contributors:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    10
 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    11
 *
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    12
 * Contributors:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    13
 * Manasij Roy, Nalina Hariharan
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    14
 * 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    15
 * Description:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    16
 * The contact class represents a social contact
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    17
 * Note: This class has dependencies on QtMobility project
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    18
 *
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    19
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    20
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    21
#include <QFile>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    22
#include <QTextStream>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    23
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    24
#include "smfcontact.h"
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    25
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    26
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    27
 * Constructor with default argument
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    28
 * @param aParent The parent object
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    29
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    30
SmfContact::SmfContact( QObject *aParent)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    31
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    32
	Q_UNUSED(aParent);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    33
	d = new SmfContactPrivate;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    34
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    35
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    36
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    37
 * Copy Constructor
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    38
 * @param aOther The reference object
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    39
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    40
SmfContact::SmfContact( const SmfContact &aOther ): d (aOther.d)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    41
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    42
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    43
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    44
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    45
 * Overloaded = operator
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    46
 * @param aOther The reference object
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    47
 * @return The target reference value
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    48
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    49
SmfContact& SmfContact::operator=( const SmfContact &aOther )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    50
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    51
	d->m_details = aOther.d->m_details;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    52
	return *this;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    53
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    54
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    55
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    56
 * Destructor
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    57
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    58
SmfContact::~SmfContact( )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    59
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    60
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    61
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    62
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    63
 * Method to get the available sub fields for contacts.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    64
 * The following are the available sub types of a contact
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    65
 *   QtMobility::QContactAddress		Address;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    66
 *   QtMobility::QContactAnniversary	Anniversary;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    67
 *   QtMobility::QContactAvatar			Avatar;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    68
 *   QtMobility::QContactBirthday		Birthday;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    69
 *   QtMobility::QContactId				ContactId;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    70
 *   QtMobility::QContactEmailAddress	EmailAddress;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    71
 *   QtMobility::QContactGender			Gender;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    72
 *   QtMobility::QContactGeoLocation	Geolocation;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    73
 *   QtMobility::QContactGuid			Guid;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    74
 *   QtMobility::QContactName			Name;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    75
 *   QtMobility::QContactNickname		Nickname;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    76
 *   QtMobility::QContactNote			Note;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    77
 *   QtMobility::QContactOnlineAccount	OnlineAccount;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    78
 *   QtMobility::QContactOrganization	Organization;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    79
 *   QtMobility::QContactPhoneNumber	PhoneNumber;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    80
 *   QtMobility::QContactPresence		Presence;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    81
 *   QtMobility::QContactThumbnail		Thumbnail;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    82
 *   QtMobility::QContactTimestamp		Timestamp;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    83
 *   QtMobility::QContactType			Type;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    84
 *   QtMobility::QContactUrl			Url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    85
 * @return The Available sub fields for this contact
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    86
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    87
QStringList SmfContact::subTypes( ) const
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    88
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    89
	QStringList list = d->m_details.uniqueKeys();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    90
	return list;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    91
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    92
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    93
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    94
 * Method to convert an SmfContact to a QContact
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    95
 * Changes made to the returned QContact will not be reflected 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    96
 * in its parent SmfContact object
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    97
 * @param aContact QContact corresponding to SmfContact 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    98
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    99
void SmfContact::convert( QContact &aContact ) const
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   100
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   101
// TODO:-
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   102
	Q_UNUSED(aContact);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   103
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   104
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   105
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   106
 * Method to get the value of a sub field for this contact
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   107
 * @param aSubType The sub field type 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   108
 * @return The value of the sub field subType
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   109
 * @see subTypes()
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   110
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   111
QVariant SmfContact::value( const QString& aSubType ) const
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   112
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   113
	if(d->m_details.contains(aSubType))
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   114
		return d->m_details.value(aSubType);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   115
	else
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   116
		return QString();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   117
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   118
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   119
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   120
 * Method to set value for a subtype
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   121
 * @param aSubType The subtype string
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   122
 * @param value Thhe value to be set for the subtype
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   123
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   124
void SmfContact::setValue(const QString& aSubType,QVariant& value)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   125
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   126
	d->m_details.insert(aSubType,value);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   127
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   128
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   129
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   130
 * Method for Externalization. Writes the SmfContact object to 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   131
 * the stream and returns a reference to the stream.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   132
 * @param aDataStream Stream to be written
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   133
 * @param aContact The SmfContact object to be externalized
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   134
 * @return reference to the written stream
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   135
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   136
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   137
		const SmfContact& aContact )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   138
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   139
	QContactAddress address = aContact.value("Address").value<QContactAddress>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   140
	aDataStream<<address;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   141
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   142
	QContactAnniversary anniver = aContact.value("Anniversary").value<QContactAnniversary>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   143
	aDataStream<<anniver;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   144
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   145
	QContactAvatar avatar = aContact.value("Avatar").value<QContactAvatar>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   146
	aDataStream<<avatar;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   147
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   148
	QContactBirthday bday = aContact.value("Birthday").value<QContactBirthday>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   149
	aDataStream<<bday;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   150
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   151
	QContactId contactId = aContact.value("ContactId").value<QContactId>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   152
	aDataStream<<contactId;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   153
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   154
	QContactEmailAddress email = aContact.value("EmailAddress").value<QContactEmailAddress>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   155
	aDataStream<<email;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   156
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   157
	QContactGender gender = aContact.value("Gender").value<QContactGender>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   158
	aDataStream<<gender;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   159
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   160
	QContactGeoLocation geoloc = aContact.value("Geolocation").value<QContactGeoLocation>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   161
	aDataStream<<geoloc;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   162
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   163
	QContactGuid guid = aContact.value("Guid").value<QContactGuid>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   164
	aDataStream<<guid;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   165
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   166
	QContactName name = aContact.value("Name").value<QContactName>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   167
	aDataStream<<name;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   168
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   169
	QContactNickname nickname = aContact.value("Nickname").value<QContactNickname>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   170
	aDataStream<<nickname;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   171
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   172
	QContactNote note = aContact.value("Note").value<QContactNote>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   173
	aDataStream<<note;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   174
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   175
	QContactOnlineAccount account = aContact.value("OnlineAccount").value<QContactOnlineAccount>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   176
	aDataStream<<account;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   177
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   178
	QContactOrganization org = aContact.value("Organization").value<QContactOrganization>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   179
	aDataStream<<org;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   180
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   181
	QContactPhoneNumber number = aContact.value("PhoneNumber").value<QContactPhoneNumber>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   182
	aDataStream<<number;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   183
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   184
	QContactPresence presence = aContact.value("Presence").value<QContactPresence>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   185
	aDataStream<<presence;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   186
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   187
	QContactThumbnail thumbnail = aContact.value("Thumbnail").value<QContactThumbnail>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   188
	aDataStream<<thumbnail;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   189
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   190
	QContactTimestamp time = aContact.value("Timestamp").value<QContactTimestamp>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   191
	aDataStream<<time;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   192
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   193
	QContactType type = aContact.value("Type").value<QContactType>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   194
	aDataStream<<type;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   195
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   196
	QContactUrl url = aContact.value("Url").value<QContactUrl>();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   197
	aDataStream<<url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   198
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   199
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   200
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   201
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   202
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   203
 * Method for Internalization. Reads a SmfContact object from 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   204
 * the stream and returns a reference to the stream.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   205
 * @param aDataStream Stream to be read
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   206
 * @param aContact The SmfContact object to be internalized
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   207
 * @return reference to the stream
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   208
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   209
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   210
		SmfContact& aContact )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   211
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   212
	QContactAddress address;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   213
	aDataStream>>address;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   214
	QVariant var1 = QVariant::fromValue(address);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   215
	aContact.setValue("Address",var1);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   216
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   217
	QContactAnniversary anniver;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   218
	aDataStream>>anniver;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   219
	QVariant var2 = QVariant::fromValue(anniver);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   220
	aContact.setValue("Anniversary",var2);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   221
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   222
	QContactAvatar avatar;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   223
	aDataStream>>avatar;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   224
	QVariant var3 = QVariant::fromValue(avatar);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   225
	aContact.setValue("Avatar",var3);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   226
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   227
	QContactBirthday bday;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   228
	aDataStream>>bday;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   229
	QVariant var4 = QVariant::fromValue(bday);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   230
	aContact.setValue("Birthday",var4);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   231
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   232
	QContactId id;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   233
	aDataStream>>id;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   234
	QVariant var5 = QVariant::fromValue(id);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   235
	aContact.setValue("ContactId",var5);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   236
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   237
	QContactEmailAddress email;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   238
	aDataStream>>email;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   239
	QVariant var6 = QVariant::fromValue(email);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   240
	aContact.setValue("EmailAddress",var6);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   241
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   242
	QContactGender gender;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   243
	aDataStream>>gender;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   244
	QVariant var7 = QVariant::fromValue(gender);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   245
	aContact.setValue("Gender",var7);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   246
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   247
	QContactGeoLocation geo;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   248
	aDataStream>>geo;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   249
	QVariant var8 = QVariant::fromValue(geo);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   250
	aContact.setValue("Geolocation",var8);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   251
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   252
	QContactGuid guid;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   253
	aDataStream>>guid;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   254
	QVariant var9 = QVariant::fromValue(guid);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   255
	aContact.setValue("Guid",var9);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   256
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   257
	QContactName name1;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   258
	aDataStream>>name1;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   259
	QVariant var10 = QVariant::fromValue(name1);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   260
	aContact.setValue("Name",var10);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   261
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   262
	QContactNickname nickname;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   263
	aDataStream>>nickname;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   264
	QVariant var11 = QVariant::fromValue(nickname);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   265
	aContact.setValue("Nickname",var11);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   266
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   267
	QContactNote note;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   268
	aDataStream>>note;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   269
	QVariant var12 = QVariant::fromValue(note);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   270
	aContact.setValue("Note",var12);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   271
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   272
	QContactOnlineAccount account;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   273
	aDataStream>>account;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   274
	QVariant var13 = QVariant::fromValue(account);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   275
	aContact.setValue("OnlineAccount",var13);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   276
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   277
	QContactOrganization org;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   278
	aDataStream>>org;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   279
	QVariant var14 = QVariant::fromValue(org);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   280
	aContact.setValue("Organization",var14);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   281
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   282
	QContactPhoneNumber number;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   283
	aDataStream>>number;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   284
	QVariant var15 = QVariant::fromValue(number);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   285
	aContact.setValue("PhoneNumber",var15);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   286
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   287
	QContactPresence presence;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   288
	aDataStream>>presence;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   289
	QVariant var16 = QVariant::fromValue(presence);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   290
	aContact.setValue("Presence",var16);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   291
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   292
	QContactThumbnail thumbnail;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   293
	aDataStream>>thumbnail;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   294
	QVariant var17 = QVariant::fromValue(thumbnail);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   295
	aContact.setValue("Thumbnail",var17);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   296
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   297
	QContactTimestamp time;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   298
	aDataStream>>time;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   299
	QVariant var18 = QVariant::fromValue(time);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   300
	aContact.setValue("Timestamp",var18);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   301
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   302
	QContactType type;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   303
	aDataStream>>type;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   304
	QVariant var19 = QVariant::fromValue(type);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   305
	aContact.setValue("Type",var19);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   306
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   307
	QContactUrl url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   308
	aDataStream>>url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   309
	QVariant var20 = QVariant::fromValue(url);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   310
	aContact.setValue("Url",var20);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   311
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   312
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   313
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   314
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   315
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   316
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   317
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   318
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   319
 * Serialization support for QtMobility::QContactAddress
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   320
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   321
QDataStream& operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   322
		const QContactAddress &aAddress )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   323
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   324
	aDataStream<<aAddress.country();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   325
	aDataStream<<aAddress.locality();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   326
	aDataStream<<aAddress.postOfficeBox();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   327
	aDataStream<<aAddress.postcode();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   328
	aDataStream<<aAddress.region();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   329
	aDataStream<<aAddress.street();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   330
	aDataStream<<aAddress.subTypes();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   331
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   332
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   333
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   334
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   335
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   336
 * Deserialization support for QtMobility::QContactAddress
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   337
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   338
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   339
		QContactAddress &aAddress )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   340
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   341
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   342
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   343
	// First one to be deserialized is country
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   344
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   345
	aAddress.setCountry(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   346
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   347
	// Next one to be deserialized is locality
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   348
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   349
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   350
	aAddress.setLocality(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   351
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   352
	// Next one to be deserialized is postOfficeBox
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   353
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   354
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   355
	aAddress.setPostOfficeBox(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   356
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   357
	// Next one to be deserialized is postCode
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   358
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   359
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   360
	aAddress.setPostcode(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   361
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   362
	// Next one to be deserialized is region
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   363
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   364
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   365
	aAddress.setRegion(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   366
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   367
	// Next one to be deserialized is street
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   368
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   369
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   370
	aAddress.setStreet(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   371
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   372
	// Next one to be deserialized is subtypes
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   373
	QStringList list;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   374
	list.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   375
	aDataStream>>list;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   376
	aAddress.setSubTypes(list);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   377
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   378
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   379
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   380
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   381
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   382
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   383
 * Serialization support for QtMobility::QContactAnniversary
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   384
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   385
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   386
		const QContactAnniversary &aAnniversary )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   387
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   388
	aDataStream<<aAnniversary.calendarId();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   389
	aDataStream<<aAnniversary.event();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   390
	aDataStream<<aAnniversary.originalDate();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   391
	aDataStream<<aAnniversary.subType();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   392
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   393
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   394
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   395
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   396
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   397
 * Deserialization support for QtMobility::QContactAnniversary
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   398
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   399
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   400
		QContactAnniversary &aAnniversary)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   401
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   402
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   403
	QDate date;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   404
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   405
	// First one to be deserialized is calendarId
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   406
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   407
	aAnniversary.setCalendarId(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   408
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   409
	// Next one to be deserialized is event
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   410
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   411
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   412
	aAnniversary.setEvent(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   413
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   414
	// Next one to be deserialized is originalDate
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   415
	aDataStream>>date;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   416
	aAnniversary.setOriginalDate(date);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   417
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   418
	// Next one to be deserialized is subType
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   419
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   420
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   421
	aAnniversary.setSubType(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   422
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   423
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   424
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   425
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   426
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   427
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   428
 * Serialization support for QtMobility::QContactAvatar
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   429
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   430
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   431
	const QContactAvatar &aAvatar )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   432
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   433
	//TODO:- QContactAvatar derives from QContactDetail,so internalization/externalization
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   434
	//for the same should be provided
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   435
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   436
	//Qt mobility introduces API compatibility break
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   437
#ifdef OLDER_QT_MOBILITY
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   438
	aDataStream<<aAvatar.avatar();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   439
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   440
#else
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   441
	aDataStream<<aAvatar.imageUrl();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   442
	aDataStream<<aAvatar.videoUrl();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   443
#endif
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   444
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   445
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   446
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   447
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   448
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   449
 * Deserialization support for QtMobility::QContactAvatar
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   450
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   451
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   452
	QContactAvatar &aAvatar)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   453
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   454
#ifdef OLDER_QT_MOBILITY
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   455
	QString avatarPath;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   456
	aDataStream>>avatarPath;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   457
	aAvatar.setAvatar(avatarPath);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   458
#else
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   459
	QUrl url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   460
	aDataStream>>url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   461
	aAvatar.setImageUrl(url);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   462
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   463
	url.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   464
	aDataStream>>url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   465
	aAvatar.setVideoUrl(url);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   466
#endif
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   467
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   468
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   469
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   470
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   471
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   472
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   473
 * Serialization support for QtMobility::QContactBirthday
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   474
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   475
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   476
	const QContactBirthday &aBirthday )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   477
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   478
	aDataStream<<aBirthday.date();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   479
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   480
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   481
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   482
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   483
 * Deserialization support for QtMobility::QContactBirthday
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   484
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   485
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   486
		QContactBirthday &aBirthday)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   487
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   488
	QDate date;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   489
	aDataStream>>date;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   490
	aBirthday.setDate(date);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   491
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   492
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   493
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   494
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   495
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   496
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   497
 * Serialization support for QtMobility::QContactId
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   498
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   499
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   500
	const QContactId &aContactId )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   501
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   502
	aDataStream<<aContactId.localId();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   503
	aDataStream<<aContactId.managerUri();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   504
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   505
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   506
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   507
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   508
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   509
 * Deserialization support for QtMobility::QContactId
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   510
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   511
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   512
		QContactId &aContactId)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   513
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   514
	QContactLocalId localId;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   515
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   516
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   517
	// First one to be deserialized is localId
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   518
	aDataStream>>localId;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   519
	aContactId.setLocalId(localId);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   520
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   521
	// Next one to be deserialized is managerUri
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   522
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   523
	aContactId.setManagerUri(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   524
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   525
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   526
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   527
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   528
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   529
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   530
 * Serialization support for QtMobility::QContactEmailAddress
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   531
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   532
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   533
	const QContactEmailAddress &aEMail )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   534
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   535
	aDataStream<<aEMail.emailAddress();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   536
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   537
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   538
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   539
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   540
 * Deserialization support for QtMobility::QContactEmailAddress
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   541
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   542
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   543
		QContactEmailAddress &aEMail)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   544
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   545
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   546
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   547
	aEMail.setEmailAddress(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   548
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   549
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   550
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   551
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   552
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   553
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   554
 * Serialization support for QtMobility::QContactGender
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   555
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   556
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   557
	const QContactGender &aGender )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   558
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   559
	aDataStream<<aGender.gender();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   560
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   561
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   562
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   563
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   564
 * Deserialization support for QtMobility::QContactGender
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   565
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   566
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   567
		QContactGender &aGender)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   568
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   569
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   570
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   571
	aGender.setGender(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   572
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   573
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   574
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   575
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   576
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   577
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   578
 * Serialization support for QtMobility::QContactGeoLocation
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   579
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   580
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   581
	const QContactGeoLocation &aGeolocation )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   582
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   583
	aDataStream<<aGeolocation.accuracy();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   584
	aDataStream<<aGeolocation.altitude();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   585
	aDataStream<<aGeolocation.altitudeAccuracy();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   586
	aDataStream<<aGeolocation.heading();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   587
	aDataStream<<aGeolocation.label();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   588
	aDataStream<<aGeolocation.latitude();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   589
	aDataStream<<aGeolocation.longitude();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   590
	aDataStream<<aGeolocation.speed();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   591
	aDataStream<<aGeolocation.timestamp();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   592
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   593
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   594
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   595
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   596
 * Deserialization support for QtMobility::QContactGeoLocation
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   597
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   598
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   599
		QContactGeoLocation &aGeolocation)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   600
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   601
	double val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   602
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   603
	QDateTime date;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   604
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   605
	// First one to be deserialized is accuracy
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   606
	val = 0;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   607
	aDataStream>>val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   608
	aGeolocation.setAccuracy(val);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   609
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   610
	// Next one to be deserialized is altitude
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   611
	val = 0;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   612
	aDataStream>>val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   613
	aGeolocation.setAltitude(val);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   614
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   615
	// Next one to be deserialized is altitudeAccuracy
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   616
	val = 0;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   617
	aDataStream>>val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   618
	aGeolocation.setAltitudeAccuracy(val);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   619
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   620
	// Next one to be deserialized is heading
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   621
	val = 0;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   622
	aDataStream>>val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   623
	aGeolocation.setHeading(val);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   624
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   625
	// First one to be deserialized is label
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   626
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   627
	aGeolocation.setLabel(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   628
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   629
	// Next one to be deserialized is latitude
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   630
	val = 0;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   631
	aDataStream>>val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   632
	aGeolocation.setLatitude(val);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   633
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   634
	// Next one to be deserialized is longitude
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   635
	val = 0;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   636
	aDataStream>>val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   637
	aGeolocation.setLongitude(val);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   638
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   639
	// Next one to be deserialized is speed
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   640
	val = 0;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   641
	aDataStream>>val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   642
	aGeolocation.setSpeed(val);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   643
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   644
	// Next one to be deserialized is timestamp
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   645
	aDataStream>>date;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   646
	aGeolocation.setTimestamp(date);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   647
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   648
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   649
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   650
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   651
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   652
 * Serialization support for QtMobility::QContactGuid
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   653
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   654
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   655
	const QContactGuid &aGuid )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   656
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   657
	aDataStream<<aGuid.guid();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   658
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   659
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   660
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   661
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   662
 * Deserialization support for QtMobility::QContactGuid
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   663
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   664
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   665
		QContactGuid &aGuid)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   666
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   667
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   668
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   669
	aGuid.setGuid(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   670
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   671
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   672
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   673
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   674
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   675
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   676
 * Serialization support for QtMobility::QContactName
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   677
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   678
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   679
		const QContactName &aContact )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   680
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   681
	//Qt mobility introduces API compatibility break
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   682
#ifdef OLDER_QT_MOBILITY
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   683
	aDataStream<<aContact.first();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   684
	aDataStream<<aContact.last();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   685
#else
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   686
	aDataStream<<aContact.customLabel();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   687
	aDataStream<<aContact.firstName();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   688
	aDataStream<<aContact.lastName();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   689
	aDataStream<<aContact.middleName();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   690
	aDataStream<<aContact.prefix();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   691
	aDataStream<<aContact.suffix();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   692
#endif
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   693
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   694
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   695
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   696
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   697
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   698
 * Deserialization support for QtMobility::QContactName
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   699
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   700
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   701
		QContactName &aContact )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   702
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   703
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   704
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   705
	// First one to be deserialized is customlabel
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   706
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   707
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   708
	aContact.setCustomLabel(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   709
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   710
	// Next one to be deserialized is firstname
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   711
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   712
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   713
#ifdef OLDER_QT_MOBILITY
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   714
	aContact.setFirst(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   715
#else
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   716
	aContact.setFirstName(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   717
#endif
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   718
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   719
	// Next one to be deserialized is lastName
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   720
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   721
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   722
#ifdef OLDER_QT_MOBILITY
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   723
	aContact.setLast(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   724
#else
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   725
	aContact.setLastName(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   726
#endif
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   727
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   728
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   729
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   730
	// Next one to be deserialized is middlename
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   731
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   732
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   733
	aContact.setMiddleName(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   734
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   735
	// Next one to be deserialized is prefix
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   736
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   737
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   738
	aContact.setPrefix(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   739
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   740
	// Next one to be deserialized is suffix
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   741
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   742
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   743
	aContact.setSuffix(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   744
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   745
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   746
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   747
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   748
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   749
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   750
 * Serialization support for QtMobility::QContactNickname
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   751
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   752
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   753
	const QContactNickname &aNickname )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   754
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   755
	aDataStream<<aNickname.nickname();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   756
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   757
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   758
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   759
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   760
 * Deserialization support for QtMobility::QContactNickname
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   761
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   762
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   763
		QContactNickname &aNickname)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   764
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   765
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   766
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   767
	aNickname.setNickname(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   768
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   769
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   770
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   771
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   772
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   773
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   774
 * Serialization support for QtMobility::QContactNote
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   775
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   776
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   777
	const QContactNote &aNote )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   778
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   779
	aDataStream<<aNote.note();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   780
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   781
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   782
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   783
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   784
 * Deserialization support for QtMobility::QContactNote
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   785
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   786
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   787
		QContactNote &aNote)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   788
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   789
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   790
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   791
	aNote.setNote(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   792
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   793
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   794
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   795
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   796
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   797
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   798
 * Serialization support for QtMobility::QContactOnlineAccount
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   799
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   800
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   801
	const QContactOnlineAccount &aOnlineAccount )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   802
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   803
	aDataStream<<aOnlineAccount.accountUri();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   804
	aDataStream<<aOnlineAccount.capabilities();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   805
	aDataStream<<aOnlineAccount.serviceProvider();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   806
	aDataStream<<aOnlineAccount.subTypes();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   807
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   808
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   809
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   810
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   811
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   812
 * Deserialization support for QtMobility::QContactOnlineAccount
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   813
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   814
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   815
		QContactOnlineAccount &aOnlineAccount)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   816
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   817
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   818
	QStringList list;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   819
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   820
	// First one to be deserialized is accountUri
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   821
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   822
	aOnlineAccount.setAccountUri(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   823
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   824
	// Next one to be deserialized is capabilities
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   825
	aDataStream>>list;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   826
	aOnlineAccount.setCapabilities(list);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   827
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   828
	// Next one to be deserialized is serviceProvider
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   829
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   830
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   831
	aOnlineAccount.setServiceProvider(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   832
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   833
	// Next one to be deserialized is subTypes
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   834
	list.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   835
	aDataStream>>list;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   836
	aOnlineAccount.setSubTypes(list);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   837
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   838
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   839
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   840
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   841
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   842
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   843
 * Serialization support for QtMobility::QContactOrganization
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   844
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   845
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   846
	const QContactOrganization &aOrganization )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   847
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   848
	aDataStream<<aOrganization.assistantName();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   849
	aDataStream<<aOrganization.department();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   850
	aDataStream<<aOrganization.location();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   851
	aDataStream<<aOrganization.logoUrl();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   852
	aDataStream<<aOrganization.name();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   853
	aDataStream<<aOrganization.role();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   854
	aDataStream<<aOrganization.title();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   855
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   856
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   857
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   858
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   859
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   860
 * Deserialization support for QtMobility::QContactOrganization
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   861
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   862
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   863
		QContactOrganization &aOrganization )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   864
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   865
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   866
	QStringList list;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   867
	QUrl url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   868
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   869
	// First one to be deserialized is assistantName
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   870
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   871
	aOrganization.setAssistantName(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   872
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   873
	// Next one to be deserialized is department
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   874
	aDataStream>>list;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   875
	aOrganization.setDepartment(list);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   876
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   877
	// Next one to be deserialized is location
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   878
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   879
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   880
	aOrganization.setLocation(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   881
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   882
	// Next one to be deserialized is logoUrl
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   883
	aDataStream>>url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   884
	aOrganization.setLogoUrl(url);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   885
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   886
	// Next one to be deserialized is name
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   887
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   888
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   889
	aOrganization.setName(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   890
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   891
	// Next one to be deserialized is role
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   892
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   893
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   894
	aOrganization.setRole(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   895
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   896
	// Next one to be deserialized is title
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   897
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   898
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   899
	aOrganization.setTitle(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   900
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   901
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   902
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   903
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   904
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   905
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   906
 * Serialization support for QtMobility::QContactPhoneNumber
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   907
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   908
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   909
	const QContactPhoneNumber &aPhoneNumber )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   910
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   911
	aDataStream<<aPhoneNumber.number();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   912
	aDataStream<<aPhoneNumber.subTypes();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   913
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   914
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   915
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   916
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   917
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   918
 * Deserialization support for QtMobility::QContactPhoneNumber
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   919
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   920
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   921
		QContactPhoneNumber &aPhoneNumber )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   922
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   923
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   924
	QStringList list;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   925
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   926
	// First one to be deserialized is number
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   927
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   928
	aPhoneNumber.setNumber(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   929
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   930
	// Next one to be deserialized is subTypes
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   931
	aDataStream>>list;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   932
	aPhoneNumber.setSubTypes(list);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   933
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   934
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   935
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   936
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   937
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   938
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   939
 * Serialization support for QtMobility::QContactPresence
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   940
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   941
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   942
	const QContactPresence &aPresence )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   943
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   944
	aDataStream<<aPresence.customMessage();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   945
	aDataStream<<aPresence.nickname();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   946
	aDataStream<<aPresence.presenceState();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   947
	aDataStream<<aPresence.presenceStateImageUrl();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   948
	aDataStream<<aPresence.presenceStateText();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   949
	aDataStream<<aPresence.timestamp();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   950
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   951
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   952
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   953
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   954
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   955
 * Deserialization support for QtMobility::QContactPresence
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   956
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   957
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   958
		QContactPresence &aPresence )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   959
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   960
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   961
	QUrl url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   962
	QDateTime date;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   963
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   964
	// First one to be deserialized is customMessage
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   965
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   966
	aPresence.setCustomMessage(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   967
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   968
	// Next one to be deserialized is nickname
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   969
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   970
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   971
	aPresence.setNickname(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   972
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   973
	// Next one to be deserialized is presenceState
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   974
	int val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   975
	aDataStream>>val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   976
	QContactPresence::PresenceState state = (QContactPresence::PresenceState)val;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   977
	aPresence.setPresenceState(state);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   978
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   979
	// Next one to be deserialized is presenceStateImageUrl
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   980
	aDataStream>>url;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   981
	aPresence.setPresenceStateImageUrl(url);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   982
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   983
	// Next one to be deserialized is presenceStateText
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   984
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   985
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   986
	aPresence.setPresenceStateText(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   987
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   988
	// Next one to be deserialized is timestamp
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   989
	aDataStream>>date;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   990
	aPresence.setTimestamp(date);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   991
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   992
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   993
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   994
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   995
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   996
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   997
 * Serialization support for QtMobility::QContactThumbnail
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   998
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   999
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1000
	const QContactThumbnail &aThumbnail )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1001
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1002
	aDataStream<<aThumbnail.thumbnail();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1003
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1004
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1005
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1006
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1007
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1008
 * Deserialization support for QtMobility::QContactThumbnail
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1009
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1010
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1011
		QContactThumbnail &aThumbnail )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1012
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1013
	QImage image;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1014
	aDataStream>>image;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1015
	aThumbnail.setThumbnail(image);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1016
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1017
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1018
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1019
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1020
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1021
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1022
 * Serialization support for QtMobility::QContactTimestamp
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1023
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1024
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1025
	const QContactTimestamp &aTimestamp )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1026
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1027
	aDataStream<<aTimestamp.created();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1028
	aDataStream<<aTimestamp.lastModified();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1029
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1030
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1031
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1032
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1033
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1034
 * Deserialization support for QtMobility::QContactTimestamp
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1035
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1036
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1037
		QContactTimestamp &aTimestamp )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1038
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1039
	QDateTime date1, date2;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1040
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1041
	// First one to be deserialized is created
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1042
	aDataStream>>date1;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1043
	aTimestamp.setCreated(date1);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1044
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1045
	// Next one to be deserialized is lastModified
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1046
	aDataStream>>date2;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1047
	aTimestamp.setLastModified(date2);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1048
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1049
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1050
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1051
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1052
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1053
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1054
 * Serialization support for QtMobility::QContactType
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1055
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1056
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1057
	const QContactType &aType )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1058
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1059
	aDataStream<<aType.type();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1060
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1061
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1062
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1063
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1064
 * Deserialization support for QtMobility::QContactType
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1065
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1066
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1067
		QContactType &aType )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1068
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1069
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1070
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1071
	aType.setType(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1072
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1073
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1074
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1075
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1076
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1077
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1078
 * Serialization support for QtMobility::QContactUrl
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1079
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1080
QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1081
	const QContactUrl &aUrl )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1082
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1083
	aDataStream<<aUrl.subType();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1084
	aDataStream<<aUrl.url();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1085
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1086
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1087
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1088
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1089
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1090
 * Deserialization support for QtMobility::QContactUrl
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1091
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1092
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1093
		QContactUrl &aUrl)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1094
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1095
	QString str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1096
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1097
	// First one to be deserialized is subType
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1098
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1099
	aUrl.setSubType(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1100
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1101
	// Next one to be deserialized is url
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1102
	str.clear();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1103
	aDataStream>>str;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1104
	aUrl.setUrl(str);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1105
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1106
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1107
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
  1108