/*
 *               Copyright (C) 2007, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 */


#ifndef __ECTEST_H__
#define __ECTEST_H__


#include <ecx.h>
#include <ec_apip.h>
#include <es.h>


#define EC_TEST     "EC TEST"


typedef void (*ECTestLog) (const char *fmt, ...);
typedef void (*ECTestSleep) (u32 msec);

typedef struct {
    s32 pointsToPurchase;
    s32 itemId;
    ECPrice price;
    ECPayment payment;
} ECTestPurchasePointsParam;

typedef struct {
    ESTitleId titleId;
    s32 itemId;
    ECPrice price;
} ECTestPurchaseTitleParam;

typedef struct {
    ESTitleId titleId;
    s32 itemId;
    ECPrice price;
    const char *identifier;
    const char *identifierKind;
} ECTestGiftingParam;

typedef struct {
    const char *password;
} ECTestParentalControlParam;

typedef ECError (*ECTestFunc) (void *testParam);

typedef struct {
    ECTestFunc testFunc;
    void *testParam;
} ECTestEntry;


ECError ecTest(ECTestLog testLog, ECTestSleep testSleep, const ECNameValue *initArgs, u32 nInitArgs, const char *urls[5], ECTestEntry *testEntries, u32 nTestEntries);

ECError ecTestCleanState(void *testParam);

ECError ecTestRegister(void *testParam);

ECError ecTestUnregister(void *testParam);

ECError ecTestPurchasePoints(void *testParam);

ECError ecTestPurchaseTitle(void *testParam);

ECError ecTestGifting(void *testParam);

ECError ecTestParentalControl(void *testParam);


#endif /* __ECTEST_H__ */
