MySQL 8.0.37
Source Code Documentation
host_application_signal.h
Go to the documentation of this file.
1/* Copyright (c) 2018, 2024, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef HOST_APPLICATION_SIGNAL_H
25#define HOST_APPLICATION_SIGNAL_H
26
28
31 0, ///< shut the application down. no argument
32 HOST_APPLICATION_SIGNAL_LAST = 1 ///< Internal. Not a signal Keep that last
33};
34/**
35 @ingroup group_components_services_inventory
36
37 A service to deliver a signal to host application.
38
39 Typically there'll be just one implementation of this by the main
40 application.
41
42 Other parties interested in listening to shutdown may override the
43 default implementation with a broadcast one and have multiple implementations
44 receiving the shutdown signal. Or do message queueing to a set of background
45 threads etc.
46
47 @sa mysql_component_host_application_signal_imp
48*/
49BEGIN_SERVICE_DEFINITION(host_application_signal)
50/**
51 Send a signal.
52
53 Can send one of @ref host_application_signal_signals
54
55 @param signal_no The signal to trigger
56 @param arg Signal dependent argument
57 @return Status of performed operation
58 @retval false success (valid password)
59 @retval true failure (invalid password)
60
61 @sa my_host_application_signal
62*/
63DECLARE_BOOL_METHOD(signal, (int signal_no, void *arg));
64
65END_SERVICE_DEFINITION(host_application_signal)
66
67#endif /* HOST_APPLICATION_SIGNAL_H */
host_application_signal_signals
Definition: host_application_signal.h:29
@ HOST_APPLICATION_SIGNAL_LAST
Internal. Not a signal Keep that last.
Definition: host_application_signal.h:32
@ HOST_APPLICATION_SIGNAL_SHUTDOWN
shut the application down. no argument
Definition: host_application_signal.h:30
static int signal(mysql_cond_t *that, const char *, unsigned int)
Definition: mysql_cond_v1_native.cc:87
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:112