File: ngobjweb_module.c

package info (click to toggle)
sope 5.12.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,588 kB
  • sloc: objc: 169,223; sh: 3,823; ansic: 3,409; javascript: 446; python: 318; makefile: 185
file content (102 lines) | stat: -rw-r--r-- 3,117 bytes parent folder | download | duplicates (10)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
  Copyright (C) 2000-2008 SKYRIX Software AG

  This file is part of SOPE.

  SOPE is free software; you can redistribute it and/or modify it under
  the terms of the GNU Lesser General Public License as published by the
  Free Software Foundation; either version 2, or (at your option) any
  later version.

  SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with SOPE; see the file COPYING.  If not, write to the
  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  02111-1307, USA.
*/

#include "common.h"

static command_rec ngobjweb_cmds[] = {
  {
    "SetSNSPort",
    ngobjweb_set_sns_port,
    NULL,
    OR_FILEINFO,
    TAKE1,
    "the path of the Unix domain address to use (eg /tmp/.snsd)"
  },
  {
    "SetAppPort",
    ngobjweb_set_app_port,
    NULL,
    OR_FILEINFO,
    TAKE1,
    "the path of the Unix domain address to use (eg /tmp/.snsd)"
  },
  {
    "SetAppPrefix",
    ngobjweb_set_app_prefix,
    NULL,
    OR_FILEINFO,
    TAKE1,
    "any prefix that is before the app name (eg /MyDir with /MyDir/MyApp.woa)"
  },
  {
    "SNSUseHTTP",
    ngobjweb_set_use_http,
    NULL,
    OR_FILEINFO,
    0,
    "use HTTP protocol to query snsd (on,off) ?"
  },
  { NULL }
};

#ifdef AP_VERSION_1
static handler_rec ngobjweb_handlers[] = {
  { "ngobjweb-adaptor", ngobjweb_handler },
  { NULL }
};

static void ngobjweb_init(server_rec *_server, pool *_pool) {
}

module ngobjweb_module = {
  STANDARD_MODULE_STUFF,
  ngobjweb_init,              /* initializer */
  ngobjweb_create_dir_config, /* dir config creater */
  ngobjweb_merge_dir_configs, /* dir merger --- default is to override */
  NULL,                       /* server config */
  NULL,                       /* merge server config */
  ngobjweb_cmds,              /* command table */
  ngobjweb_handlers,          /* handlers */
  NULL,                       /* filename translation */ 
  NULL,                       /* check_user_id */
  NULL,                       /* check auth */
  NULL,                       /* check access */
  NULL,                       /* type_checker */
  NULL,                       /* fixups */
  NULL,                       /* logger */
  NULL                        /* header parser */
};
#else
static void ngobjweb_register_hooks(apr_pool_t *p) {
  ap_hook_handler(ngobjweb_handler, NULL, NULL, APR_HOOK_LAST);
}

module AP_MODULE_DECLARE_DATA ngobjweb_module = {
  STANDARD20_MODULE_STUFF,
  ngobjweb_create_dir_config,  /* create per-directory config structures */
  ngobjweb_merge_dir_configs,  /* merge per-directory config structures  */
  NULL,                        /* create per-server config structures    */
  NULL,                        /* merge per-server config structures     */
  ngobjweb_cmds,               /* command handlers */
  ngobjweb_register_hooks      /* register hooks */
};
#endif