File: agentest.cc

package info (click to toggle)
mysql-query-browser 1.2.5beta-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 63,792 kB
  • ctags: 46,485
  • sloc: pascal: 249,299; ansic: 80,111; cpp: 72,467; sh: 25,271; objc: 20,015; yacc: 10,755; java: 9,917; xml: 4,580; php: 2,806; python: 1,566; sql: 1,563; makefile: 1,452; perl: 3
file content (54 lines) | stat: -rw-r--r-- 1,172 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

#include "myx_grt_public_interface.h"


#if 0
int main()
{
  MYX_GRT_ERROR error;
  MYX_GRT_AGENT_SESSION *session;
  MYX_GRT_AGENT_STATUS status;
  MYX_GRT_VALUE *arg, *result;
  int done= 0;

  arg= myx_grt_dict_create(NULL,
			"username", MYX_STRING_VALUE, "root",
		        "hostname", MYX_STRING_VALUE, "localhost",
		NULL);

   session= myx_grt_remote_connect("localhost", 12345, "foobar");
   if (session)
	g_message("connect ok");
   else
	g_message("connect FAIL");

   if (myx_grt_remote_function_invoke(session, "ReverseEngineeringMysql", "getSchemata", arg) == MYX_GRTA_OK)
	g_message("invoke OK");

   while (!done)
   {
      g_message("checking..");
      switch (myx_grt_remote_function_check(session))
      {
        case MYX_GRTA_FINISHED:
	g_message("done"); 
        done= 1;
        break; 
        case MYX_GRTA_EXECUTING:
	g_message("working...");
        usleep(50000);
        break;
      }
   }

   result= myx_grt_remote_function_finish(session, &error, &status);
   if (status!= MYX_GRTA_FINISHED)
     g_message("FINISH NOT OK");
 //  else
 //    g_message("success (%i): %s", error, myx_grt_value_to_xml(result));
}
#endif
int main()
{
}