graphic._pike
Go to the documentation of this file.
1 /*0*/
2 inherit Service.Service;
3 #include <macros.h>
4 #include <events.h>
5 class graphic {
6 public:
7 
8 
9 mixed getAttribute (object obj, string key) {
10  return obj->query_attribute(key);
11 }
12 
13 void call_service(object user, mixed args, int|void id) {
14  werror("Graphic Service called with %O\n", args);
15 
16  object image = args[0];
17  int xsize = args[1];
18  int ysize = args[2];
19  bool maintain_aspect = args[3];
20 
21  string result = Graphic.get_thumbnail(image, xsize, ysize, maintain_aspect, true);
22 
23  async_result(id, result);
24  //if ( id ) async_result(result);
25  //else callback_service(user, id, result);
26 }
27 
28 protected:
29  void run() {
30 }
31 
32 public:
33 
34 private:
35  private void got_kill(int sig) {
36  _exit(1);
37 }
38 
39 public:
40 
41 int main(int argc, array argv)
42 {
43  signal(signum("QUIT"), got_kill);
44  init( "graphic", argv );
45  start();
46  return -17;
47 }
48 
49 
50 
51 };