smf/smfservermodule/smfcommon/smfurl.cpp
author cgandhi
Thu, 23 Sep 2010 17:20:22 +0530
changeset 24 1cee9f1b95e0
parent 18 013a02bf2bb0
permissions -rw-r--r--
taking care of credmgr for RVCT B686 compilation
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 SmfUrl class represents an URL. This class has been constructed based on 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    17
 * the link element of the The Atom Syndication Format 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    18
 * (refer http://tools.ietf.org/html/rfc4287)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    19
 * For detailed description about atom link relations, refer 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    20
 * "http://www.iana.org/assignments/link-relations/link-relations.xhtml"
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    21
 *
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    22
 */
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 <QUrl>
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
#include "smfurl.h"
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    27
#include "smfurl_p.h"
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    28
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
 * Constructor with default argument
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
SmfUrl::SmfUrl( )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    33
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    34
	d = new SmfUrlPrivate;
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
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    38
 * Copy Constructor
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    39
 * @param aOther The reference object
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    40
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    41
SmfUrl::SmfUrl( const SmfUrl &aOther )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    42
	: d( aOther.d )
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
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    46
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    47
 * Overloaded = operator
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    48
 * @param aOther The reference object
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    49
 * @return The target reference value
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
SmfUrl& SmfUrl::operator=( const SmfUrl &aOther )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    52
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    53
	d->m_id = aOther.d->m_id;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    54
	return *this;
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
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
 * Destructor
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
SmfUrl::~SmfUrl( )
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
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    64
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    65
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    66
 * Method to get the href attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    67
 * @return The href attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    68
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    69
QUrl SmfUrl::href( ) const
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    70
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    71
	return d->m_href;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    72
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    73
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    74
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    75
 * Method to get the rel attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    76
 * @return The rel attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    77
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    78
QString SmfUrl::rel( ) const
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    79
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    80
	return d->m_rel;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    81
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    82
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    83
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    84
 * Method to get the type attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    85
 * @return The type attribute of the link
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
QString SmfUrl::type( ) 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
	return d->m_type;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    90
	}
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
 * Method to get the hreflang attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    94
 * @return The hreflang attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    95
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    96
QString SmfUrl::hreflang( ) const
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    97
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    98
	return d->m_hreflang;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    99
	}
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
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   102
 * Method to get the title attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   103
 * @return The title attribute of the link
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
QString SmfUrl::title( ) const
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   106
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   107
	return d->m_title;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   108
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   109
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
 * Method to get the length attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   112
 * @return The length attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   113
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   114
QString SmfUrl::length( ) const
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   115
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   116
	return d->m_length;
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 get the id of the URL
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   121
 * @return The ID of the URL
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   122
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   123
QString SmfUrl::id( ) const
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   124
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   125
	return d->m_id;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   126
	}
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
 * Method to set the href attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   130
 * @param aData The href attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   131
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   132
void SmfUrl::setHref( const QUrl& aData )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   133
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   134
	d->m_href = aData;
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
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   137
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   138
 * Method to set the rel attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   139
 * @param aData The rel attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   140
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   141
void SmfUrl::setRel( const QString &aData )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   142
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   143
	d->m_rel = aData;
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
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   146
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   147
 * Method to set the type attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   148
 * @param aData The type attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   149
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   150
void SmfUrl::setType( const QString &aData )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   151
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   152
	d->m_type = aData;
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
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   155
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   156
 * Method to set the hreflang attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   157
 * @param aData The hreflang attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   158
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   159
void SmfUrl::setHhreflang( const QString &aData )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   160
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   161
	d->m_hreflang = aData;
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
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   164
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   165
 * Method to set the title attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   166
 * @param aData The title attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   167
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   168
void SmfUrl::setTitle( const QString &aData )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   169
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   170
	d->m_title = aData;
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
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   173
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   174
 * Method to set the length attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   175
 * @param aData The length attribute of the link
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   176
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   177
void SmfUrl::setLength( const QString &aData )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   178
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   179
	d->m_length = aData;
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
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   182
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   183
 * Method to set the id of the URL
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   184
 * @param aId The ID of the URL
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   185
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   186
void SmfUrl::setId( const QString &aId )
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   187
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   188
	d->m_id = aId;
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
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   191
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
 * Method for Externalization. Writes the SmfUrl object to 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   194
 * the stream and returns a reference to the stream.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   195
 * @param aDataStream Stream to be written
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   196
 * @param aUrl The SmfUrl object to be externalized
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   197
 * @return reference to the written stream
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
 QDataStream &operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   200
		const SmfUrl &aUrl )
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
	// Serialize d->m_href
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   203
	aDataStream<<aUrl.d->m_href;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   204
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   205
	// Serialize d->m_rel
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   206
	aDataStream<<aUrl.d->m_rel;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   207
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   208
	// Serialize d->m_type
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   209
	aDataStream<<aUrl.d->m_type;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   210
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   211
	// Serialize d->m_hreflang
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   212
	aDataStream<<aUrl.d->m_hreflang;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   213
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   214
	// Serialize d->m_title
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   215
	aDataStream<<aUrl.d->m_title;
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
	// Serialize d->m_length
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   218
	aDataStream<<aUrl.d->m_length;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   219
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   220
	// Serialize d->m_id
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   221
	aDataStream<<aUrl.d->m_id;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   222
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   223
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   224
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   225
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
 * Method for Internalization. Reads a SmfUrl object from 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   228
 * the stream and returns a reference to the stream.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   229
 * @param aDataStream Stream to be read
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   230
 * @param aUrl The SmfUrl object to be internalized
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   231
 * @return reference to the stream
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   232
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   233
QDataStream &operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   234
		SmfUrl &aUrl)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   235
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   236
	// Deserialize d->m_href
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   237
	aDataStream>>aUrl.d->m_href;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   238
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   239
	// Deserialize d->m_rel
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   240
	aDataStream>>aUrl.d->m_rel;
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
	// Deserialize d->m_type
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   243
	aDataStream>>aUrl.d->m_type;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   244
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   245
	// Deserialize d->m_hreflang
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   246
	aDataStream>>aUrl.d->m_hreflang;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   247
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   248
	// Deserialize d->m_title
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   249
	aDataStream>>aUrl.d->m_title;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   250
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   251
	// Deserialize d->m_length
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   252
	aDataStream>>aUrl.d->m_length;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   253
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   254
	// Deserialize d->m_id
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   255
	aDataStream>>aUrl.d->m_id;
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
	return aDataStream;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   258
	}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   259