1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _DAVAUTHLISTENERIMPL_HXX_ 25 #define _DAVAUTHLISTENERIMPL_HXX_ 26 27 #include "DAVAuthListener.hxx" 28 29 30 namespace http_dav_ucp 31 { 32 33 //========================================================================= 34 35 //========================================================================= 36 //========================================================================= 37 // 38 // class DAVAuthListenerImpl. 39 // 40 //========================================================================= 41 //========================================================================= 42 43 44 class DAVAuthListener_Impl : public DAVAuthListener 45 { 46 public: 47 DAVAuthListener_Impl(const com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> & xEnv,const::rtl::OUString & inURL)48 DAVAuthListener_Impl( 49 const com::sun::star::uno::Reference< 50 com::sun::star::ucb::XCommandEnvironment>& xEnv, 51 const ::rtl::OUString & inURL ) 52 : m_xEnv( xEnv ), m_aURL( inURL ) 53 { 54 } 55 56 virtual int authenticate( const ::rtl::OUString & inRealm, 57 const ::rtl::OUString & inHostName, 58 ::rtl::OUString & inoutUserName, 59 ::rtl::OUString & outPassWord, 60 sal_Bool bCanUseSystemCredentials, 61 sal_Bool bUsePreviousCredentials = sal_True ); 62 private: 63 64 const com::sun::star::uno::Reference< 65 com::sun::star::ucb::XCommandEnvironment > m_xEnv; 66 const rtl::OUString m_aURL; 67 68 rtl::OUString m_aPrevPassword; 69 rtl::OUString m_aPrevUsername; 70 }; 71 72 } 73 74 #endif 75