1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 /**************************************************************************
23 **************************************************************************
25 *************************************************************************/
26 #include "ftpcontentidentifier.hxx"
27 #include "ftpcontentprovider.hxx"
30 using namespace com::sun::star::uno
;
31 using namespace com::sun::star::ucb
;
32 using namespace com::sun::star::lang
;
35 FTPContentIdentifier::FTPContentIdentifier(
43 FTPContentIdentifier::~FTPContentIdentifier()
49 FTPContentIdentifier::queryInterface(
57 ::cppu::queryInterface(rType
,
58 (static_cast< XTypeProvider
* >(this)),
59 (static_cast< XContentIdentifier
* >(this)));
61 return aRet
.hasValue() ? aRet
: OWeakObject::queryInterface( rType
);
65 void SAL_CALL
FTPContentIdentifier::acquire( void ) throw() {
66 OWeakObject::acquire();
70 void SAL_CALL
FTPContentIdentifier::release( void ) throw() {
71 OWeakObject::release();
75 Sequence
<sal_Int8
> SAL_CALL
76 FTPContentIdentifier::getImplementationId()
77 throw(RuntimeException
)
79 static cppu::OImplementationId
* pId
= NULL
;
82 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
85 static cppu::OImplementationId
id( sal_False
);
89 return (*pId
).getImplementationId();
93 Sequence
<Type
> SAL_CALL
94 FTPContentIdentifier::getTypes(
96 throw(RuntimeException
)
98 static cppu::OTypeCollection
* pCollection
= NULL
;
100 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
103 static cppu::OTypeCollection
collection(
105 static_cast<Reference
<XTypeProvider
>*>(0)),
107 static_cast<Reference
<XContentIdentifier
>*>(0)));
108 pCollection
= &collection
;
111 return (*pCollection
).getTypes();
116 FTPContentIdentifier::getContentIdentifier(
119 com::sun::star::uno::RuntimeException
127 FTPContentIdentifier::getContentProviderScheme(
130 com::sun::star::uno::RuntimeException
133 return OUString("ftp");
141 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */