Passenger: AgentsStarter.h Source File

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List

# AgentsStarter.h

    00001 /* C wrappers for Passenger::AgentsStarter. */
    00002 #ifndef _PASSENGER_AGENTS_STARTER_H_
    00003 #define _PASSENGER_AGENTS_STARTER_H_
    00004
    00005 #include <sys/types.h>
    00006 #include <unistd.h>
    00007
    00008 #ifdef __cplusplus
    00009         extern "C" {
    00010 #endif
    00011
    00012
    00013 typedef void AgentsStarter;
    00014
    00015 typedef enum {
    00016         AS_APACHE,
    00017         AS_NGINX
    00018 } AgentsStarterType;
    00019
    00020 typedef void (*AfterForkCallback)(void *);
    00021
    00022 AgentsStarter *agents_starter_new(AgentsStarterType type, char **error_message);
    00023 int  agents_starter_start(AgentsStarter *as,
    00024                           unsigned int logLevel, pid_t webServerPid,
    00025                           const char *tempDir, int userSwitching,
    00026                           const char *defaultUser, const char *defaultGroup,
    00027                           uid_t webServerWorkerUid, gid_t webServerWorkerGid,
    00028                           const char *passengerRoot,
    00029                           const char *rubyCommand, unsigned int maxPoolSize,
    00030                           unsigned int maxInstancesPerApp,
    00031                           unsigned int poolIdleTime,
    00032                           const char *analyticsLogDir, const char *analyticsLogUser,
    00033                           const char *analyticsLogGroup, const char *analyticsLogPermissions,
    00034                           const char **prestartURLs, unsigned int prestartURLsCount,
    00035                           const AfterForkCallback afterFork,
    00036                           void *callbackArgument,
    00037                           char **errorMessage);
    00038 const char *agents_starter_get_request_socket_filename(AgentsStarter *as, unsigned int *size);
    00039 const char *agents_starter_get_request_socket_password(AgentsStarter *as, unsigned int *size);
    00040 const char *agents_starter_get_server_instance_dir(AgentsStarter *as);
    00041 const char *agents_starter_get_generation_dir(AgentsStarter *as);
    00042 pid_t       agents_starter_get_pid(AgentsStarter *as);
    00043 void        agents_starter_detach(AgentsStarter *as);
    00044 void        agents_starter_free(AgentsStarter *as);
    00045
    00046
    00047 #ifdef __cplusplus
    00048         }
    00049 #endif
    00050
    00051 #endif /* _PASSENGER_AGENTS_STARTER_H_ */