epoc32/include/gsmustor.inl
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Implements inline methods for classes TSAREntry and CSARStore
    15 // 
    16 //
    17 
    18 /**
    19  @file
    20 */
    21 
    22 #include <s32file.h>
    23 
    24 /**
    25  *  Gets the Reference field.
    26  *  
    27  *  @return Concatenation reference 
    28  */
    29 inline TInt TSAREntry::Reference() const
    30 	{
    31 	return iReference;
    32 	}
    33 
    34 
    35 /**
    36  *  Sets the Reference field.
    37  *  
    38  *  @param aReference The concatenation reference 
    39  */
    40 inline void TSAREntry::SetReference(TInt aReference)
    41 	{
    42 	iReference=aReference;
    43 	}
    44 
    45 
    46 /**
    47  *  Gets the Total field.
    48  *  
    49  *  @return The total number of PDUs in SMS message 
    50  */
    51 inline TInt TSAREntry::Total() const
    52 	{
    53 	return iTotal;
    54 	}
    55 
    56 
    57 /**
    58  *  Sets the total number of PDUs in SMS message
    59  *  
    60  *  @param aTotal The total number of PDUs in the message 
    61  */
    62 inline void TSAREntry::SetTotal(TInt aTotal)
    63 	{
    64 	iTotal=aTotal;
    65 	}
    66 
    67 
    68 /**
    69  *  Gets the Count field.
    70  *  
    71  *  @return Number of PDUs sent/received 
    72  */
    73 inline TInt TSAREntry::Count() const
    74 	{
    75 	return iCount;
    76 	}
    77 
    78 
    79 /**
    80  *  Sets the Count field.
    81  *  
    82  *  @param aCount The number of PDUs sent/received 
    83  */
    84 inline void TSAREntry::SetCount(TInt aCount)
    85 	{
    86 	iCount=aCount;
    87 	}
    88 
    89 
    90 /**
    91  *  Tests if the whole message is sent/received.
    92  *  
    93  *  @return True if the whole message is sent/received 
    94  */
    95 inline TBool TSAREntry::IsComplete() const
    96 	{
    97 	return iCount==iTotal;
    98 	}
    99 
   100 
   101 /**
   102  *  Gets the Description1 field: a pointer to the first
   103  *  32 characters from buffer.
   104  *  
   105  *  @return Description1 field 
   106  */
   107 inline TPtrC TSAREntry::Description1() const
   108 	{
   109 	return iDescription1;
   110 	}
   111 
   112 
   113 /**
   114  *  Sets the Description1 field: the first 32 characters in buffer.
   115  *  
   116  *  @param aDescription Description1 field 
   117  */
   118 inline void TSAREntry::SetDescription1(const TDesC& aDescription)
   119 	{
   120 	iDescription1=aDescription;
   121 	}
   122 
   123 
   124 /**
   125  *  Gets the Description2 field: a pointer to the original address.
   126  *  
   127  *  @return Description2 field 
   128  */
   129 inline TPtrC TSAREntry::Description2() const
   130 	{
   131 	return iDescription2;
   132 	}
   133 
   134 
   135 /**
   136  *  Sets the Description2 field: the original address.
   137  *  
   138  *  @param aDescription Description2 field 
   139  */
   140 inline void TSAREntry::SetDescription2(const TDesC& aDescription)
   141 	{
   142 	iDescription2=aDescription;
   143 	}
   144 
   145 
   146 /**
   147  *  Gets the Data3 field.
   148  *  
   149  *  @return Data3 field 
   150  */
   151 inline TInt TSAREntry::Data3() const
   152 	{
   153 	return iData3;
   154 	}
   155 
   156 
   157 /**
   158  *  Sets the Data3 field.
   159  *  
   160  *  @param aData Data3 field 
   161  */
   162 inline void TSAREntry::SetData3(TInt aData)
   163 	{
   164 	iData3=aData;
   165 	}
   166 
   167 
   168 /**
   169  *  Gets the Time field: the time when this message was sent/received.
   170  *  
   171  *  @return Time field 
   172  */
   173 inline const TTime& TSAREntry::Time() const
   174 	{
   175 	return iTime;
   176 	}
   177 
   178 
   179 /**
   180  *  Sets the Time field: the time when this message was sent/received.
   181  *  
   182  *  @param aTime Time field 
   183  */
   184 inline void TSAREntry::SetTime(const TTime& aTime)
   185 	{
   186 	iTime=aTime;
   187 	}
   188 
   189 
   190 /**
   191  *  Gets the data stream ID.
   192  *  
   193  *  @return Data stream ID 
   194  */
   195 inline TStreamId TSAREntry::DataStreamId() const
   196 	{
   197 	return iDataStreamId;
   198 	}
   199 
   200 
   201 /**
   202  *  Sets the data stream ID.
   203  *  
   204  *  @param aStreamId Data stream ID 
   205  */
   206 inline void TSAREntry::SetDataStreamId(TStreamId aStreamId)
   207 	{
   208 	iDataStreamId=aStreamId;
   209 	}
   210 
   211 
   212 /**
   213  *  @return ETrue if this message is deleted
   214  */
   215 inline TBool TSAREntry::IsDeleted() const
   216 	{
   217 	return iFlags&ESAREntryIsDeleted;
   218 	}
   219 
   220 
   221 /**
   222  *  Sets if this message should be marked as deleted
   223  *  
   224  *  @param aIsDeleted Set to True to mark a message as deleted
   225  */
   226 inline void TSAREntry::SetIsDeleted(TBool aIsDeleted)
   227 	{
   228 	iFlags=aIsDeleted?iFlags|ESAREntryIsDeleted: iFlags&(~ESAREntryIsDeleted);
   229 	}
   230 
   231 
   232 /**
   233  *  @return ETrue if this message is added
   234  */
   235 inline TBool TSAREntry::IsAdded() const
   236 	{
   237 	return iFlags&ESAREntryIsAdded;
   238 	}
   239 
   240 
   241 /**
   242  *  Sets if this message should be marked as added
   243  *  
   244  *  @param aIsDeleted Set to True to mark a message as added
   245  */
   246 inline void TSAREntry::SetIsAdded(TBool aIsAdded)
   247 	{
   248 	iFlags=aIsAdded?iFlags|ESAREntryIsAdded: iFlags&(~ESAREntryIsAdded);
   249 	}
   250 
   251 
   252 /**
   253  *  Gets the file server handle.
   254  *  
   255  *  @return File server handle 
   256  */
   257 inline RFs& CSARStore::FileSession() const
   258 	{
   259 	return iFs;
   260 	}
   261 
   262 
   263 /**
   264  *  @return whether it's in transaction
   265  */
   266 inline TBool CSARStore::InTransaction() const
   267 	{
   268 	return iInTransaction;
   269 	}