Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


#include "../include/btcap-helper.h"

const char* libraryPath = "./btcap.dll";

int main(int argc, char* argv[])
{
// TODO: pass these as command line arguments.
const char* btcapConfigPath = "./btcap.cfg";
const char* btcapConfigSection = "wlan0-ipv4";

printf("Checking if BTCap is available...\n");
bool ok = BTCap_isAvailable(libraryPath);
if (!ok)
{
printf(" BTCap is NOT available. Exiting.\n");
return 10;
}

printf(" BTCap is available.\n");

int rc;

BTCapHelper* btcap = BTCap_GetHelper(libraryPath);

printf("Starting btcap session...\n");

rc = btcap->Start(btcapConfigPath, btcapConfigSection);
if(rc)
{
printf("btcap_start FAILED. Exiting.\n");
return 11;
}

SetConsoleCtrlHandler(console_ctrl_handler, TRUE);

printf("Running btcap session...\n");

while (!g_exit)
{
// Do other stuff
Sleep(1000);
}

printf("Stopping btcap session...\n");

btcap->Stop();

delete btcap;

printf("Exiting...\n");

return 0;
}

Implementation Overview

(to be added...)

Questions

Below is a list of questions to be addressed as a result of this requirements document:

...