emailservices/emailstore/message_store/server/inc/ContainerStoreSearchResultTable.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Feb 2010 22:37:30 +0200
branchRCL_3
changeset 8 e1b6206813b4
parent 0 8466d47a6819
child 24 d189ee25cf9d
permissions -rw-r--r--
Revision: 201003 Kit: 201007

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Container store search result table.
*
*/



#ifndef __CONTAINER_STORE_SEARCH_RESULT_TABLE_H__
#define __CONTAINER_STORE_SEARCH_RESULT_TABLE_H__

// ========
// INCLUDES
// ========

#include <e32base.h>
#include <d32dbms.h>  // database
//<cmail>
#include "debuglogmacros.h"
//</cmail>

#include "ContainerStoreTable.h"
#include "ContainerStore.h"
#include "msgstoretypes.h"

// =======
// CLASSES
// =======

class CContainerStoreUtils;

// ==================================
// CLASS: CContainerStoreSearchResultTable
// ==================================
class CContainerStoreSearchResultTable : public CContainerStoreTable
	{
	public:
	
	    // ==============
	    // PUBLIC METHODS
	    // ==============
	
        static CContainerStoreSearchResultTable* CreateL( CContainerStoreUtils& aUtils );
        
        static CContainerStoreSearchResultTable* OpenL( CContainerStoreUtils& aUtils );
        
        virtual ~CContainerStoreSearchResultTable();
        
        void AddMessageL( TContainerId aMessageId, TBool aIsMatch );
        
        void DeleteMessageL( TContainerId aMessageId );
        
        void DeleteAllL();
        
        void UpdateMessageL( TContainerId aMessageId, TBool aIsMatch );
		
        TBool GetMessageL( TContainerId aMessageId, TBool& aIsMatch );
		
	private:

        // ===============
        // PRIVATE METHODS
        // ===============
        	
        CContainerStoreSearchResultTable( CContainerStoreUtils& aUtils );
		
		void OpenTableL();
		
		void CreateTableL();
		
        void SeekL( TContainerId aMessageId );
		
    private:
    
        // ==================
        // PRIVATE ATTRIBUTES
        // ==================
	    TInt                  iMessageIdColNum;
        TInt                  iMatchFlagColNum;
	    
	    __LOG_DECLARATION
    		
	}; // end class CContainerStoreSearchResultTable

#endif //__CONTAINER_STORE_SEARCH_RESULT_TABLE_H__