/[baselayout]/trunk/src/rc.h
Gentoo

Diff of /trunk/src/rc.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2977 Revision 2978
85/*! Lists the extra options a service has 85/*! Lists the extra options a service has
86 * @param service to load the options from 86 * @param service to load the options from
87 * @return NULL terminated string list of options */ 87 * @return NULL terminated string list of options */
88char **rc_service_options (const char *service); 88char **rc_service_options (const char *service);
89 89
90/*! Return a saved value for a service
91 * @param service to check
92 * @param option to load
93 * @return saved value */
94char *rc_service_value_get (const char *service, const char *option);
95
96/*! Save a persistent value for a service
97 * @param service to save for
98 * @param option to save
99 * @param value of the option
100 * @return true if saved, otherwise false */
101bool rc_service_value_set (const char *service, const char *option,
102 const char *value);
103
90/*! Resolves a service name to its full path. 104/*! Resolves a service name to its full path.
91 * @param service to check 105 * @param service to check
92 * @return pointer to full path of service */ 106 * @return pointer to full path of service */
93char *rc_service_resolve (const char *service); 107char *rc_service_resolve (const char *service);
94
95/*! Checks if a service in in a state
96 * @param service to check
97 * @return state of the service */
98rc_service_state_t rc_service_state (const char *service);
99
100/*! Start a service
101 * @param service to start
102 * @return pid of the service starting process */
103pid_t rc_service_start (const char *service);
104
105/*! Stop a service
106 * @param service to stop
107 * @return pid of service stopping process */
108pid_t rc_service_stop (const char *service);
109 108
110/*! Schedule a service to be started when another service starts 109/*! Schedule a service to be started when another service starts
111 * @param service that starts the scheduled service when started 110 * @param service that starts the scheduled service when started
112 * @param service_to_start service that will be started */ 111 * @param service_to_start service that will be started */
113bool rc_service_schedule_start (const char *service, 112bool rc_service_schedule_start (const char *service,
120 119
121/*! Clear the list of services scheduled to be started by this service 120/*! Clear the list of services scheduled to be started by this service
122 * @param service to clear */ 121 * @param service to clear */
123void rc_service_schedule_clear (const char *service); 122void rc_service_schedule_clear (const char *service);
124 123
124/*! Checks if a service in in a state
125 * @param service to check
126 * @return state of the service */
127rc_service_state_t rc_service_state (const char *service);
128
129/*! Start a service
130 * @param service to start
131 * @return pid of the service starting process */
132pid_t rc_service_start (const char *service);
133
134/*! Stop a service
135 * @param service to stop
136 * @return pid of service stopping process */
137pid_t rc_service_stop (const char *service);
138
125/*! Wait for a service to finish 139/*! Wait for a service to finish
126 * @param service to wait for 140 * @param service to wait for
127 * @return true if service finished before timeout, otherwise false */ 141 * @return true if service finished before timeout, otherwise false */
128bool rc_service_wait (const char *service); 142bool rc_service_wait (const char *service);
129 143
130/*! Return a saved value for a service
131 * @param service to check
132 * @param option to load
133 * @return saved value */
134char *rc_service_option_get (const char *service, const char *option);
135/*! Save a persistent value for a service
136 * @param service to save for
137 * @param option to save
138 * @param value of the option
139 * @return true if saved, otherwise false */
140bool rc_service_option_set (const char *service, const char *option,
141 const char *value);
142/*! Save the arguments to find a running daemon 144/*! Save the arguments to find a running daemon
143 * @param service to save arguments for 145 * @param service to save arguments for
144 * @param exec that we started 146 * @param exec that we started
145 * @param name of the process (optional) 147 * @param name of the process (optional)
146 * @param pidfile of the process (optional) 148 * @param pidfile of the process (optional)

Legend:
Removed from v.2977  
changed lines
  Added in v.2978

  ViewVC Help
Powered by ViewVC 1.1.20