api: add MM_DISABLE_DEPRECATED guards around deprecated symbols
When this symbol is defined, e.g. via CFLAGS, building a program that uses the ModemManager API will fail if the program references deprecated symbols. For now we just use it to keep gtk-doc-scan happy and avoid unnecessary warnings.
This commit is contained in:
@@ -18,7 +18,7 @@ DOC_MODULE = ModemManager
|
|||||||
DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
|
DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
|
||||||
|
|
||||||
# Extra options to supply to gtkdoc-scan
|
# Extra options to supply to gtkdoc-scan
|
||||||
SCAN_OPTIONS =
|
SCAN_OPTIONS = --deprecated-guards="MM_DISABLE_DEPRECATED"
|
||||||
|
|
||||||
# The directory containing the source code.
|
# The directory containing the source code.
|
||||||
DOC_SOURCE_DIR = $(top_srcdir)/include
|
DOC_SOURCE_DIR = $(top_srcdir)/include
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
#include <ModemManager-enums.h>
|
#include <ModemManager-enums.h>
|
||||||
|
|
||||||
|
#ifndef MM_DISABLE_DEPRECATED
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:mm-compat
|
* SECTION:mm-compat
|
||||||
* @title: API break replacements
|
* @title: API break replacements
|
||||||
@@ -687,4 +689,6 @@ typedef int MMModemBandDeprecated;
|
|||||||
*/
|
*/
|
||||||
#define MM_MODEM_BAND_CDMA_BC19_US_LOWER_700 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC19)
|
#define MM_MODEM_BAND_CDMA_BC19_US_LOWER_700 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC19)
|
||||||
|
|
||||||
|
#endif /* MM_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
#endif /* _MODEMMANAGER_COMPAT_H_ */
|
#endif /* _MODEMMANAGER_COMPAT_H_ */
|
||||||
|
Reference in New Issue
Block a user