diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-12-22 21:43:08 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-12-22 21:43:08 +0000 |
commit | 07ddfbd5994267e0f1aba52040a25db90ed8924b (patch) | |
tree | e33f1fe629f4e74b4bb31cbdcf41a2c2451bf599 /plugins/!NotAdopted/IMO2sProxy/src/imo2skype/imo2stest.c | |
parent | 3c0a624abd362e45502619648670ace62b2efa3e (diff) |
IMO2sProxy reverted. maybe will be needed later
git-svn-id: http://svn.miranda-ng.org/main/trunk@2809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/!NotAdopted/IMO2sProxy/src/imo2skype/imo2stest.c')
-rw-r--r-- | plugins/!NotAdopted/IMO2sProxy/src/imo2skype/imo2stest.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/plugins/!NotAdopted/IMO2sProxy/src/imo2skype/imo2stest.c b/plugins/!NotAdopted/IMO2sProxy/src/imo2skype/imo2stest.c new file mode 100644 index 0000000000..3007e3ce06 --- /dev/null +++ b/plugins/!NotAdopted/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 <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#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;
+}
|