[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis' - include/ucbhelper ucbhelper/source
Mihai Varga
mihai.mv13 at gmail.com
Mon Jun 30 10:22:56 PDT 2014
include/ucbhelper/interactionrequest.hxx | 34 +++++++++++++
ucbhelper/source/provider/interactionrequest.cxx | 56 +++++++++++++++++++++++
2 files changed, 90 insertions(+)
New commits:
commit 2f86b03eca4805fad2b3a63d03257d5e2da6fbd7
Author: Mihai Varga <mihai.mv13 at gmail.com>
Date: Mon Jun 30 20:22:20 2014 +0300
Continuation implementation
Change-Id: Iff0df4427affe374e8e2909beb641cb7ad53f0fc
diff --git a/include/ucbhelper/interactionrequest.hxx b/include/ucbhelper/interactionrequest.hxx
index 51883c7..86531b9 100644
--- a/include/ucbhelper/interactionrequest.hxx
+++ b/include/ucbhelper/interactionrequest.hxx
@@ -26,6 +26,7 @@
#include <com/sun/star/task/XInteractionRetry.hpp>
#include <com/sun/star/task/XInteractionApprove.hpp>
#include <com/sun/star/task/XInteractionDisapprove.hpp>
+#include <com/sun/star/ucb/XInteractionAuthFallback.hpp>
#include <com/sun/star/ucb/XInteractionReplaceExistingData.hpp>
#include <com/sun/star/ucb/XInteractionSupplyAuthentication2.hpp>
#include <com/sun/star/ucb/XInteractionSupplyName.hpp>
@@ -714,6 +715,39 @@ public:
throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
};
+class UCBHELPER_DLLPUBLIC InteractionAuthFallback:
+ public InteractionContinuation,
+ public com::sun::star::ucb::XInteractionAuthFallback
+{
+ OUString m_aCode;
+
+public:
+ InteractionAuthFallback( InteractionRequest * pRequest )
+ : InteractionContinuation( pRequest ) {}
+
+ // XInterface
+ virtual com::sun::star::uno::Any SAL_CALL
+ queryInterface( const com::sun::star::uno::Type & rType )
+ throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual void SAL_CALL acquire()
+ throw() SAL_OVERRIDE;
+ virtual void SAL_CALL release()
+ throw() SAL_OVERRIDE;
+
+ // XInteractionContinuation
+ virtual void SAL_CALL select()
+ throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+
+ // XAuthFallback
+ virtual void SAL_CALL setCode( const OUString& code )
+ throw (::css::uno::RuntimeException, ::std::exception);
+ virtual OUString SAL_CALL getCode()
+ throw (::css::uno::RuntimeException, ::std::exception);
+
+
+};
+
+
} // namespace ucbhelper
#endif /* ! INCLUDED_UCBHELPER_INTERACTIONREQUEST_HXX */
diff --git a/ucbhelper/source/provider/interactionrequest.cxx b/ucbhelper/source/provider/interactionrequest.cxx
index c1d4617..1ad713a 100644
--- a/ucbhelper/source/provider/interactionrequest.cxx
+++ b/ucbhelper/source/provider/interactionrequest.cxx
@@ -1041,4 +1041,60 @@ void SAL_CALL InteractionReplaceExistingData::select()
recordSelection();
}
+// InteractionAuthFallback Implementation
+
+// XInterface methods.
+
+// virtual
+void SAL_CALL InteractionAuthFallback::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+
+// virtual
+void SAL_CALL InteractionAuthFallback::release()
+ throw()
+{
+ OWeakObject::release();
+}
+
+// virtual
+uno::Any SAL_CALL
+InteractionAuthFallback::queryInterface( const uno::Type & rType )
+ throw ( uno::RuntimeException, std::exception )
+{
+ uno::Any aRet = cppu::queryInterface( rType,
+ static_cast< task::XInteractionContinuation * >( this ),
+ static_cast< ucb::XInteractionAuthFallback * >( this ));
+
+ return aRet.hasValue()
+ ? aRet : InteractionContinuation::queryInterface( rType );
+}
+
+// XInteractionContinuation methods.
+
+// virtual
+void SAL_CALL InteractionAuthFallback::select()
+ throw( uno::RuntimeException, std::exception )
+{
+ recordSelection();
+}
+
+// XInteractionAuthFallback methods
+
+// virtual
+void SAL_CALL InteractionAuthFallback::setCode( const OUString& code )
+ throw ( uno::RuntimeException, std::exception )
+{
+ m_aCode = code;
+}
+
+// virtual
+OUString SAL_CALL InteractionAuthFallback::getCode( )
+ throw ( uno::RuntimeException, std::exception )
+{
+ return m_aCode;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list