omads/omadsappui/ui/src/NSmlDSSyncDocument.cpp
branchRCL_3
changeset 24 8e7494275d3a
parent 23 2bb96f4ecad8
child 25 4f0867e42d62
equal deleted inserted replaced
23:2bb96f4ecad8 24:8e7494275d3a
     1 /*
       
     2 * Copyright (c) 2002-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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "NSmlDSSyncDocument.h"
       
    22 #include "NSmlDSSyncAppUi.h"
       
    23 #include "AspDebug.h"
       
    24 
       
    25 
       
    26 //const TUid KUidAppSync       = { 0x101F6DE4 };
       
    27 
       
    28 
       
    29 // ============================ MEMBER FUNCTIONS ===============================
       
    30 
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CNSmlDSSyncDocument::Constructor
       
    34 //
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 CNSmlDSSyncDocument::CNSmlDSSyncDocument(CEikApplication& aApp)
       
    38 : CAknDocument(aApp)    
       
    39     {
       
    40     }
       
    41 
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CNSmlDSSyncDocument::~CNSmlDSSyncDocument
       
    45 //
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 CNSmlDSSyncDocument::~CNSmlDSSyncDocument()
       
    49     {
       
    50     FLOG( _L("CNSmlDSSyncDocument::~CNSmlDSSyncDocument START") );
       
    51     
       
    52     delete iSyncUtilApi;
       
    53     
       
    54     FLOG( _L("CNSmlDSSyncDocument::~CNSmlDSSyncDocument END") );
       
    55     }
       
    56 
       
    57 
       
    58 // -----------------------------------------------------------------------------
       
    59 // CNSmlDSSyncDocument::ConstructL
       
    60 //
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 void CNSmlDSSyncDocument::ConstructL()
       
    64     {
       
    65     FLOG( _L("CNSmlDSSyncDocument::ConstructL START") );
       
    66     
       
    67     iSyncUtilApi = CSyncUtilApi::NewL();
       
    68     
       
    69     iEikEnv = CEikonEnv::Static();
       
    70     
       
    71     FLOG( _L("CNSmlDSSyncDocument::ConstructL END") );
       
    72     }
       
    73 
       
    74 
       
    75 // -----------------------------------------------------------------------------
       
    76 // CNSmlDSSyncDocument::NewL
       
    77 //
       
    78 // -----------------------------------------------------------------------------
       
    79 //
       
    80 CNSmlDSSyncDocument* CNSmlDSSyncDocument::NewL(CEikApplication& aApp)
       
    81     {
       
    82     FLOG( _L("CNSmlDSSyncDocument::NewL START") );
       
    83     
       
    84     CNSmlDSSyncDocument* self = new (ELeave) CNSmlDSSyncDocument( aApp );
       
    85     CleanupStack::PushL(self);
       
    86     self->ConstructL();
       
    87     CleanupStack::Pop(self);
       
    88 
       
    89     FLOG( _L("CNSmlDSSyncDocument::NewL END") );
       
    90     
       
    91     return self;
       
    92     }
       
    93 
       
    94     
       
    95 // -----------------------------------------------------------------------------
       
    96 // CNSmlDSSyncDocument::CreateAppUiL
       
    97 //
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 CEikAppUi* CNSmlDSSyncDocument::CreateAppUiL()
       
   101     {
       
   102     return new (ELeave) CNSmlDSSyncAppUi;
       
   103     }
       
   104 
       
   105 
       
   106 // -----------------------------------------------------------------------------
       
   107 // CNSmlDSSyncDocument::Model
       
   108 //
       
   109 // -----------------------------------------------------------------------------
       
   110 //
       
   111 CSyncUtilApi* CNSmlDSSyncDocument::Model()
       
   112     {
       
   113     __ASSERT_ALWAYS(iSyncUtilApi, Panic(KErrGeneral));
       
   114     
       
   115     return iSyncUtilApi;
       
   116     }
       
   117 
       
   118 
       
   119 // -------------------------------------------------------------------------------
       
   120 // CNSmlDSSyncDocument::Panic
       
   121 //
       
   122 // -------------------------------------------------------------------------------
       
   123 //
       
   124 void CNSmlDSSyncDocument::Panic(TInt aReason)
       
   125     {
       
   126 	_LIT(KPanicCategory,"CNSmlDSSync");
       
   127 
       
   128 	User::Panic(KPanicCategory, aReason); 
       
   129     }
       
   130 
       
   131 
       
   132 
       
   133 
       
   134 // End of File