new upstream release 0.5.0

f41
David Tardon 10 years ago
parent 83b022808a
commit 7bd278c2ff

1
.gitignore vendored

@ -4,3 +4,4 @@
/libcmis-0.3.0.tar.gz
/libcmis-0.3.1.tar.gz
/libcmis-0.4.1.tar.gz
/libcmis-0.5.0.tar.gz

@ -1,25 +0,0 @@
From 433fad370ddd30c43df281b40ff468a842bc1c70 Mon Sep 17 00:00:00 2001
From: Adam Conrad <adconrad@ubuntu.com>
Date: Thu, 6 Feb 2014 09:13:32 +0100
Subject: [PATCH] Fix int/bool confusion on big-endian architectures.
---
qa/libcmis-c/test-document.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qa/libcmis-c/test-document.cxx b/qa/libcmis-c/test-document.cxx
index ccf2224..eb2c01c 100644
--- a/qa/libcmis-c/test-document.cxx
+++ b/qa/libcmis-c/test-document.cxx
@@ -43,7 +43,7 @@
using namespace std;
-extern int isOutOfMemory;
+extern bool isOutOfMemory;
namespace
{
--
1.8.5.3

@ -1,68 +0,0 @@
From 1f48b994ac987c20f8da2e4fa9ec0399877655c7 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 4 Sep 2014 16:48:00 +0200
Subject: [PATCH] coverity: return const string&
Otherwise the use in the C wrapper functions is invalid, as the
functions return char* from a string object that is destroyed in the
function scope.
---
src/libcmis/oauth2-data.hxx | 12 ++++++------
src/libcmis/rendition.hxx | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/libcmis/oauth2-data.hxx b/src/libcmis/oauth2-data.hxx
index aa99e2c..000f939 100644
--- a/src/libcmis/oauth2-data.hxx
+++ b/src/libcmis/oauth2-data.hxx
@@ -62,12 +62,12 @@ namespace libcmis
bool isComplete();
- std::string getAuthUrl() { return m_authUrl; }
- std::string getTokenUrl() { return m_tokenUrl; }
- std::string getClientId() { return m_clientId; }
- std::string getClientSecret() { return m_clientSecret; }
- std::string getScope() { return m_scope; }
- std::string getRedirectUri() { return m_redirectUri; }
+ const std::string& getAuthUrl() { return m_authUrl; }
+ const std::string& getTokenUrl() { return m_tokenUrl; }
+ const std::string& getClientId() { return m_clientId; }
+ const std::string& getClientSecret() { return m_clientSecret; }
+ const std::string& getScope() { return m_scope; }
+ const std::string& getRedirectUri() { return m_redirectUri; }
};
typedef ::boost::shared_ptr< OAuth2Data > OAuth2DataPtr;
}
diff --git a/src/libcmis/rendition.hxx b/src/libcmis/rendition.hxx
index 820b58d..c58b7ac 100644
--- a/src/libcmis/rendition.hxx
+++ b/src/libcmis/rendition.hxx
@@ -65,18 +65,18 @@ namespace libcmis
bool isThumbnail( ) { return m_kind == "cmis:thumbnail"; }
- std::string getStreamId( ) const { return m_streamId; }
- std::string getMimeType( ) const { return m_mimeType; }
- std::string getKind( ) const { return m_kind; }
- std::string getUrl( ) const { return m_href; }
- std::string getTitle( ) const { return m_title; }
+ const std::string& getStreamId( ) const { return m_streamId; }
+ const std::string& getMimeType( ) const { return m_mimeType; }
+ const std::string& getKind( ) const { return m_kind; }
+ const std::string& getUrl( ) const { return m_href; }
+ const std::string& getTitle( ) const { return m_title; }
/** Provides the stream length in bytes or a negative value if missing.
*/
long getLength( ) const { return m_length; }
long getWidth( ) const { return m_width; }
long getHeight( ) const { return m_height; }
- std::string getRenditionDocumentId( ) { return m_renditionDocumentId; }
+ const std::string& getRenditionDocumentId( ) { return m_renditionDocumentId; }
std::string toString( );
};
--
1.9.3

