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_SELFDISPATCHER_HXX_
25 #define __FRAMEWORK_DISPATCH_SELFDISPATCHER_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 to dispatch into an existing owner frame
57     @descr          You should use it as dispatcher for "_self", flag::SELF ... cases, to load a document into an
58                     owner frame without creation of a new one.
59                     Use this class as member only! Never use it as baseclass.
60 					XInterface will be ambiguous and we hold a weakreference to our OWNER - not to our SUPERCLASS!
61 
62 	@implements		XInterface
63 					XDispatch
64                     XStatusListener
65                     XLoadEventListener
66 					XEventListener
67 
68     @base           BaseDispatcher
69 					OWeakObject
70 
71 	@devstatus		ready to use
72     @threadsafe     yes
73 *//*-*************************************************************************************************************/
74 class SelfDispatcher   :   // -interfaces  ... are supported by our BaseDispatcher!
75                            // -baseclasses ... order is necessary for right initialization!
76                            public BaseDispatcher
77 {
78 	//-------------------------------------------------------------------------------------------------------------
79 	//	public methods
80 	//-------------------------------------------------------------------------------------------------------------
81 	public:
82         //  ctor
83                               SelfDispatcher      ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory   ,
84                                                     const css::uno::Reference< css::frame::XFrame >&              xTarget    );
85 		//	XDispatch
86         virtual void SAL_CALL dispatch            ( const css::util::URL&                                         aURL       ,
87                                                     const css::uno::Sequence< css::beans::PropertyValue >&        lArguments ) throw( css::uno::RuntimeException );
88 
89     //-------------------------------------------------------------------------------------------------------------
90     //  protected methods
91 	//-------------------------------------------------------------------------------------------------------------
92     protected:
93         virtual void SAL_CALL reactForLoadingState ( const css::util::URL&                                      aURL        ,
94                                                      const css::uno::Sequence< css::beans::PropertyValue >&     lDescriptor ,
95                                                      const css::uno::Reference< css::frame::XFrame >&           xTarget     ,
96                                                            sal_Bool                                             bState      ,
97                                                      const css::uno::Any&                                       aAsyncInfo  );
98 
99         virtual void SAL_CALL reactForHandlingState( const css::util::URL&                                      aURL        ,
100                                                      const css::uno::Sequence< css::beans::PropertyValue >&     lDescriptor ,
101                                                            sal_Bool                                             bState      ,
102                                                      const css::uno::Any&                                       aAsyncInfo  );
103 
104 };      //  class SelfDispatcher
105 
106 }		//	namespace framework
107 
108 #endif  //  #ifndef __FRAMEWORK_DISPATCH_SELFDISPATCHER_HXX_
109