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