Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
9431ace8
Kaydet (Commit)
9431ace8
authored
Tem 16, 2013
tarafından
Cao Cuong Ngo
Kaydeden (comit)
Cédric Bosdonnat
Eyl 02, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CMIS: getRepositories should call createSession
Change-Id: Ia64e15ab53155118dcfdd007a5d76e649bdeded9
üst
f6c9bf4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
cmis_repo_content.cxx
ucb/source/ucp/cmis/cmis_repo_content.cxx
+22
-8
No files found.
ucb/source/ucp/cmis/cmis_repo_content.cxx
Dosyayı görüntüle @
9431ace8
...
...
@@ -29,6 +29,7 @@
#include "cmis_provider.hxx"
#include "cmis_repo_content.hxx"
#include "cmis_resultset.hxx"
#include "cmis_oauth2_providers.hxx"
#define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
#define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
...
...
@@ -139,14 +140,25 @@ namespace cmis
string
rPassword
=
OUSTR_TO_STDSTR
(
m_aURL
.
getPassword
(
)
);
if
(
authProvider
.
authenticationQuery
(
rUsername
,
rPassword
)
)
{
try
{
m_aRepositories
=
libcmis
::
SessionFactory
::
getRepositories
(
OUSTR_TO_STDSTR
(
m_aURL
.
getBindingUrl
(
)
),
rUsername
,
rPassword
);
}
catch
(
const
libcmis
::
Exception
&
)
{
}
// Create a session to get repositories
libcmis
::
OAuth2DataPtr
oauth2Data
=
NULL
;
if
(
m_aURL
.
getBindingUrl
(
)
==
GDRIVE_BASE_URL
)
oauth2Data
.
reset
(
new
libcmis
::
OAuth2Data
(
GDRIVE_AUTH_URL
,
GDRIVE_TOKEN_URL
,
GDRIVE_SCOPE
,
GDRIVE_REDIRECT_URI
,
GDRIVE_CLIENT_ID
,
GDRIVE_CLIENT_SECRET
)
);
libcmis
::
Session
*
session
=
libcmis
::
SessionFactory
::
createSession
(
OUSTR_TO_STDSTR
(
m_aURL
.
getBindingUrl
(
)
),
rUsername
,
rPassword
,
""
,
sal_False
,
oauth2Data
);
if
(
session
==
NULL
)
ucbhelper
::
cancelCommandExecution
(
ucb
::
IOErrorCode_INVALID_DEVICE
,
uno
::
Sequence
<
uno
::
Any
>
(
0
),
xEnv
,
OUString
(
)
);
m_aRepositories
=
session
->
getRepositories
(
);
delete
session
;
}
else
{
...
...
@@ -176,6 +188,8 @@ namespace cmis
repo
=
*
it
;
}
}
else
repo
=
m_aRepositories
.
front
(
);
return
repo
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment