Audiovox P965 Datový list Strana 239

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 280
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 238
API in C
236
char *szIPaddr;
char *szPort = "8728"; // default port string
int iPort; // default port int
char *szUsername = "admin"; // default username
char *szPassword = ""; // default password
int iInteractiveMode = 1; // interactive mode...if set to 0, will supress all non-API output
int iLoginResult;
int iIndex;
char cWordInput[256]; // limit user word input to 256 chars
char *szNewline; // used for word input from the user
struct Sentence stSentence;
struct Block stBlock;
// check number of args. if not correct, call usage and exit
if (argc < 2)
{
usage();
exit(0);
}
// parse command line parameters
else
{
for (iIndex=0; iIndex<argc; iIndex++)
{
if (strstr(argv[iIndex], "-u"))
{
szUsername = &argv[iIndex][2];
}
else if (strstr(argv[iIndex], "-p"))
{
szPassword = &argv[iIndex][2];
}
else if (strstr(argv[iIndex], "-P"))
{
szPort = &argv[iIndex][2];
}
else if (strstr(argv[iIndex], "--quiet"))
{
iInteractiveMode = 0;
}
}
// assume the last parameter is the IP address
szIPaddr = argv[argc-1];
Zobrazit stránku 238
1 2 ... 234 235 236 237 238 239 240 241 242 243 244 ... 279 280

Komentáře k této Příručce

Žádné komentáře