/*======================================================
FILE:  AEE_OEMExtra.h

SERVICES:  AEE extra helper functions

GENERAL DESCRIPTION:

AEE extra helper functions

PUBLIC CLASSES:

None.

INITIALIZATION AND SEQUENCING REQUIREMENTS
None.

        Copyright © 2005 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
=====================================================*/
#if !defined(AEE_OEMEXTRA_H)
#define AEE_OEMEXTRA_H  1

#include "AEE_OEMComdef.h"
#include "AEEDownload.h"

#if defined(__cplusplus)
extern "C" {
#endif

extern AEE_EXPORTS boolean AEE_ResourceCacheRelease(ACONTEXT *pac);
extern AEE_EXPORTS int     AEE_DeleteDLAck(IDownload *po, DLITEMID iID);

#if defined(__cplusplus)
}
#endif

/*=======================================================================
  AEE  DOCUMENTATION
============================================================================
AEE_EXTRA
This interface contains extra AEE helper functions.


The function perform the following tasks:
   - Allows the OEM layer to flush the resource cache
   - dlacks.bin cleanup after cancelled download
============================================================================

Function:  AEE_ResourceCacheRelease()

Description:
   This function clears cached resource data.

Prototype:
   boolean AEE_ResourceCacheRelease(void);

Parameters:
   pac : Context of the application whose resources are be released.

Return Value:
   TRUE if the resources were cleared, FALSE otherwise.

Comments:
   Set pac=NULL to flush all cache contents.

Side Effects:
   None

See Also:
   None

============================================================================

Function:  AEE_DeleteDLAck()

Description:
   This function removes the most recent download ACK for the given item ID
   from the Download ACK Pending Queue (dlacks.bin).
   
   This function only searches for purchase and upgrade ACK's.
   
   When an IDownload operation is cancelled during the sending of the download ACK
   (i.e. the very end of the download) the ACK will remain in the pending queue 
   and will be transmitted the next time IDownload connects to the ADS.  If this
   behavior is not desired this function can be used to remove the ack from the 
   queue.

Prototype:
   int AEE_DeleteDLAck(IDownload *po, DLITEMID iID);

Parameters:
   po  : Pointer to an IDownload object
   iID : Item ID for the download item to remove from dlacks.bin

Return Value:
   SUCCESS  : The ACK was succesfully deleted
   EBADPARM : An invalid argument was passed in
   EFAILED  : Unable to modify dlacks.bin
   EBADITEM : No ACK was pending for the specified item ID

Comments:
   None

Side Effects:
   dlacks.bin is modified

See Also:
   None
   
==================================================================*/
#endif // AEE_OEMEXTRA_H
