api: don't use intermediate variables for deprecation warnings

Using an intermediate constant variable breaks compilation with C
compilers, as these variables cannot be used as initializers.

Instead, define a deprecated type and cast all deprecated symbols to
that type. We lose the information about what the new replacement
symbol is, but we don't break compilation.

Also, add MBIM_DISABLE_DEPRECATED guards around deprecated symbols. So
that when this symbol is defined, e.g. via CFLAGS, building a program
that uses the libmbim 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.

Equivalent to ModemManager commits eedd4ab4457 and f0bb6ef856.
4 files changed