Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : /**************************************************************************
31 : : TODO
32 : : **************************************************************************
33 : :
34 : : *************************************************************************/
35 : : #include "ftpcontentidentifier.hxx"
36 : : #include "ftpcontentprovider.hxx"
37 : :
38 : : using namespace ftp;
39 : : using namespace com::sun::star::uno;
40 : : using namespace com::sun::star::ucb;
41 : : using namespace com::sun::star::lang;
42 : :
43 : :
44 : 0 : FTPContentIdentifier::FTPContentIdentifier(
45 : : const rtl::OUString& ident
46 : : )
47 : 0 : : m_ident(ident)
48 : : {
49 : 0 : }
50 : :
51 : :
52 : 0 : FTPContentIdentifier::~FTPContentIdentifier()
53 : : {
54 [ # # ]: 0 : }
55 : :
56 : :
57 : : Any SAL_CALL
58 : 0 : FTPContentIdentifier::queryInterface(
59 : : const Type& rType
60 : : )
61 : : throw(
62 : : RuntimeException
63 : : )
64 : : {
65 : : Any aRet =
66 : : ::cppu::queryInterface(rType,
67 : : (static_cast< XTypeProvider* >(this)),
68 [ # # ]: 0 : (static_cast< XContentIdentifier* >(this)));
69 : :
70 [ # # ][ # # ]: 0 : return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
71 : : }
72 : :
73 : :
74 : 0 : void SAL_CALL FTPContentIdentifier::acquire( void ) throw() {
75 : 0 : OWeakObject::acquire();
76 : 0 : }
77 : :
78 : :
79 : 0 : void SAL_CALL FTPContentIdentifier::release( void ) throw() {
80 : 0 : OWeakObject::release();
81 : 0 : }
82 : :
83 : :
84 : : Sequence<sal_Int8> SAL_CALL
85 : 0 : FTPContentIdentifier::getImplementationId()
86 : : throw(RuntimeException)
87 : : {
88 : : static cppu::OImplementationId* pId = NULL;
89 [ # # ]: 0 : if(!pId)
90 : : {
91 [ # # ][ # # ]: 0 : osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
92 [ # # ]: 0 : if ( !pId )
93 : : {
94 [ # # ][ # # ]: 0 : static cppu::OImplementationId id( sal_False );
95 : 0 : pId = &id;
96 [ # # ]: 0 : }
97 : : }
98 : 0 : return (*pId).getImplementationId();
99 : : }
100 : :
101 : :
102 : : Sequence<Type> SAL_CALL
103 : 0 : FTPContentIdentifier::getTypes(
104 : : void )
105 : : throw(RuntimeException)
106 : : {
107 : : static cppu::OTypeCollection* pCollection = NULL;
108 [ # # ]: 0 : if ( !pCollection ) {
109 [ # # ][ # # ]: 0 : osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
110 [ # # ]: 0 : if ( !pCollection )
111 : : {
112 : : static cppu::OTypeCollection collection(
113 : : getCppuType(
114 [ # # ]: 0 : static_cast<Reference<XTypeProvider>*>(0)),
115 : : getCppuType(
116 [ # # ][ # # ]: 0 : static_cast<Reference<XContentIdentifier>*>(0)));
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ]
117 : 0 : pCollection = &collection;
118 [ # # ]: 0 : }
119 : : }
120 : 0 : return (*pCollection).getTypes();
121 : : }
122 : :
123 : :
124 : : rtl::OUString SAL_CALL
125 : 0 : FTPContentIdentifier::getContentIdentifier(
126 : : )
127 : : throw (
128 : : com::sun::star::uno::RuntimeException
129 : : )
130 : : {
131 : 0 : return m_ident;
132 : : }
133 : :
134 : :
135 : : rtl::OUString SAL_CALL
136 : 0 : FTPContentIdentifier::getContentProviderScheme(
137 : : )
138 : : throw (
139 : : com::sun::star::uno::RuntimeException
140 : : )
141 : : {
142 : 0 : return rtl::OUString("ftp");
143 : : }
144 : :
145 : :
146 : :
147 : :
148 : :
149 : :
150 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|