realtimenetprots/sipfw/SIP/sipapi/src/PendingTransaction.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Name          : pendingtransaction.h
       
    16 * Part of       : SIP API
       
    17 * Version       : SIP/4.0
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 
       
    29 #ifndef PENDINGTRANSACTION_H
       
    30 #define PENDINGTRANSACTION_H
       
    31 
       
    32 // INCLUDES
       
    33 #include <e32base.h>
       
    34 #include "_sipcodecdefs.h"
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class CSIPServerTransaction;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42  * This class stores ServerTransaction and an IAP-id
       
    43  */
       
    44 class CPendingTransaction : public CBase
       
    45 	{
       
    46 public: // Constructors and destructor
       
    47 	/**	
       
    48 	 * Creates a new instance of CPendingTransaction
       
    49 	 *
       
    50 	 * @pre aTransaction != NULL
       
    51 	 * @post
       
    52 	 *
       
    53 	 * @see
       
    54 	 *
       
    55 	 * @param aTransaction ServerTransaction, ownership isn't transferred
       
    56      * @param aIapId IAP-id
       
    57 	 * @return new CPendingTransaction object, ownership is transferred
       
    58 	 */
       
    59 	static CPendingTransaction* NewLC(CSIPServerTransaction* aTransaction,
       
    60                                       TUint32 aIapId);
       
    61 
       
    62 	~CPendingTransaction();
       
    63 
       
    64 public: // New functions
       
    65 	/**
       
    66 	 * Return a pointer to the ServerTransaction.
       
    67 	 *
       
    68 	 * @pre
       
    69 	 * @post
       
    70 	 *
       
    71 	 * @see
       
    72 	 *	 
       
    73 	 * @return Pointer to CSIPServerTransaction, ownership isn't transferred
       
    74      *  as CPendingTransaction doesn't own the CSIPServerTransaction in the
       
    75      *  first place.
       
    76 	 */
       
    77 	CSIPServerTransaction* Transaction();
       
    78 
       
    79 	/**	
       
    80 	 * Return the IAP-id
       
    81 	 *
       
    82 	 * @pre
       
    83 	 * @post
       
    84 	 *
       
    85 	 * @see
       
    86 	 *	 
       
    87 	 * @return IAP-id value
       
    88 	 */
       
    89 	TUint32 IapId() const;
       
    90 
       
    91 private:
       
    92 	/**	
       
    93 	 * Constructor
       
    94 	 *
       
    95 	 * @pre aTransaction != NULL
       
    96 	 * @post
       
    97 	 *
       
    98 	 * @see
       
    99 	 *
       
   100 	 * @param aTransaction ServerTransaction, ownership isn't transferred
       
   101      * @param aIapId IAP-id	 
       
   102 	 * @return -
       
   103 	 */
       
   104 	CPendingTransaction(CSIPServerTransaction* aTransaction,
       
   105                         TUint32 aIapId);
       
   106 
       
   107 private: // Data
       
   108     //ServerTransaction, not owned by CPendingTransaction
       
   109 	CSIPServerTransaction* iTransaction;
       
   110 
       
   111 	TUint32 iIapId;
       
   112 
       
   113 private: // For testing purposes
       
   114 	UNIT_TEST(CPendingTransaction_Test)
       
   115 	};
       
   116 
       
   117 #endif // end of PENDINGTRANSACTION_H
       
   118 
       
   119 // End of File