20#include <cppuhelper/servicefactory.hxx>
23#include <com/sun/star/lang/XInitialization.hpp>
26#include <com/sun/star/ucb/UniversalContentBroker.hpp>
27#include <com/sun/star/deployment/UpdateInformationProvider.hpp>
30#include <osl/process.h>
34namespace deployment = ::com::sun::star::deployment;
35namespace lang = ::com::sun::star::lang;
36namespace uno = ::com::sun::star::uno;
37namespace xml = ::com::sun::star::xml;
45 if( osl_getCommandArgCount() != 1 )
47 fprintf(stderr,
"Usage: updatefeedtest <url>\n");
56 ucb::UniversalContentBroker::create(rComponentContext);
59 uno::Reference< deployment::XUpdateInformationProvider > rUpdateInformationProvider =
60 deployment::UpdateInformationProvider::create( rComponentContext );
62 uno::Sequence< OUString > theURLs(1);
63 osl_getCommandArg( 0, &theURLs[0].
pData );
66 OUString aExtension =
"MyExtension";
70 uno::Sequence< uno::Reference< xml::dom::XElement > > theUpdateInfo =
71 rUpdateInformationProvider->getUpdateInformation( theURLs, aExtension );
73 catch(
const uno::Exception & )
79 SAL_WARN(
"extensions.update",
"exception of undetermined type caught" );
#define TOOLS_WARN_EXCEPTION(area, stream)
#define SAL_WARN(area, stream)
std::unique_ptr< sal_Int32[]> pData
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::uno::XComponentContext > SAL_CALL defaultBootstrap_InitialComponentContext()