MySQL  8.0.19
Source Code Documentation
host_application_signal.h
Go to the documentation of this file.
1 /* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2 
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6 
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, 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 */
48 BEGIN_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 */
62 DECLARE_BOOL_METHOD(signal, (int signal_no, void *arg));
63 
64 END_SERVICE_DEFINITION(host_application_signal)
65 
66 #endif /* HOST_APPLICATION_SIGNAL_H */
host_application_signal_signals
host_application_signal_signals
Definition: host_application_signal.h:28
END_SERVICE_DEFINITION
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
BEGIN_SERVICE_DEFINITION
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
service.h
HOST_APPLICATION_SIGNAL_LAST
@ HOST_APPLICATION_SIGNAL_LAST
Internal. Not a signal Keep that last.
Definition: host_application_signal.h:31
DECLARE_BOOL_METHOD
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:111
HOST_APPLICATION_SIGNAL_SHUTDOWN
@ HOST_APPLICATION_SIGNAL_SHUTDOWN
shut the application down. no argument
Definition: host_application_signal.h:29