diff options
author | Pranav Kant <pranavk@collabora.com> | 2016-06-21 00:15:38 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.com> | 2016-06-21 14:35:59 +0530 |
commit | 90c75f775b6d1ca68389782a3768ee554b528e5d (patch) | |
tree | 2b5d59c8def159996243931e97a4415bd34dee7e /include/LibreOfficeKit | |
parent | 1811e656f08ba011a3c2a51cc60e90d2fa58e4c2 (diff) |
lok: Expose LO version information
Change-Id: Ided924e928c04385457c7a2e231fdf57e7e38970
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 3 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 13 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitGtk.h | 13 |
3 files changed, 29 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index a337bc319168..559d28ae24c7 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -75,6 +75,9 @@ struct _LibreOfficeKitClass void (*setDocumentPassword) (LibreOfficeKit* pThis, char const* pURL, char const* pPassword); + + /// @see lok::Office::getVersionInfo(). + char* (*getVersionInfo) (LibreOfficeKit* pThis); #endif }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index c496e2e5e7b8..46a5e964f751 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -546,6 +546,19 @@ public: { mpThis->pClass->setDocumentPassword(mpThis, pURL, pPassword); } + + /** + * Get version information of the LOKit process + * + * @returns string containing version information in format: + * PRODUCT_NAME PRODUCT_VERSION PRODUCT_EXTENSION BUILD_ID + * + * Eg: LibreOffice 5.3 .0.0 alpha0 <commit hash> + */ + inline char* getVersionInfo() + { + return mpThis->pClass->getVersionInfo(mpThis); + } #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h index a0082be72e27..4b4284e423fc 100644 --- a/include/LibreOfficeKit/LibreOfficeKitGtk.h +++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h @@ -316,6 +316,19 @@ void lok_doc_view_set_document_password (LOKDocView* const gchar* pPassword); /** + * lok_doc_view_get_version_info: + * @pDocView: The #LOKDocView instance + * + * Get version information of underlying LOKit process + * + * Returns: string containing version information in format + * PRODUCT_NAME PRODUCT_VERSION PRODUCT_EXTENSION BUILD_ID + * + * Eg: LibreOffice 5.3 .0.0.alpha0 <commit hash> + */ +gchar* lok_doc_view_get_version_info (LOKDocView* pDocView); + +/** * lok_doc_view_pixel_to_twip: * @pDocView: The #LOKDocView instance * @fInput: The value in pixels to convert to twips |