@ -1,107 +0,0 @@
From 043561716b1c7c23c1576631c5bdca93e6e9ffe5 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Fri, 5 Sep 2014 09:53:50 +0200
Subject: [PATCH] fix mismatching exceptions
---
src/libcmis/base-session.cxx | 56 +++++++++++++++++++++++++++++++++++---------
1 file changed, 45 insertions(+), 11 deletions(-)
diff --git a/src/libcmis/base-session.cxx b/src/libcmis/base-session.cxx
index 7f6a413..80c53e4 100644
--- a/src/libcmis/base-session.cxx
+++ b/src/libcmis/base-session.cxx
@@ -287,8 +287,15 @@ libcmis::HttpResponsePtr BaseSession::httpGetRequest( string url ) throw ( CurlE
// Need to use the refresh token to get a new one.
if ( getHttpStatus( ) == 401 && !getRefreshToken( ).empty( ) && !m_refreshedToken )
{
- // Refresh the token
- m_oauth2Handler->refresh( );
+ try
+ {
+ // Refresh the token
+ m_oauth2Handler->refresh( );
+ }
+ catch ( const libcmis::Exception& e )
+ {
+ throw CurlException( e.what() );
+ }
// Resend the query
try
@@ -370,8 +377,15 @@ libcmis::HttpResponsePtr BaseSession::httpPutRequest( string url, istream& is, v
if ( status == 401 && !getRefreshToken( ).empty( ) && !m_refreshedToken )
{
- // Refresh the token
- m_oauth2Handler->refresh( );
+ try
+ {
+ // Refresh the token
+ m_oauth2Handler->refresh( );
+ }
+ catch ( const libcmis::Exception& e )
+ {
+ throw CurlException( e.what() );
+ }
// Resend the query
try
@@ -457,8 +471,15 @@ libcmis::HttpResponsePtr BaseSession::httpPostRequest( const string& url, istrea
// Need to use the refresh token to get a new one.
if ( status == 401 && !getRefreshToken( ).empty( ) && !m_refreshedToken )
{
- // Refresh the token
- m_oauth2Handler->refresh( );
+ try
+ {
+ // Refresh the token
+ m_oauth2Handler->refresh( );
+ }
+ catch ( const libcmis::Exception& e )
+ {
+ throw CurlException( e.what() );
+ }
// Resend the query
try
@@ -501,9 +522,16 @@ void BaseSession::httpDeleteRequest( string url ) throw ( CurlException )
// Need to use the refresh token to get a new one.
if ( getHttpStatus( ) == 401 && !getRefreshToken( ).empty( ) && !m_refreshedToken )
{
-
- // Refresh the token
- m_oauth2Handler->refresh( );
+ try
+ {
+ // Refresh the token
+ m_oauth2Handler->refresh( );
+ }
+ catch ( const libcmis::Exception& e )
+ {
+ throw CurlException( e.what() );
+ }
+
// Resend the query
try
{
@@ -722,8 +750,14 @@ void BaseSession::setOAuth2Data( libcmis::OAuth2DataPtr oauth2 ) throw ( libcmis
// Try to get the authentication code using the given provider.
- authCode = m_oauth2Handler->oauth2Authenticate( );
-
+ try
+ {
+ authCode = m_oauth2Handler->oauth2Authenticate( );
+ }
+ catch ( const CurlException& e )
+ {
+ throw e.getCmisException( );
+ }
// If that didn't work, call the fallback provider from SessionFactory
try
--
1.9.3

@ -1,8 +1,8 @@
%global apiversion 0.4
%global apiversion 0.5
Name: libcmis
Version: 0.4.1
Release: 8%{?dist}
Version: 0.5.0
Release: 1%{?dist}
Summary: A C++ client library for CM interfaces
Group: System Environment/Libraries
@ -16,10 +16,6 @@ BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: xmlto
Patch0: 0001-Fix-int-bool-confusion-on-big-endian-architectures.patch
Patch1: 0001-coverity-return-const-string.patch
Patch2: 0001-fix-mismatching-exceptions.patch
%description
LibCMIS is a C++ client library for working with CM (content management)
interfaces. The primary supported interface (which gave the library its
@ -87,6 +83,9 @@ make check
%{_mandir}/man1/cmis-client.1*
%changelog
* Sun Dec 21 2014 David Tardon <dtardon@redhat.com> - 0.5.0-1
- new upstream release
* Fri Sep 05 2014 David Tardon <dtardon@redhat.com> - 0.4.1-8
- coverity: fix mismatching exceptions

@ -1 +1 @@
22f8a85daf4a012180322e1f52a7563b libcmis-0.4.1.tar.gz
5821b806a98e6c38370970e682ce76e8 libcmis-0.5.0.tar.gz

Loading…
Cancel
Save