libpldm: Explicit deprecated, stable and testing ABI classes

Experimenting with new APIs is important, but ABI stability of the
library is also important. We wish to have the freedom to add APIs
without being burdened by them being immediately set in stone.

We implement this wish by introducing three classes of ABI:

1. deprecated
2. stable
3. testing

These are enforced by corresponding function attributes:

1. LIBPLDM_ABI_DEPRECATED
2. LIBPLDM_ABI_STABLE
3. LIBPLDM_ABI_TESTING

Symbol visibility in the library is flipped to 'hidden' by default, so
one of these annotations must be used for the symbol to be exposed.

With these classes in place there are now clear points in time at which
we update the ABI dumps captured under the abi/ directory: When an API
is migrated from the 'testing' class to the 'stable' class, or when
removed from the 'deprecated' class.

Which classes of functions are exposed by the build is controlled by the
new 'abi' meson option. The option is of array type which contains the
list of ABI classes the build should consider. It defaults to enabling
all classes to provide test coverage in CI. The classes used should be
constrained to deprecated and stable (and not test) in any dependent
projects.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I25402e20c7be9c9f264f9ccd7ac36b384823734c
diff --git a/src/transport/transport.c b/src/transport/transport.c
index 77a33f8..0cbef29 100644
--- a/src/transport/transport.c
+++ b/src/transport/transport.c
@@ -1,3 +1,4 @@
+#include "config.h"
 #include "libpldm/transport.h"
 #include "base.h"
 #include "libpldm/requester/pldm.h"
@@ -29,6 +30,7 @@
 }
 #endif
 
+LIBPLDM_ABI_TESTING
 pldm_requester_rc_t pldm_transport_poll(struct pldm_transport *transport,
 					int timeout)
 {
@@ -50,6 +52,7 @@
 	return PLDM_REQUESTER_SUCCESS;
 }
 
+LIBPLDM_ABI_TESTING
 pldm_requester_rc_t pldm_transport_send_msg(struct pldm_transport *transport,
 					    pldm_tid_t tid,
 					    const void *pldm_req_msg,
@@ -71,6 +74,7 @@
 	return transport->send(transport, tid, pldm_req_msg, req_msg_len);
 }
 
+LIBPLDM_ABI_TESTING
 pldm_requester_rc_t pldm_transport_recv_msg(struct pldm_transport *transport,
 					    pldm_tid_t tid,
 					    void **pldm_resp_msg,
@@ -146,6 +150,7 @@
 	return 0;
 }
 
+LIBPLDM_ABI_TESTING
 pldm_requester_rc_t
 pldm_transport_send_recv_msg(struct pldm_transport *transport, pldm_tid_t tid,
 			     const void *pldm_req_msg, size_t req_msg_len,