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
cc506f01
Kaydet (Commit)
cc506f01
authored
Eki 29, 2002
tarafından
Andreas Bille
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#104432# Changed to proxyconfig helper class
üst
7c6b58e4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
123 deletions
+111
-123
ftpcontent.cxx
ucb/source/ucp/ftp/ftpcontent.cxx
+24
-4
ftpcontentidentifier.cxx
ucb/source/ucp/ftp/ftpcontentidentifier.cxx
+51
-12
ftpcontentidentifier.hxx
ucb/source/ucp/ftp/ftpcontentidentifier.hxx
+25
-8
ftpcontentprovider.cxx
ucb/source/ucp/ftp/ftpcontentprovider.cxx
+0
-0
ftpcontentprovider.hxx
ucb/source/ucp/ftp/ftpcontentprovider.hxx
+6
-97
ftpurl.cxx
ucb/source/ucp/ftp/ftpurl.cxx
+5
-2
No files found.
ucb/source/ucp/ftp/ftpcontent.cxx
Dosyayı görüntüle @
cc506f01
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: ftpcontent.cxx,v $
*
* $Revision: 1.1
6
$
* $Revision: 1.1
7
$
*
* last change: $Author: abi $ $Date: 2002-10-2
5 08:53:17
$
* last change: $Author: abi $ $Date: 2002-10-2
9 12:43:13
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -317,6 +317,7 @@ enum ACTION { NOACTION,
THROWINTERACTIVECONNECT
,
THROWRESOLVENAME
,
THROWQUOTE
,
THROWNOFILE
,
THROWGENERAL
};
...
...
@@ -428,6 +429,19 @@ Any SAL_CALL FTPContent::execute(
ucbhelper
::
cancelCommandExecution
(
aRet
,
Environment
);
}
else
if
(
action
==
THROWNOFILE
)
{
Sequence
<
Any
>
seq
(
1
);
PropertyValue
value
;
value
.
Name
=
rtl
::
OUString
::
createFromAscii
(
"Uri"
);
value
.
Handle
=
-
1
;
value
.
Value
<<=
m_aFTPURL
.
ident
(
false
,
false
);
value
.
State
=
PropertyState_DIRECT_VALUE
;
seq
[
0
]
<<=
value
;
ucbhelper
::
cancelCommandExecution
(
IOErrorCode_NO_FILE
,
seq
,
Environment
);
}
else
if
(
action
==
THROWQUOTE
||
action
==
THROWGENERAL
)
{
ucbhelper
::
cancelCommandExecution
(
...
...
@@ -580,6 +594,8 @@ Any SAL_CALL FTPContent::execute(
action
=
THROWACCESSDENIED
;
else
if
(
e
.
code
()
==
CURLE_FTP_QUOTE_ERROR
)
action
=
THROWQUOTE
;
else
if
(
e
.
code
()
==
CURLE_FTP_COULDNT_RETR_FILE
)
action
=
THROWNOFILE
;
else
// nothing known about the course of the error
action
=
THROWGENERAL
;
...
...
@@ -647,7 +663,7 @@ FTPContent::getParent( )
throw
(
RuntimeException
)
{
Reference
<
XContentIdentifier
>
xIdent
(
new
FTPContentIdentifier
(
m_aFTPURL
.
parent
(
),
m_pFCP
));
xIdent
(
new
FTPContentIdentifier
(
m_aFTPURL
.
parent
(
false
)
));
Reference
<
XContent
>
xContent
(
m_xProvider
->
queryContent
(
xIdent
));
return
Reference
<
XInterface
>
(
xContent
,
UNO_QUERY
);
}
...
...
@@ -861,7 +877,11 @@ Sequence<Any> FTPContent::setPropertyValues(
}
}
if
(
evt
.
getLength
())
if
(
evt
.
getLength
())
{
// title has changed
notifyPropertiesChange
(
evt
);
exchange
(
new
FTPContentIdentifier
(
m_aFTPURL
.
ident
(
false
,
false
)));
}
return
ret
;
}
ucb/source/ucp/ftp/ftpcontentidentifier.cxx
Dosyayı görüntüle @
cc506f01
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: ftpcontentidentifier.cxx,v $
*
* $Revision: 1.
5
$
* $Revision: 1.
6
$
*
* last change: $Author: abi $ $Date: 2002-10-
15 09:21:16
$
* last change: $Author: abi $ $Date: 2002-10-
29 12:43:13
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -70,13 +70,13 @@
using
namespace
ftp
;
using
namespace
com
::
sun
::
star
::
uno
;
using
namespace
com
::
sun
::
star
::
ucb
;
using
namespace
com
::
sun
::
star
::
lang
;
FTPContentIdentifier
::
FTPContentIdentifier
(
const
rtl
::
OUString
&
aIdent
,
FTPContentProvider
*
pFCP
const
rtl
::
OUString
&
ident
)
:
m_
pURL
(
aIdent
,
pFCP
)
:
m_
ident
(
ident
)
{
}
...
...
@@ -96,40 +96,79 @@ FTPContentIdentifier::queryInterface(
{
Any
aRet
=
::
cppu
::
queryInterface
(
rType
,
SAL_STATIC_CAST
(
XTypeProvider
*
,
this
),
SAL_STATIC_CAST
(
XContentIdentifier
*
,
this
));
return
aRet
.
hasValue
()
?
aRet
:
OWeakObject
::
queryInterface
(
rType
);
}
void
SAL_CALL
FTPContentIdentifier
::
acquire
(
void
)
throw
()
{
OWeakObject
::
acquire
();
}
void
SAL_CALL
FTPContentIdentifier
::
release
(
void
)
throw
()
{
OWeakObject
::
release
();
}
::
rtl
::
OUString
SAL_CALL
Sequence
<
sal_Int8
>
SAL_CALL
FTPContentIdentifier
::
getImplementationId
()
throw
(
RuntimeException
)
{
static
cppu
::
OImplementationId
*
pId
=
NULL
;
if
(
!
pId
)
{
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
osl
::
Mutex
::
getGlobalMutex
()
);
if
(
!
pId
)
{
static
cppu
::
OImplementationId
id
(
sal_False
);
pId
=
&
id
;
}
}
return
(
*
pId
).
getImplementationId
();
}
Sequence
<
Type
>
SAL_CALL
FTPContentIdentifier
::
getTypes
(
void
)
throw
(
RuntimeException
)
{
static
cppu
::
OTypeCollection
*
pCollection
=
NULL
;
if
(
!
pCollection
)
{
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
osl
::
Mutex
::
getGlobalMutex
()
);
if
(
!
pCollection
)
{
static
cppu
::
OTypeCollection
collection
(
getCppuType
(
static_cast
<
Reference
<
XTypeProvider
>*>
(
0
)),
getCppuType
(
static_cast
<
Reference
<
XContentIdentifier
>*>
(
0
)));
pCollection
=
&
collection
;
}
}
return
(
*
pCollection
).
getTypes
();
}
rtl
::
OUString
SAL_CALL
FTPContentIdentifier
::
getContentIdentifier
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
return
m_
pURL
.
ident
(
false
,
false
)
;
return
m_
ident
;
}
::
rtl
::
OUString
SAL_CALL
rtl
::
OUString
SAL_CALL
FTPContentIdentifier
::
getContentProviderScheme
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
return
rtl
::
OUString
::
createFromAscii
(
"ftp"
);
...
...
ucb/source/ucp/ftp/ftpcontentidentifier.hxx
Dosyayı görüntüle @
cc506f01
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: ftpcontentidentifier.hxx,v $
*
* $Revision: 1.
4
$
* $Revision: 1.
5
$
*
* last change: $Author: abi $ $Date: 2002-10-
15 09:21:16
$
* last change: $Author: abi $ $Date: 2002-10-
29 12:43:13
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -73,12 +73,12 @@
#include <cppuhelper/weak.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <com/sun/star/ucb/XContentIdentifier.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include "ftpdirp.hxx"
#include "ftpurl.hxx"
namespace
ftp
{
...
...
@@ -87,12 +87,12 @@ namespace ftp {
class
FTPContentIdentifier
:
public
cppu
::
OWeakObject
,
public
com
::
sun
::
star
::
lang
::
XTypeProvider
,
public
com
::
sun
::
star
::
ucb
::
XContentIdentifier
{
public
:
FTPContentIdentifier
(
const
rtl
::
OUString
&
ident
,
FTPContentProvider
*
pFCP
=
0
);
FTPContentIdentifier
(
const
rtl
::
OUString
&
ident
);
~
FTPContentIdentifier
();
...
...
@@ -106,6 +106,23 @@ namespace ftp {
virtual
void
SAL_CALL
release
(
void
)
throw
();
// XTypeProvider
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
uno
::
Type
>
SAL_CALL
getTypes
(
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
getImplementationId
(
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XContentIdentifier
...
...
@@ -113,7 +130,7 @@ namespace ftp {
getContentIdentifier
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
rtl
::
OUString
SAL_CALL
...
...
@@ -126,7 +143,7 @@ namespace ftp {
private
:
FTPURL
m_pURL
;
rtl
::
OUString
m_ident
;
};
}
...
...
ucb/source/ucp/ftp/ftpcontentprovider.cxx
Dosyayı görüntüle @
cc506f01
This diff is collapsed.
Click to expand it.
ucb/source/ucp/ftp/ftpcontentprovider.hxx
Dosyayı görüntüle @
cc506f01
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: ftpcontentprovider.hxx,v $
*
* $Revision: 1.
6
$
* $Revision: 1.
7
$
*
* last change: $Author: abi $ $Date: 2002-10-2
3 08:00:07
$
* last change: $Author: abi $ $Date: 2002-10-2
9 12:43:14
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -65,6 +65,7 @@
#include <vector>
#include <osl/mutex.hxx>
#include <ucbhelper/macros.hxx>
#include <ucbhelper/proxydecider.hxx>
#include <ucbhelper/providerhelper.hxx>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
...
...
@@ -100,8 +101,7 @@ namespace ftp {
class
FTPContentProvider
:
public
::
ucb
::
ContentProviderImplHelper
,
public
::
com
::
sun
::
star
::
container
::
XContainerListener
,
public
::
com
::
sun
::
star
::
lang
::
XComponent
,
// public ::com::sun::star::lang::XComponent,
public
FTPHandleProvider
{
public
:
...
...
@@ -125,62 +125,7 @@ namespace ftp {
throw
(
com
::
sun
::
star
::
ucb
::
IllegalIdentifierException
,
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XComponent
virtual
void
SAL_CALL
dispose
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
if
(
m_xContainer
.
is
())
{
m_xContainer
->
removeContainerListener
(
this
);
m_xContainer
=
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XContainer
>
(
0
);
}
}
virtual
void
SAL_CALL
addEventListener
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XEventListener
>&
xListener
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
}
virtual
void
SAL_CALL
removeEventListener
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XEventListener
>&
aListener
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
}
// XConainerListener ( deriver from XEventListener )
virtual
void
SAL_CALL
disposing
(
const
::
com
::
sun
::
star
::
lang
::
EventObject
&
Source
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
m_xContainer
=
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XContainer
>
(
0
);
}
virtual
void
SAL_CALL
elementInserted
(
const
::
com
::
sun
::
star
::
container
::
ContainerEvent
&
Event
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
}
virtual
void
SAL_CALL
elementRemoved
(
const
::
com
::
sun
::
star
::
container
::
ContainerEvent
&
Event
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
}
virtual
void
SAL_CALL
elementReplaced
(
const
::
com
::
sun
::
star
::
container
::
ContainerEvent
&
Event
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
/** FTPHandleProvider.
*/
// FTPHandleProvider.
virtual
CURL
*
handle
();
...
...
@@ -209,51 +154,15 @@ namespace ftp {
osl
::
Mutex
m_aMutex
;
FTPLoaderThread
*
m_ftpLoaderThread
;
sal_Int32
m_eType
;
rtl
::
OUString
m_aFtpProxy
;
rtl
::
OUString
m_aNoProxyList
;
// used for access to ftp-proxy
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XContentProviderManager
>
m_xManager
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XContainer
>
m_xContainer
;
ucbhelper
::
InternetProxyDecider
*
m_pProxyDecider
;
std
::
vector
<
ServerInfo
>
m_ServerInfo
;
void
init
();
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
getConfiguration
()
const
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XHierarchicalNameAccess
>
getHierAccess
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
sProvider
,
const
char
*
file
)
const
;
rtl
::
OUString
getKey
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XHierarchicalNameAccess
>&
xHierAccess
,
const
char
*
key
)
const
;
sal_Int32
getIntKey
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XHierarchicalNameAccess
>&
xHierAccess
,
const
char
*
key
)
const
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XContentProvider
>
getHttpProvider
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
);
bool
ShouldUseFtpProxy
(
const
FTPURL
&
aURL
)
const
;
};
// end class FTPContentProvider
}
// end namespace ftp
...
...
ucb/source/ucp/ftp/ftpurl.cxx
Dosyayı görüntüle @
cc506f01
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: ftpurl.cxx,v $
*
* $Revision: 1.1
2
$
* $Revision: 1.1
3
$
*
* last change: $Author: abi $ $Date: 2002-10-2
5 12:09:11
$
* last change: $Author: abi $ $Date: 2002-10-2
9 12:43:14
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -460,6 +460,9 @@ extern "C" int no_func(void *client, char *prompt, char*
FILE
*
FTPURL
::
open
()
throw
(
curl_exception
)
{
if
(
!
m_aPathSegmentVec
.
size
())
throw
curl_exception
(
CURLE_FTP_COULDNT_RETR_FILE
);
CURL
*
curl
=
m_pFCP
->
handle
();
SET_CONTROL_CONTAINER
;
...
...
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