#ifndef __INTERSWITCH_H__
#define __INTERSWITCH_H__

#include "vars.h" 

#include <cstring>
#include <ext/hash_map>

using namespace std;
using namespace __gnu_cxx;

/*****************************************************************************/
struct eqstr{
  bool operator()(const char* s1, const char* s2) const {
    return strcmp(s1,s2)==0;
  }
};
/*****************************************************************************/

long interswitch_config_ssl(const char *keyfile, const char *password, const char *cacert, long version);
long interswitch_getBillers(const char *endpoint, const char *tid, int billerId, int categoryId, int channelId, const char *billerName, char *status, long(*save)(hash_map<const char*, const char*, hash<const char*>, eqstr>));
long interswitch_getBillerPaymentItems(const char *endpoint, const char *tid, int billerId, char *status, long(*save)(const char*, hash_map<const char*, const char*, hash<const char*>, eqstr>));
long interswitch_getBillerCategories(const char *endpoint, char *error, long(*save)(hash_map<const char*, const char*, hash<const char*>, eqstr>));
string interswitch_getBankCodes(const char *endpoint, const char *tid, char *status);
string interswitch_queryTransaction(const char *endpoint, const char *tid, const char *transferCode, const char *requestReference, char *status, char *transactionResponseCode);
long interswitch_getBalance(const char *endpoint, const char *tid, const char *mkey, const char *pin, char *status);
string interswitch_transferFunds(const char *endpoint, const char *tid, const char *mkey, const char *pin, char *error, const char *account, const char *uniqueRef, const char *bankCode, long currency, long amount ,CVars trans_info);
string interswitch_SendBillPaymentAdvice(const char *endpoint, const char *tid, long amount, const char *paymentCode, long customerId, const char *requestReference, char *status, char *transactionRef,char *customer_mobile,char *customer_email);
string interswitch_doTransfer(const char *endpoint, const char *tid, CVars trans_info, char *error);
//char * interswitch_pinChange(const char *tid, const char *mkey, const char *pin, char *status);
long interswitch_test();

#endif

/*
vi:ts=2
*/
