Update git submodules
[LibreOffice.git] / external / libcmis / initprotocols.patch.1
blob5e1d8943c699924f225df3e6df647d5ed3ab2cc3
1 --- libcmis/src/libcmis/session-factory.cxx.orig        2024-06-21 17:40:02.696092806 +0200
2 +++ libcmis/src/libcmis/session-factory.cxx     2024-06-21 17:32:21.759833389 +0200
3 @@ -75,12 +75,15 @@
4              if ( bindingUrl == "https://www.googleapis.com/drive/v3" )
5              {
6                  session = new GDriveSession( bindingUrl, username, password,
7 -                                             oauth2, verbose );
8 +                                             oauth2, verbose,
9 +                                             g_CurlInitProtocolsFunction);
11              }
12              else if ( bindingUrl == "https://graph.microsoft.com/v1.0" )
13              {
14                  session = new OneDriveSession( bindingUrl, username, password,
15 -                                               oauth2, verbose);
16 +                                               oauth2, verbose,
17 +                                               g_CurlInitProtocolsFunction);
18              }
19              else
20              {
21 @@ -103,7 +106,7 @@
22                      }
23                      // Could be SharePoint - needs NTLM authentication
24                      session = new SharePointSession( bindingUrl, username,
25 -                                                      password, verbose );
26 +                          password, verbose, g_CurlInitProtocolsFunction);
27                  }
29                  // Try the CMIS cases: we need to autodetect the binding type
30 --- libcmis/src/libcmis/base-session.hxx.orig   2024-06-21 17:41:56.737651815 +0200
31 +++ libcmis/src/libcmis/base-session.hxx        2024-06-21 17:42:08.466709308 +0200
32 @@ -59,7 +59,8 @@
33          BaseSession( std::string sBindingUrl, std::string repository,
34                       std::string username, std::string password,
35                       bool noSslCheck = false,
36 -                     libcmis::OAuth2DataPtr oauth2 = libcmis::OAuth2DataPtr(), bool verbose = false );
37 +                     libcmis::OAuth2DataPtr oauth2 = libcmis::OAuth2DataPtr(), bool verbose = false,
38 +                     libcmis::CurlInitProtocolsFunction = nullptr);
40          /** This constructor copies an existing http session.
41              This has been mostly designed for SessionFactory to save
42 --- libcmis/src/libcmis/base-session.cxx.orig   2024-06-21 17:42:28.593807967 +0200
43 +++ libcmis/src/libcmis/base-session.cxx        2024-06-21 17:43:37.051143529 +0200
44 @@ -43,9 +43,10 @@
45  using namespace std;
47  BaseSession::BaseSession( string bindingUrl, string repositoryId, string username,
48 -        string password, bool noSslCheck, libcmis::OAuth2DataPtr oauth2, bool verbose ) :
49 +        string password, bool noSslCheck, libcmis::OAuth2DataPtr oauth2, bool verbose,
50 +        libcmis::CurlInitProtocolsFunction initProtocolsFunction) :
51      Session( ),
52 -    HttpSession( username, password, noSslCheck, oauth2, verbose ),
53 +    HttpSession( username, password, noSslCheck, oauth2, verbose, initProtocolsFunction ),
54      m_bindingUrl( bindingUrl ),
55      m_repositoryId( repositoryId ),
56      m_repositories( )
57 --- libcmis/src/libcmis/gdrive-session.hxx.orig 2024-06-21 17:44:32.721416413 +0200
58 +++ libcmis/src/libcmis/gdrive-session.hxx      2024-06-21 17:39:01.143791090 +0200
59 @@ -39,7 +39,8 @@
60                         std::string username,
61                         std::string password,
62                         libcmis::OAuth2DataPtr oauth2,
63 -                       bool verbose = false );
64 +                       bool verbose = false,
65 +                       libcmis::CurlInitProtocolsFunction = nullptr);
67          ~GDriveSession ( );
69 --- libcmis/src/libcmis/gdrive-session.cxx.orig 2024-06-21 17:44:59.947549870 +0200
70 +++ libcmis/src/libcmis/gdrive-session.cxx      2024-06-21 17:45:26.666680841 +0200
71 @@ -43,9 +43,10 @@
72                                 string username,
73                                 string password,
74                                 libcmis::OAuth2DataPtr oauth2,
75 -                               bool verbose ) :
76 +                               bool verbose,
77 +                               libcmis::CurlInitProtocolsFunction initProtocolsFunction) :
78      BaseSession( baseUrl, string(), username, password, false,
79 -                 libcmis::OAuth2DataPtr(), verbose )
80 +                 libcmis::OAuth2DataPtr(), verbose, initProtocolsFunction )
82  {
83      // Add the dummy repository, even if we don't have OAuth2
84 --- libcmis/src/libcmis/onedrive-session.hxx.orig       2024-06-21 17:46:39.857039605 +0200
85 +++ libcmis/src/libcmis/onedrive-session.hxx    2024-06-21 17:46:59.045133662 +0200
86 @@ -40,7 +40,8 @@
87                         std::string username, 
88                         std::string password,
89                         libcmis::OAuth2DataPtr oauth2,
90 -                       bool verbose = false );
91 +                       bool verbose = false,
92 +                       libcmis::CurlInitProtocolsFunction = nullptr);
94          ~OneDriveSession ( );
96 --- libcmis/src/libcmis/onedrive-session.cxx.orig       2024-06-21 17:47:35.187310824 +0200
97 +++ libcmis/src/libcmis/onedrive-session.cxx    2024-06-21 17:48:02.068442589 +0200
98 @@ -41,9 +41,10 @@
99                                 string username,
100                                 string password,
101                                 libcmis::OAuth2DataPtr oauth2,
102 -                               bool verbose ) :
103 +                               bool verbose,
104 +                               libcmis::CurlInitProtocolsFunction initProtocolsFunction) :
105      BaseSession( baseUrl, string(), username, password, false,
106 -                 libcmis::OAuth2DataPtr(), verbose )
107 +                 libcmis::OAuth2DataPtr(), verbose, initProtocolsFunction)
110      // Add the dummy repository
111 --- libcmis/src/libcmis/sharepoint-session.hxx.orig     2024-06-21 18:02:35.120719197 +0200
112 +++ libcmis/src/libcmis/sharepoint-session.hxx  2024-06-21 18:02:54.288813088 +0200
113 @@ -39,7 +39,8 @@
114          SharePointSession( std::string baseUrl,
115                         std::string username, 
116                         std::string password,
117 -                       bool verbose = false );
118 +                       bool verbose = false,
119 +                       libcmis::CurlInitProtocolsFunction = nullptr);
121          SharePointSession( std::string baseUrl,
122                          const HttpSession& httpSession,
123 --- libcmis/src/libcmis/sharepoint-session.cxx.orig     2024-06-21 16:02:24.597237776 +0200
124 +++ libcmis/src/libcmis/sharepoint-session.cxx  2024-06-21 18:03:48.109076715 +0200
125 @@ -42,9 +42,10 @@
126  SharePointSession::SharePointSession ( string baseUrl,
127                                 string username,
128                                 string password,
129 -                               bool verbose ) :
130 +                               bool verbose,
131 +                               libcmis::CurlInitProtocolsFunction initProtocolsFunction) :
132      BaseSession( baseUrl, string(), username, password, false,
133 -                 libcmis::OAuth2DataPtr(), verbose ),
134 +                 libcmis::OAuth2DataPtr(), verbose, initProtocolsFunction ),
135      m_digestCode( string( ) ) 
138 --- libcmis/src/libcmis/http-session.cxx.orig   2024-06-21 18:24:44.192002619 +0200
139 +++ libcmis/src/libcmis/http-session.cxx        2024-06-21 18:24:46.329012530 +0200
140 @@ -981,6 +981,7 @@
141                  case CURLE_COULDNT_RESOLVE_HOST:
142                      type = "dnsFailed";
143                      break;
144 +                case CURLE_UNSUPPORTED_PROTOCOL:
145                  case CURLE_COULDNT_CONNECT:
146                  case CURLE_SSL_CONNECT_ERROR:
147                  case CURLE_SSL_CERTPROBLEM: