From b880db8491271b4bd4aa87c2dd79b5e3c3dde6cf Mon Sep 17 00:00:00 2001 From: watcherhd Date: Thu, 17 Nov 2011 18:46:23 +0000 Subject: added: ieview, imo2sproxy, skype git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@175 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- imo2sproxy/src/imo2skype/imo2stest.c | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 imo2sproxy/src/imo2skype/imo2stest.c (limited to 'imo2sproxy/src/imo2skype/imo2stest.c') diff --git a/imo2sproxy/src/imo2skype/imo2stest.c b/imo2sproxy/src/imo2skype/imo2stest.c new file mode 100644 index 0000000..3007e3c --- /dev/null +++ b/imo2sproxy/src/imo2skype/imo2stest.c @@ -0,0 +1,60 @@ +/* Module: imo2stest.c + Purpose: Simple test application for imo2skypeapi + Author: leecher + Date: 31.08.2009 +*/ +#include +#include +#include +#include "imo2skypeapi.h" + +// ----------------------------------------------------------------------------- +// Static +// ----------------------------------------------------------------------------- +static void Recv(char *pszMsg, void *pUser) +{ + printf ("< %s\n", pszMsg); +} + +// ----------------------------------------------------------------------------- +// EIP +// ----------------------------------------------------------------------------- +int main(int argc, char **argv) +{ + int iRet = -1; + IMOSAPI *pInst; + char *pszError = NULL; + + if (argc<3) + { + printf ("Usage: %s [username] [password]\n", argv[0]); + return -1; + } + + if (!(pInst = Imo2S_Init(Recv, NULL,0))) + { + fprintf (stderr, "Failed initialization.\n"); + return -1; + } + + /* Logon */ + if (Imo2S_Login(pInst, argv[1], argv[2], &pszError) == 1) + { + /* Dispatch loop */ + char szLine[4096]={0}; + + while (gets(szLine)) + { + Imo2S_Send (pInst, szLine); + memset (szLine, 0, sizeof(szLine)); + } + } + else + { + fprintf (stderr, "Login failed: %s\n", pszError); + return -1; + } + + Imo2S_Exit (pInst); + return iRet; +} -- cgit v1.2.3