/******************************************************************************
FILE:  ET_DBFunctions.h

SERVICES:  Header File

GENERAL DESCRIPTION:

PUBLIC CLASSES AND STATIC FUNCTIONS:
	List the class(es) and static functions included in this file

INITIALIZATION & SEQUENCING REQUIREMENTS:

	See Exported Routines

       Copyright © 2002 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
******************************************************************************/
#ifndef ET_DBFUNCTIONS_H
#define ET_DBFUNCTIONS_H

#include "ExpenseTracker.h"

//*****************************************************************************
// ENUMERATED TYPE DEFINITIONS
//*****************************************************************************

// Enumerate the different field types that will be stored in the database for each 
// transaction

typedef enum
{
  DB_RECORD_FIELD_DATETIME,
  DB_RECORD_FIELD_DESC,
  DB_RECORD_FIELD_TYPE,
  DB_RECORD_FIELD_AMOUNT,
  NUM_DB_RECORD_FIELDS
} EDBRecordFieldType;


//*****************************************************************************
// FUNCTION DECLARATIONS
//*****************************************************************************

extern boolean ET_AddExpenseItem( CExpenseTrackerApp* pApp, dword nDateTime, unsigned char cType, AECHAR* psDesc, dword nAmount );
extern boolean ET_UpdateExpenseItem( CExpenseTrackerApp* pApp, uint16 nRecordID, dword nDateTime, unsigned char cType, AECHAR* psDesc, dword nAmount );
extern boolean ET_DeleteExpenseItem( CExpenseTrackerApp* pApp, uint16 nRecordID );
extern boolean ET_GetExpenseItem( CExpenseTrackerApp* pApp, uint16 nRecordID, dword* pnDateTime, AECHAR* psDesc, unsigned char* pcType, dword* pnAmount );
extern boolean ET_GetExpenseList( CExpenseTrackerApp * pApp, IMenuCtl* pMenu, uint32* pnTotal, uint32 nStartDate, uint32 nEndDate, unsigned char cType );
extern void    ET_EmptyExpenseDatabase( CExpenseTrackerApp* pApp );
extern void    ET_GetReportList( CExpenseTrackerApp * pApp, IMenuCtl* pMenu );
extern boolean ET_SaveReport( CExpenseTrackerApp* pApp );

#endif