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 __FRAMEWORK_DISPATCH_BLANKDISPATCHER_HXX_ 25 #define __FRAMEWORK_DISPATCH_BLANKDISPATCHER_HXX_ 26 27 //_________________________________________________________________________________________________________________ 28 // my own includes 29 //_________________________________________________________________________________________________________________ 30 31 #include <dispatch/basedispatcher.hxx> 32 33 //_________________________________________________________________________________________________________________ 34 // interface includes 35 //_________________________________________________________________________________________________________________ 36 37 //_________________________________________________________________________________________________________________ 38 // other includes 39 //_________________________________________________________________________________________________________________ 40 41 //_________________________________________________________________________________________________________________ 42 // namespace 43 //_________________________________________________________________________________________________________________ 44 45 namespace framework{ 46 47 //_________________________________________________________________________________________________________________ 48 // exported const 49 //_________________________________________________________________________________________________________________ 50 51 //_________________________________________________________________________________________________________________ 52 // exported definitions 53 //_________________________________________________________________________________________________________________ 54 55 /*-************************************************************************************************************//** 56 @short helper for desktop only(!) to create new tasks on demand for dispatches 57 @descr Use this class as member only! Never use it as baseclass. 58 XInterface will be ambigous and we hold a weakreference to ouer OWNER - not to ouer SUPERCLASS! 59 60 @implements XInterface 61 XDispatch 62 XStatusListener 63 XLoadEventListener 64 XEventListener 65 66 @base BaseDispatcher 67 OWeakObject 68 69 @devstatus ready to use 70 @threadsafe yes 71 *//*-*************************************************************************************************************/ 72 class BlankDispatcher : // -interfaces ... are supported by our BaseDispatcher! 73 // -baseclasses ... order is neccessary for right initialization! 74 public BaseDispatcher 75 { 76 //------------------------------------------------------------------------------------------------------------- 77 // public methods 78 //------------------------------------------------------------------------------------------------------------- 79 public: 80 // ctor 81 BlankDispatcher ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory , 82 const css::uno::Reference< css::frame::XFrame >& xDesktop, 83 sal_Bool bIsDefaultDispatcher ); 84 // XDispatch 85 virtual void SAL_CALL dispatch ( const css::util::URL& aURL , 86 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException ); 87 88 //------------------------------------------------------------------------------------------------------------- 89 // protected methods 90 //------------------------------------------------------------------------------------------------------------- 91 protected: 92 virtual void SAL_CALL reactForLoadingState ( const css::util::URL& aURL , 93 const css::uno::Sequence< css::beans::PropertyValue >& lDescriptor , 94 const css::uno::Reference< css::frame::XFrame >& xTarget , 95 sal_Bool bState , 96 const css::uno::Any& aAsyncInfo ); 97 98 virtual void SAL_CALL reactForHandlingState( const css::util::URL& aURL , 99 const css::uno::Sequence< css::beans::PropertyValue >& lDescriptor , 100 sal_Bool bState , 101 const css::uno::Any& aAsyncInfo ); 102 103 //------------------------------------------------------------------------------------------------------------- 104 // protected methods 105 //------------------------------------------------------------------------------------------------------------- 106 private: 107 sal_Bool implts_findAndActivateAlreadyLoadedTask( const css::util::URL& aURL , 108 const css::uno::Sequence< css::beans::PropertyValue >& lArguments , 109 const css::uno::Reference< css::frame::XFrame > xDesktop ); 110 111 css::uno::Reference< css::frame::XFrame > implts_findAndLockRecycleTask( const css::util::URL& aURL , 112 const css::uno::Sequence< css::beans::PropertyValue >& lArguments , 113 const css::uno::Reference< css::frame::XFrame > xDesktop ); 114 115 //------------------------------------------------------------------------------------------------------------- 116 // variables 117 // (should be private everyway!) 118 //------------------------------------------------------------------------------------------------------------- 119 private: 120 sal_Bool m_bIsDefaultDispatcher; 121 }; // class BlankDispatcher 122 123 } // namespace framework 124 125 #endif // #ifndef __FRAMEWORK_DISPATCH_BLANKDISPATCHER_HXX_ 126