upnpharvester/cdssync/cdssynclib/src/cdssync.cpp
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /*
       
     2 * Copyright (c) 2008 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:      Interface class implementation of CdsSync
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #include "cdssync.h"
       
    24 #include "cdssyncimplsql.h"
       
    25 
       
    26 
       
    27 // --------------------------------------------------------------------------
       
    28 // CCdsSync::CCdsSync
       
    29 // --------------------------------------------------------------------------
       
    30 //
       
    31 CCdsSync::CCdsSync()
       
    32     {
       
    33     
       
    34     }
       
    35     
       
    36 // --------------------------------------------------------------------------
       
    37 // CCdsSync::ConstructL
       
    38 // --------------------------------------------------------------------------
       
    39 //
       
    40 void CCdsSync::ConstructL()
       
    41     {
       
    42     iSyncImpl = CCdsSyncImpl::NewL();
       
    43     }
       
    44 
       
    45 
       
    46 // --------------------------------------------------------------------------
       
    47 // CCdsSync::NewL
       
    48 // --------------------------------------------------------------------------
       
    49 //
       
    50 EXPORT_C CCdsSync* CCdsSync::NewL()
       
    51     {
       
    52     CCdsSync* self = CCdsSync::NewLC();
       
    53     CleanupStack::Pop( self );
       
    54     return self;
       
    55     }
       
    56 
       
    57 // --------------------------------------------------------------------------
       
    58 // CCdsSync::NewLC
       
    59 // --------------------------------------------------------------------------
       
    60 //
       
    61 EXPORT_C CCdsSync* CCdsSync::NewLC()
       
    62     {
       
    63     CCdsSync* self = new( ELeave ) CCdsSync;
       
    64     CleanupStack::PushL( self );
       
    65     self->ConstructL();
       
    66     return self;
       
    67     }
       
    68 
       
    69 // --------------------------------------------------------------------------
       
    70 // CCdsSync::~CCdsSync
       
    71 // --------------------------------------------------------------------------
       
    72 //
       
    73 CCdsSync::~CCdsSync()
       
    74     {
       
    75     delete iSyncImpl;
       
    76     }
       
    77     
       
    78 // --------------------------------------------------------------------------
       
    79 // CCdsSync::InitL
       
    80 // --------------------------------------------------------------------------
       
    81 //
       
    82 EXPORT_C void CCdsSync::InitL( RPointerArray<HBufC8>& aSourceDataArray,
       
    83                                const TInt& aDeviceId, 
       
    84                                MCdsSyncObserver& aObserver,
       
    85                                TInt aAddGranularity )
       
    86     {
       
    87     iSyncImpl->InitL( aSourceDataArray, 
       
    88                       aDeviceId, 
       
    89                       aObserver, 
       
    90                       aAddGranularity ); 
       
    91     }
       
    92 
       
    93 
       
    94 // --------------------------------------------------------------------------
       
    95 // CCdsSync::NotifySourceDataAddedL
       
    96 // --------------------------------------------------------------------------
       
    97 //
       
    98 EXPORT_C void CCdsSync::NotifySourceDataAddedL( TBool aSourceDataComplete )
       
    99     {
       
   100     iSyncImpl->NotifySourceDataAddedL( aSourceDataComplete );
       
   101     }
       
   102    
       
   103 // --------------------------------------------------------------------------
       
   104 // CCdsSync::ResetL
       
   105 // --------------------------------------------------------------------------
       
   106 //
       
   107 EXPORT_C void CCdsSync::ResetL()
       
   108     {
       
   109     iSyncImpl->ResetL();
       
   110     }
       
   111 
       
   112 // --------------------------------------------------------------------------
       
   113 // CCdsSync::ChunkCount
       
   114 // --------------------------------------------------------------------------
       
   115 //
       
   116 EXPORT_C TInt CCdsSync::ChunkCount()
       
   117     {
       
   118     return iSyncImpl->ChunkCount();
       
   119     }
       
   120     
       
   121 // --------------------------------------------------------------------------
       
   122 // CCdsSync::ProcessedItemCount
       
   123 // --------------------------------------------------------------------------
       
   124 //
       
   125 EXPORT_C TInt CCdsSync::ProcessedItemCount()
       
   126     {
       
   127     return iSyncImpl->ProcessedItemCount();
       
   128     }
       
   129     
       
   130 // --------------------------------------------------------------------------
       
   131 // CCdsSync::SetSearchIndex
       
   132 // --------------------------------------------------------------------------
       
   133 //
       
   134 EXPORT_C void CCdsSync::SetSearchIndex( const TInt aSearchIndex )
       
   135     {
       
   136     iSyncImpl->SetSearchIndex( aSearchIndex );
       
   137     }        
       
   138 
       
   139 // End of file