Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve library version handling #349

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vak-oskh
Copy link

The main idea is to provide the ability to understand from third-party applications which a class method can be used depending on resiprocate library version.

I am upgrading the resiprocate library for my code from version 1.9.2 to master (possibly 1.13.0) and found the issue: resip::SipMessage::getTransport() vs resip::SipMessage::getReceivedTransportTuple(). I think there will be more )

The PR changes allows to include the header <resip/version.h> header and find the library version by the defined variable RESIPROCATE_VERSION_NUMBER or function RESIPROCATE_VERSION_PREREQ(maj, min, patch).
For example,

const resip::Tuple &tuple = 
#ifdef RESIPROCATE_VERSION_PREREQ(1,13,0)
   *sipMsg.getReceivedTransportTuple();
#else // RESIPROCATE_VERSION_1_9_2
   sipMessage.getReceivedTransport()->getTuple();
#endif

Meanwhile, the resiprocate library staff can use the header <version.h> with the defined variable HAVE_VERSION_H for any cases where the version number is required.

P.S. The idea was borrowed from the OpenSSL library with the definition of OPENSSL_VERSION_NUMBER.

vak-oskh and others added 4 commits March 14, 2024 21:29
Provide `version.h` with the library version data and related macros.
Third-party projects can use the header <resip/version.h> to match the
version and use the proper class interface.
Use a single approach to get the release version from the resiprocate
version file.
Use a single approach to get the release version from the resiprocate
version file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant