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

Add access to gp_library_version function #67

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Add access to gp_library_version function #67

merged 1 commit into from
Aug 23, 2024

Conversation

h3x4d3c1m4l
Copy link
Contributor

Usage example:

use ::gphoto2::libgphoto2_sys::{gp_library_version, GPVersionVerbosity};

pub fn get_version_info() -> String {
    // Returns "2.5.31" as of now if latest stable is available
    unsafe {
        CStr::from_ptr(*gp_library_version(GPVersionVerbosity::GP_VERSION_SHORT))
    }.to_string_lossy().into_owned()
}

@maxicarlos08 maxicarlos08 merged commit 502f3d2 into maxicarlos08:master Aug 23, 2024
0 of 3 checks passed
@h3x4d3c1m4l h3x4d3c1m4l deleted the lib-version branch August 23, 2024 15:01
@maxicarlos08
Copy link
Owner

@h3x4d3c1m4l Published a new version and also included a utility function in the gphoto2 crate similar to yours

@h3x4d3c1m4l
Copy link
Contributor Author

Awesome, thanks for merging!

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.

2 participants