LibreOffice Module ucb (master)  1
ftpcontent.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_UCB_SOURCE_UCP_FTP_FTPCONTENT_HXX
21 #define INCLUDED_UCB_SOURCE_UCP_FTP_FTPCONTENT_HXX
22 
24 #include <com/sun/star/ucb/InsertCommandArgument.hpp>
25 #include <com/sun/star/ucb/XContentCreator.hpp>
26 #include "ftpurl.hxx"
27 
28 namespace com { namespace sun { namespace star { namespace beans {
29  struct Property;
30  struct PropertyValue;
31 } } } }
32 
33 namespace com { namespace sun { namespace star { namespace sdbc {
34  class XRow;
35 } } } }
36 
37 
38 namespace ftp
39 {
40 
41 class FTPContentProvider;
42 
44  public css::ucb::XContentCreator
45 {
46 public:
47 
48  FTPContent( const css::uno::Reference<
49  css::uno::XComponentContext >& rxContext,
50  FTPContentProvider* pProvider,
51  const css::uno::Reference<
52  css::ucb::XContentIdentifier >& Identifier,
53  const FTPURL& FtpUrl);
54 
55  FTPContent( const css::uno::Reference<
56  css::uno::XComponentContext >& rxContext,
57  FTPContentProvider* pProvider,
58  const css::uno::Reference<
59  css::ucb::XContentIdentifier >& Identifier,
60  const css::ucb::ContentInfo& aInfo);
61 
62 
63  virtual ~FTPContent() override;
64 
65  // XInterface
66  virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
67  virtual void SAL_CALL acquire()
68  throw() override;
69  virtual void SAL_CALL release()
70  throw() override;
71 
72  // XTypeProvider
73  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
74  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
75 
76  // XServiceInfo
77  virtual OUString SAL_CALL getImplementationName() override;
78  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
79  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
80 
81  // XContent
82  virtual OUString SAL_CALL getContentType() override;
83 
84  // XCommandProcessor
85  virtual css::uno::Any SAL_CALL execute( const css::ucb::Command& aCommand,
86  sal_Int32 CommandId,
87  const css::uno::Reference<
88  css::ucb::XCommandEnvironment >& Environment ) override;
89 
90  virtual void SAL_CALL abort(sal_Int32 CommandId) override;
91 
92  // XContentCreator
93  virtual css::uno::Sequence<
94  css::ucb::ContentInfo > SAL_CALL
95  queryCreatableContentsInfo( ) override;
96 
97  virtual css::uno::Reference<
98  css::ucb::XContent > SAL_CALL
99  createNewContent( const css::ucb::ContentInfo& Info ) override;
100 
101  // XChild
102 
103  virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override;
104 
105  virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;
106 
108  static css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo_Static();
109 
110 private:
111 
116  css::ucb::ContentInfo const m_aInfo;
117 
118  virtual css::uno::Sequence< css::beans::Property >
119  getProperties( const css::uno::Reference<
120  css::ucb::XCommandEnvironment > & xEnv ) override;
121 
122 
123  virtual css::uno::Sequence< css::ucb::CommandInfo>
124  getCommands(const css::uno::Reference<
125  css::ucb::XCommandEnvironment > & xEnv) override;
126 
127 
128  virtual OUString getParentURL() override;
129 
130  css::uno::Reference<css::sdbc::XRow>
132  const css::uno::Sequence<
133  css::beans::Property>& seqProp
134  );
135 
136  css::uno::Sequence<css::uno::Any>
137  setPropertyValues( const css::uno::Sequence<
138  css::beans::PropertyValue>& seqPropVal);
139 
140  void insert(const css::ucb::InsertCommandArgument&,
141  const css::uno::Reference<
142  css::ucb::XCommandEnvironment>&);
143  };
144 
145 }
146 
147 #endif
148 
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: ftpcontent.cxx:133
css::ucb::ContentInfo const m_aInfo
Definition: ftpcontent.hxx:116
virtual OUString SAL_CALL getImplementationName() override
Definition: ftpcontent.cxx:170
virtual OUString getParentURL() override
Definition: ftpcontent.cxx:623
Info
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL createNewContent(const css::ucb::ContentInfo &Info) override
Definition: ftpcontent.cxx:596
virtual css::uno::Sequence< css::beans::Property > getProperties(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
css::uno::Sequence< css::uno::Any > setPropertyValues(const css::uno::Sequence< css::beans::PropertyValue > &seqPropVal)
Definition: ftpcontent.cxx:775
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override
Definition: ftpcontent.cxx:608
virtual void SAL_CALL abort(sal_Int32 CommandId) override
Definition: ftpcontent.cxx:197
virtual void SAL_CALL setParent(const css::uno::Reference< css::uno::XInterface > &Parent) override
Definition: ftpcontent.cxx:617
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: ftpcontent.cxx:180
void insert(const css::ucb::InsertCommandArgument &, const css::uno::Reference< css::ucb::XCommandEnvironment > &)
Definition: ftpcontent.cxx:660
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: ftpcontent.cxx:148
unsigned char sal_Bool
Definition of ftpcontentprovider.
static css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo_Static()
Definition: ftpcontent.cxx:571
FTPContent(const css::uno::Reference< css::uno::XComponentContext > &rxContext, FTPContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, const FTPURL &FtpUrl)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: ftpcontent.cxx:153
virtual ~FTPContent() override
Definition: ftpcontent.cxx:115
virtual void SAL_CALL acquire() override
Definition: ftpcontent.cxx:121
virtual css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL queryCreatableContentsInfo() override
Definition: ftpcontent.cxx:564
virtual void SAL_CALL release() override
Definition: ftpcontent.cxx:127
virtual css::uno::Sequence< css::ucb::CommandInfo > getCommands(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
virtual css::uno::Any SAL_CALL execute(const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
Definition: ftpcontent.cxx:235
virtual OUString SAL_CALL getContentType() override
Definition: ftpcontent.cxx:189
css::uno::Reference< css::sdbc::XRow > getPropertyValues(const css::uno::Sequence< css::beans::Property > &seqProp)
Definition: ftpcontent.cxx:725
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: ftpcontent.cxx:175
FTPContentProvider * m_pFCP
Definition: ftpcontent.hxx:112