srsf/nssvasapi/nssvasrecognition/src/nssvasctagselectdata.cpp
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 2002 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:  The CNssTagSelectData Class contains the data for tag select 
       
    15 *                notification.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "nssvasctagselectdata.h"
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // CNssTagSelectData::NewL
       
    28 // Two-phased constructor.
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 CNssTagSelectData* CNssTagSelectData::NewL(CNssContext* aContext, 
       
    32 								     MNssTagSelectHandler* aTagSelectHandler)
       
    33 {
       
    34 	// version of NewLC which leaves nothing on the cleanup stack
       
    35 	CNssTagSelectData* self=NewLC(aContext, 
       
    36 							   aTagSelectHandler);
       
    37 	CleanupStack::Pop(self);
       
    38     return self;
       
    39 }
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // CNssTagSelectData::NewLC
       
    43 // Two-phased constructor.
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46 CNssTagSelectData* CNssTagSelectData::NewLC(CNssContext* aContext, 
       
    47 								      MNssTagSelectHandler* aTagSelectHandler)
       
    48 {
       
    49     CNssTagSelectData* self=new (ELeave) CNssTagSelectData();
       
    50     // get new, leave if can't
       
    51     CleanupStack::PushL(self);
       
    52     // push onto cleanup stack
       
    53     // (in case self->ConstructL leaves)
       
    54     self->ConstructL(aContext, 
       
    55 				     aTagSelectHandler); // use two-stage construct
       
    56     return self;
       
    57 }
       
    58 
       
    59 // -----------------------------------------------------------------------------
       
    60 // CNssTagSelectData::~CNssTagSelectData
       
    61 // Destructor
       
    62 // -----------------------------------------------------------------------------
       
    63 //
       
    64 CNssTagSelectData::~CNssTagSelectData()
       
    65 {
       
    66 	delete iContext;
       
    67 }
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // CNssTagSelectData::Context
       
    71 // Member function to get a pointer to the context.
       
    72 // -----------------------------------------------------------------------------
       
    73 //
       
    74 CNssContext* CNssTagSelectData::Context()
       
    75 {
       
    76 	return iContext;
       
    77 }
       
    78 
       
    79 // -----------------------------------------------------------------------------
       
    80 // CNssTagSelectData::TagSelectHandler
       
    81 // Member function to get a pointer the TagSelectHandler event handler.
       
    82 // -----------------------------------------------------------------------------
       
    83 //
       
    84 MNssTagSelectHandler* CNssTagSelectData::TagSelectHandler()
       
    85 {
       
    86 	return iTagSelectHandler;
       
    87 }
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // CNssTagSelectData::CNssTagSelectData
       
    91 // C++ default constructor can NOT contain any code, that
       
    92 // might leave.
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 CNssTagSelectData::CNssTagSelectData()
       
    96 {
       
    97 }
       
    98 
       
    99 // -----------------------------------------------------------------------------
       
   100 // CNssTagSelectData::ConstructL
       
   101 // Symbian 2nd phase constructor can leave.
       
   102 // -----------------------------------------------------------------------------
       
   103 //
       
   104 void CNssTagSelectData::ConstructL(CNssContext* aContext, 
       
   105 								MNssTagSelectHandler* aTagSelectHandler)
       
   106 {	
       
   107 	iContext = aContext->CopyL();     // create a new context and make a copy
       
   108 
       
   109     iTagSelectHandler = aTagSelectHandler;
       
   110 }