epoc32/include/gsmustor.inl
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/gsmustor.inl	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,271 @@
     1.4 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Implements inline methods for classes TSAREntry and CSARStore
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 +*/
    1.26 +
    1.27 +#include <s32file.h>
    1.28 +
    1.29 +/**
    1.30 + *  Gets the Reference field.
    1.31 + *  
    1.32 + *  @return Concatenation reference 
    1.33 + */
    1.34 +inline TInt TSAREntry::Reference() const
    1.35 +	{
    1.36 +	return iReference;
    1.37 +	}
    1.38 +
    1.39 +
    1.40 +/**
    1.41 + *  Sets the Reference field.
    1.42 + *  
    1.43 + *  @param aReference The concatenation reference 
    1.44 + */
    1.45 +inline void TSAREntry::SetReference(TInt aReference)
    1.46 +	{
    1.47 +	iReference=aReference;
    1.48 +	}
    1.49 +
    1.50 +
    1.51 +/**
    1.52 + *  Gets the Total field.
    1.53 + *  
    1.54 + *  @return The total number of PDUs in SMS message 
    1.55 + */
    1.56 +inline TInt TSAREntry::Total() const
    1.57 +	{
    1.58 +	return iTotal;
    1.59 +	}
    1.60 +
    1.61 +
    1.62 +/**
    1.63 + *  Sets the total number of PDUs in SMS message
    1.64 + *  
    1.65 + *  @param aTotal The total number of PDUs in the message 
    1.66 + */
    1.67 +inline void TSAREntry::SetTotal(TInt aTotal)
    1.68 +	{
    1.69 +	iTotal=aTotal;
    1.70 +	}
    1.71 +
    1.72 +
    1.73 +/**
    1.74 + *  Gets the Count field.
    1.75 + *  
    1.76 + *  @return Number of PDUs sent/received 
    1.77 + */
    1.78 +inline TInt TSAREntry::Count() const
    1.79 +	{
    1.80 +	return iCount;
    1.81 +	}
    1.82 +
    1.83 +
    1.84 +/**
    1.85 + *  Sets the Count field.
    1.86 + *  
    1.87 + *  @param aCount The number of PDUs sent/received 
    1.88 + */
    1.89 +inline void TSAREntry::SetCount(TInt aCount)
    1.90 +	{
    1.91 +	iCount=aCount;
    1.92 +	}
    1.93 +
    1.94 +
    1.95 +/**
    1.96 + *  Tests if the whole message is sent/received.
    1.97 + *  
    1.98 + *  @return True if the whole message is sent/received 
    1.99 + */
   1.100 +inline TBool TSAREntry::IsComplete() const
   1.101 +	{
   1.102 +	return iCount==iTotal;
   1.103 +	}
   1.104 +
   1.105 +
   1.106 +/**
   1.107 + *  Gets the Description1 field: a pointer to the first
   1.108 + *  32 characters from buffer.
   1.109 + *  
   1.110 + *  @return Description1 field 
   1.111 + */
   1.112 +inline TPtrC TSAREntry::Description1() const
   1.113 +	{
   1.114 +	return iDescription1;
   1.115 +	}
   1.116 +
   1.117 +
   1.118 +/**
   1.119 + *  Sets the Description1 field: the first 32 characters in buffer.
   1.120 + *  
   1.121 + *  @param aDescription Description1 field 
   1.122 + */
   1.123 +inline void TSAREntry::SetDescription1(const TDesC& aDescription)
   1.124 +	{
   1.125 +	iDescription1=aDescription;
   1.126 +	}
   1.127 +
   1.128 +
   1.129 +/**
   1.130 + *  Gets the Description2 field: a pointer to the original address.
   1.131 + *  
   1.132 + *  @return Description2 field 
   1.133 + */
   1.134 +inline TPtrC TSAREntry::Description2() const
   1.135 +	{
   1.136 +	return iDescription2;
   1.137 +	}
   1.138 +
   1.139 +
   1.140 +/**
   1.141 + *  Sets the Description2 field: the original address.
   1.142 + *  
   1.143 + *  @param aDescription Description2 field 
   1.144 + */
   1.145 +inline void TSAREntry::SetDescription2(const TDesC& aDescription)
   1.146 +	{
   1.147 +	iDescription2=aDescription;
   1.148 +	}
   1.149 +
   1.150 +
   1.151 +/**
   1.152 + *  Gets the Data3 field.
   1.153 + *  
   1.154 + *  @return Data3 field 
   1.155 + */
   1.156 +inline TInt TSAREntry::Data3() const
   1.157 +	{
   1.158 +	return iData3;
   1.159 +	}
   1.160 +
   1.161 +
   1.162 +/**
   1.163 + *  Sets the Data3 field.
   1.164 + *  
   1.165 + *  @param aData Data3 field 
   1.166 + */
   1.167 +inline void TSAREntry::SetData3(TInt aData)
   1.168 +	{
   1.169 +	iData3=aData;
   1.170 +	}
   1.171 +
   1.172 +
   1.173 +/**
   1.174 + *  Gets the Time field: the time when this message was sent/received.
   1.175 + *  
   1.176 + *  @return Time field 
   1.177 + */
   1.178 +inline const TTime& TSAREntry::Time() const
   1.179 +	{
   1.180 +	return iTime;
   1.181 +	}
   1.182 +
   1.183 +
   1.184 +/**
   1.185 + *  Sets the Time field: the time when this message was sent/received.
   1.186 + *  
   1.187 + *  @param aTime Time field 
   1.188 + */
   1.189 +inline void TSAREntry::SetTime(const TTime& aTime)
   1.190 +	{
   1.191 +	iTime=aTime;
   1.192 +	}
   1.193 +
   1.194 +
   1.195 +/**
   1.196 + *  Gets the data stream ID.
   1.197 + *  
   1.198 + *  @return Data stream ID 
   1.199 + */
   1.200 +inline TStreamId TSAREntry::DataStreamId() const
   1.201 +	{
   1.202 +	return iDataStreamId;
   1.203 +	}
   1.204 +
   1.205 +
   1.206 +/**
   1.207 + *  Sets the data stream ID.
   1.208 + *  
   1.209 + *  @param aStreamId Data stream ID 
   1.210 + */
   1.211 +inline void TSAREntry::SetDataStreamId(TStreamId aStreamId)
   1.212 +	{
   1.213 +	iDataStreamId=aStreamId;
   1.214 +	}
   1.215 +
   1.216 +
   1.217 +/**
   1.218 + *  @return ETrue if this message is deleted
   1.219 + */
   1.220 +inline TBool TSAREntry::IsDeleted() const
   1.221 +	{
   1.222 +	return iFlags&ESAREntryIsDeleted;
   1.223 +	}
   1.224 +
   1.225 +
   1.226 +/**
   1.227 + *  Sets if this message should be marked as deleted
   1.228 + *  
   1.229 + *  @param aIsDeleted Set to True to mark a message as deleted
   1.230 + */
   1.231 +inline void TSAREntry::SetIsDeleted(TBool aIsDeleted)
   1.232 +	{
   1.233 +	iFlags=aIsDeleted?iFlags|ESAREntryIsDeleted: iFlags&(~ESAREntryIsDeleted);
   1.234 +	}
   1.235 +
   1.236 +
   1.237 +/**
   1.238 + *  @return ETrue if this message is added
   1.239 + */
   1.240 +inline TBool TSAREntry::IsAdded() const
   1.241 +	{
   1.242 +	return iFlags&ESAREntryIsAdded;
   1.243 +	}
   1.244 +
   1.245 +
   1.246 +/**
   1.247 + *  Sets if this message should be marked as added
   1.248 + *  
   1.249 + *  @param aIsDeleted Set to True to mark a message as added
   1.250 + */
   1.251 +inline void TSAREntry::SetIsAdded(TBool aIsAdded)
   1.252 +	{
   1.253 +	iFlags=aIsAdded?iFlags|ESAREntryIsAdded: iFlags&(~ESAREntryIsAdded);
   1.254 +	}
   1.255 +
   1.256 +
   1.257 +/**
   1.258 + *  Gets the file server handle.
   1.259 + *  
   1.260 + *  @return File server handle 
   1.261 + */
   1.262 +inline RFs& CSARStore::FileSession() const
   1.263 +	{
   1.264 +	return iFs;
   1.265 +	}
   1.266 +
   1.267 +
   1.268 +/**
   1.269 + *  @return whether it's in transaction
   1.270 + */
   1.271 +inline TBool CSARStore::InTransaction() const
   1.272 +	{
   1.273 +	return iInTransaction;
   1.274 +	}