locationsystemui/locationsysui/locverifier/src/lpdnotifreqinfo.cpp
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     1 /*
       
     2 * Copyright (c) 2005 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:  This class stores information regarding notification 
       
    15 *                requests.
       
    16 *
       
    17 */
       
    18 
       
    19 #include <lbs/epos_cposrequestor.h>
       
    20 #include <lbs/epos_rposrequestorstack.h>
       
    21 #include "lpdnotifreqinfo.h"
       
    22 
       
    23 // ======== MEMBER FUNCTIONS ========
       
    24 
       
    25 // ---------------------------------------------------------------------------
       
    26 // Constructor
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 CLpdNotifReqInfo::CLpdNotifReqInfo(
       
    30 	TPosRequestSource aSource,
       
    31 	TPosVerifyCancelReason aReason,
       
    32 	TPosRequestDecision aDecision,
       
    33 	RPosRequestorStack* aRequestors)
       
    34 	: iSource(aSource),
       
    35 	  iReason(aReason),
       
    36 	  iDecision(aDecision),
       
    37 	  iRequestors(aRequestors)
       
    38   	{
       
    39   	}
       
    40 
       
    41 
       
    42 // ---------------------------------------------------------------------------
       
    43 // 2nd Phase of Construction
       
    44 // ---------------------------------------------------------------------------
       
    45 //
       
    46 void CLpdNotifReqInfo::ConstructL()
       
    47     {
       
    48     // Intentionally left empty
       
    49     }
       
    50 
       
    51 
       
    52 // ---------------------------------------------------------------------------
       
    53 // Symbian 2 Phase Constructor
       
    54 // ---------------------------------------------------------------------------
       
    55 //
       
    56 CLpdNotifReqInfo* CLpdNotifReqInfo::NewL(
       
    57 	TPosRequestSource aSource,
       
    58 	TPosVerifyCancelReason aReason,
       
    59 	TPosRequestDecision aDecision,
       
    60 	RPosRequestorStack* aRequestors)
       
    61     {
       
    62     CLpdNotifReqInfo* self = CLpdNotifReqInfo::NewLC(aSource,
       
    63 													 aReason,
       
    64 													 aDecision,
       
    65 													 aRequestors);
       
    66     CleanupStack::Pop( self );
       
    67     return self;
       
    68     }
       
    69 
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // Symbian 2 Phase Constructor
       
    73 // ---------------------------------------------------------------------------
       
    74 //
       
    75 CLpdNotifReqInfo* CLpdNotifReqInfo::NewLC(
       
    76 	TPosRequestSource aSource,
       
    77 	TPosVerifyCancelReason aReason,
       
    78 	TPosRequestDecision aDecision,
       
    79 	RPosRequestorStack* aRequestors)
       
    80     {
       
    81     CLpdNotifReqInfo* self = new( ELeave ) CLpdNotifReqInfo(aSource,
       
    82     														aReason,
       
    83     														aDecision,
       
    84     														aRequestors);
       
    85     CleanupStack::PushL( self );
       
    86     self->ConstructL();
       
    87     return self;
       
    88     }
       
    89 
       
    90 
       
    91 // ---------------------------------------------------------------------------
       
    92 // Destructor
       
    93 // ---------------------------------------------------------------------------
       
    94 //
       
    95 CLpdNotifReqInfo::~CLpdNotifReqInfo()
       
    96 	{
       
    97 	if(iRequestors)
       
    98 		{
       
    99 		iRequestors->ResetAndDestroy();
       
   100 		delete iRequestors;
       
   101 		}
       
   102 	}
       
   103 
       
   104 
       
   105 // ---------------------------------------------------------------------------
       
   106 // CLpdNotifReqInfo::Source()
       
   107 // ---------------------------------------------------------------------------
       
   108 //
       
   109 const TPosRequestSource& CLpdNotifReqInfo::Source()
       
   110     {
       
   111     return iSource;
       
   112     }
       
   113 
       
   114 
       
   115 // ---------------------------------------------------------------------------
       
   116 // CLpdNotifReqInfo::Reason()
       
   117 // ---------------------------------------------------------------------------
       
   118 //
       
   119 const TPosVerifyCancelReason& CLpdNotifReqInfo::Reason()
       
   120     {
       
   121     return iReason;
       
   122     }
       
   123 
       
   124 
       
   125 // ---------------------------------------------------------------------------
       
   126 // CLpdNotifReqInfo::Decision()
       
   127 // ---------------------------------------------------------------------------
       
   128 //
       
   129 const TPosRequestDecision& CLpdNotifReqInfo::Decision()
       
   130     {
       
   131     return iDecision;
       
   132     }
       
   133 
       
   134 
       
   135 // ---------------------------------------------------------------------------
       
   136 // CLpdNotifReqInfo::Requestors()
       
   137 // ---------------------------------------------------------------------------
       
   138 //
       
   139 const RPosRequestorStack& CLpdNotifReqInfo::Requestors()
       
   140     {
       
   141     return *iRequestors;
       
   142     }
       
   143 
       
   144 //end of file