flash/nor: add support for Nuvoton NPCX series flash
[fw/openocd] / src / server / server.h
index c6a15bc297f056b555efae1295c7a4c24b5dc220..de18d2b4b66680ad0baca4d39f592b08f25aea6d 100644 (file)
  *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
-#ifndef SERVER_H
-#define SERVER_H
+#ifndef OPENOCD_SERVER_SERVER_H
+#define OPENOCD_SERVER_SERVER_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <helper/log.h>
+#include <helper/replacements.h>
 
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
@@ -45,7 +50,7 @@ struct connection {
        struct sockaddr_in sin;
        struct command_context *cmd_ctx;
        struct service *service;
-       int input_pending;
+       bool input_pending;
        void *priv;
        struct connection *next;
 };
@@ -74,11 +79,16 @@ int add_service(char *name, const char *port,
                int max_connections, new_connection_handler_t new_connection_handler,
                input_handler_t in_handler, connection_closed_handler_t close_handler,
                void *priv);
+int remove_service(const char *name, const char *port);
+
+int server_host_os_entry(void);
+int server_host_os_close(void);
 
 int server_preinit(void);
 int server_init(struct command_context *cmd_ctx);
 int server_quit(void);
-void exit_on_signal(int);
+void server_free(void);
+void exit_on_signal(int sig);
 
 int server_loop(struct command_context *command_context);
 
@@ -109,4 +119,4 @@ COMMAND_HELPER(server_port_command, unsigned short *out);
 #define ERROR_SERVER_REMOTE_CLOSED             (-400)
 #define ERROR_CONNECTION_REJECTED              (-401)
 
-#endif /* SERVER_H */
+#endif /* OPENOCD_SERVER_SERVER_H */