uifw/AvKon/AknNotifyPlugin_dll/src/AknSoftNotificationParameters.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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 *
       
    16 */
       
    17 
       
    18 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    19 #include <vwsdefpartner.h>
       
    20 #endif
       
    21 #include "AknSoftNotificationParameters.h"
       
    22 
       
    23 EXPORT_C CAknSoftNotificationParameters* CAknSoftNotificationParameters::NewL(
       
    24     const TDesC& aResourceFile,
       
    25     TInt aNoteResourceId,
       
    26     TInt aPriority,
       
    27     TInt aSoftkeys,
       
    28     CAknNoteDialog::TTone aTone)
       
    29     {
       
    30     return NewL( 
       
    31         aResourceFile,
       
    32         aNoteResourceId,
       
    33         aPriority,
       
    34         aSoftkeys,
       
    35         aTone,
       
    36         KNullViewId,
       
    37         KNullUid,
       
    38         0,
       
    39         KNullDesC8());
       
    40     }
       
    41 
       
    42 EXPORT_C CAknSoftNotificationParameters* CAknSoftNotificationParameters::NewL(
       
    43     const TDesC& aResourceFile,
       
    44     TInt aNoteResourceId,
       
    45     TInt aPriority,
       
    46     TInt aSoftkeys,
       
    47     CAknNoteDialog::TTone aTone,
       
    48     TVwsViewId aViewId,
       
    49     TUid aCustomMessageId,
       
    50     TInt aAcceptKeyId,
       
    51     const TDesC8& aViewActivationMsg )
       
    52     {
       
    53     CAknSoftNotificationParameters* self = new (ELeave) CAknSoftNotificationParameters; 
       
    54     CleanupStack::PushL(self);
       
    55 
       
    56     self->iResourceFile = aResourceFile.AllocL();
       
    57     self->iNoteResourceId = aNoteResourceId; 
       
    58     self->iPriority = aPriority;
       
    59     self->iSoftkeys = aSoftkeys;
       
    60     self->iTone = aTone;
       
    61     self->iViewId.iAppUid = aViewId.iAppUid;
       
    62     self->iViewId.iViewUid = aViewId.iViewUid;
       
    63 
       
    64     if ( self->iViewId.iAppUid != KNullUid )     
       
    65         {
       
    66         self->iCustomMessageId = aCustomMessageId;
       
    67         self->iAcceptSoftKey = aAcceptKeyId;
       
    68         self->iViewActivationMsg = aViewActivationMsg.AllocL();
       
    69         }
       
    70 
       
    71     CleanupStack::Pop();
       
    72     return self;
       
    73     }
       
    74 
       
    75 EXPORT_C CAknSoftNotificationParameters::~CAknSoftNotificationParameters()
       
    76     {
       
    77     delete iResourceFile;
       
    78     delete iViewActivationMsg;
       
    79     }
       
    80 
       
    81 EXPORT_C CAknSoftNotificationParameters* CAknSoftNotificationParameters::NewL()
       
    82     {
       
    83     return (new (ELeave) CAknSoftNotificationParameters);
       
    84     }
       
    85     
       
    86 //  End of File