phonebookengines/contactsmodel/cntplsql/src/cpplpresencetable.cpp
changeset 24 0ba2181d7c28
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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 #include "pltables.h"
       
    20 #include "dbsqlconstants.h"
       
    21 #include "cntpersistenceutility.h"
       
    22 #include <cntdef.h>
       
    23 
       
    24 
       
    25 /**
       
    26 @param aDatabase A handle to the database.
       
    27 @param aProperties A contact properties object.
       
    28 
       
    29 @return A pointer to a new CPplPresenceTable object.
       
    30 */
       
    31 CPplPresenceTable*
       
    32 CPplPresenceTable::NewL(RSqlDatabase& aDatabase)
       
    33     {
       
    34     CPplPresenceTable* self = CPplPresenceTable::NewLC(aDatabase);
       
    35     CleanupStack::Pop(self);
       
    36     return self;
       
    37     }
       
    38 
       
    39 
       
    40 /**
       
    41 @param aDatabase A handle to the database.
       
    42 @param aProperties A contact properties object.
       
    43 
       
    44 @return A pointer to a new CPplPresenceTable object.
       
    45 */
       
    46 CPplPresenceTable*
       
    47 CPplPresenceTable::NewLC(RSqlDatabase& aDatabase)
       
    48     {
       
    49     CPplPresenceTable* self =
       
    50         new (ELeave) CPplPresenceTable(aDatabase);
       
    51     CleanupStack::PushL(self);
       
    52     self->ConstructL();
       
    53     return self;
       
    54     }
       
    55 
       
    56 
       
    57 /**
       
    58 Destructor
       
    59 */
       
    60 CPplPresenceTable::~CPplPresenceTable()
       
    61     {
       
    62     }
       
    63 
       
    64 
       
    65 /**
       
    66 Set up the CCntSqlStatement objects held by the class.
       
    67 */
       
    68 void CPplPresenceTable::ConstructL()
       
    69     {
       
    70     }
       
    71 
       
    72 
       
    73 /**
       
    74 Constructor
       
    75 */
       
    76 CPplPresenceTable::CPplPresenceTable(RSqlDatabase& aDatabase) :
       
    77     iDatabase(aDatabase)
       
    78     {
       
    79     }
       
    80 
       
    81 
       
    82 /**
       
    83 Creates the presence table and its indexes in the database.
       
    84 */
       
    85 void CPplPresenceTable::CreateTableL()
       
    86     {
       
    87     User::LeaveIfError(iDatabase.Exec(KPresenceCreateStmnt));
       
    88     }
       
    89 
       
    90 
       
    91 /**
       
    92 @param aItem A contact item whose data are added to the table.
       
    93 */
       
    94 void CPplPresenceTable::CreateInDbL(CContactItem& /*aItem*/)
       
    95     {
       
    96     }
       
    97 
       
    98 
       
    99 /**
       
   100 @param aItem A contact item whose data is updated in the database.
       
   101 */
       
   102 void CPplPresenceTable::UpdateL(const CContactItem& /*aItem*/)
       
   103     {
       
   104     }
       
   105 
       
   106 /**
       
   107 Deletes all the presence information of the contact item. Should be used when
       
   108 deleting a particular online account information from the Contact.
       
   109 
       
   110 @param aItem The contact item whose communcation addresses are to be deleted.
       
   111 */
       
   112 void CPplPresenceTable::DeleteL(const CContactItem& /*aItem*/, TBool& /*aLowDiskErrorOccurred*/)
       
   113     {
       
   114     }
       
   115 
       
   116 // End of File