MySQL 9.4.0
Source Code Documentation
mysql_library_ext.h
Go to the documentation of this file.
1/* Copyright (c) 2025, 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 MYSQL_LIBRARY_EXT_H
25#define MYSQL_LIBRARY_EXT_H
26
29
31
32/**
33 Services for reading the properties of the Libraries that are imported
34 by the routines.
35
36 How to use:
37 my_h_library library_handle;
38 library->init(nullptr, schema, name, version, &library_handle);
39 mysql_cstring_with_length body;
40 bool is_binary;
41 library_ext->get_body(library_handle, &is_binary);
42 // ... use the body throughout the caller.
43 library->deinit(library_handle);
44*/
45BEGIN_SERVICE_DEFINITION(mysql_library_ext)
46
47/**
48 Get library's body.
49
50 @param [in] library_handle Handle to library.
51 @param [out] body Library's body.
52 @param [out] is_binary Is the library body stored with a binary
53 character set?
54
55 @note: The returned Library's body is valid only while the library_handle
56 is valid.
57
58 @returns Status of get operation:
59 @retval false Success.
60 @retval true Failure.
61*/
62DECLARE_BOOL_METHOD(get_body,
63 (my_h_library library_handle,
64 mysql_cstring_with_length *body, bool *is_binary));
65
66END_SERVICE_DEFINITION(mysql_library_ext)
67
68#endif /* MYSQL_LIBRARY_EXT_H */
struct my_h_library_imp * my_h_library
Definition: mysql_library.h:31
String related data structures.
#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 DEFINE_SERVICE_HANDLE(name)
Defines an object type that is meant for carrying handles to the implementation-specific objects used...
Definition: service.h:129
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:112
String with length information.
Definition: mysql_string_defs.h:33