MySQL 8.3.0
Source Code Documentation
host_application_signal.h
Go to the documentation of this file.
1/* Copyright (c) 2018, 2023, 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 also distributed 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 included with MySQL.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License, version 2.0, for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef HOST_APPLICATION_SIGNAL_H
24#define HOST_APPLICATION_SIGNAL_H
25
27
30 0, ///< shut the application down. no argument
31 HOST_APPLICATION_SIGNAL_LAST = 1 ///< Internal. Not a signal Keep that last
32};
33/**
34 @ingroup group_components_services_inventory
35
36 A service to deliver a signal to host application.
37
38 Typically there'll be just one implementation of this by the main
39 application.
40
41 Other parties interested in listening to shutdown may override the
42 default implementation with a broadcast one and have multiple implementations
43 receiving the shutdown signal. Or do message queueing to a set of background
44 threads etc.
45
46 @sa mysql_component_host_application_signal_imp
47*/
48BEGIN_SERVICE_DEFINITION(host_application_signal)
49/**
50 Send a signal.
51
52 Can send one of @ref host_application_signal_signals
53
54 @param signal_no The signal to trigger
55 @param arg Signal dependent argument
56 @return Status of performed operation
57 @retval false success (valid password)
58 @retval true failure (invalid password)
59
60 @sa my_host_application_signal
61*/
62DECLARE_BOOL_METHOD(signal, (int signal_no, void *arg));
63
64END_SERVICE_DEFINITION(host_application_signal)
65
66#endif /* HOST_APPLICATION_SIGNAL_H */
host_application_signal_signals
Definition: host_application_signal.h:28
@ HOST_APPLICATION_SIGNAL_LAST
Internal. Not a signal Keep that last.
Definition: host_application_signal.h:31
@ HOST_APPLICATION_SIGNAL_SHUTDOWN
shut the application down. no argument
Definition: host_application_signal.h:29
static int signal(mysql_cond_t *that, const char *, unsigned int)
Definition: mysql_cond_v1_native.cc:89
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:111