mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-21 06:03:12 +00:00
51ed6162dd
fdpoll will now run a callback when about to sleep / woke up. A new Java interface to indicate server started / sleeping / waking up. An android implementation may allow the CPU to sleep. If there's a java exception the server will try to shutdown. Calling servald stop is currently undefined.
38 lines
1.2 KiB
C
38 lines
1.2 KiB
C
/*
|
|
Copyright (C) 2012-2014 Serval Project Inc.
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program 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 General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifndef __SERVAL_DNA__SERVER_H
|
|
#define __SERVAL_DNA__SERVER_H
|
|
|
|
#define SERVER_RUNNING 1
|
|
#define SERVER_CLOSING 2
|
|
|
|
DECLARE_ALARM(server_shutdown_check);
|
|
DECLARE_ALARM(server_watchdog);
|
|
DECLARE_ALARM(server_config_reload);
|
|
DECLARE_ALARM(rhizome_sync_announce);
|
|
DECLARE_ALARM(fd_periodicstats);
|
|
|
|
extern __thread int serverMode;
|
|
|
|
int server_pid();
|
|
int server_write_proc_state(const char *path, const char *fmt, ...);
|
|
int server_get_proc_state(const char *path, char *buff, size_t buff_len);
|
|
|
|
#endif // __SERVAL_DNA__SERVER_H
|