xref: /trunk/main/framework/inc/services/logindialog.hxx (revision 374d2a96ae566b372972bbe678cb4ee5a157bf83)
1f8e07b45SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3f8e07b45SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4f8e07b45SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5f8e07b45SAndrew Rist  * distributed with this work for additional information
6f8e07b45SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7f8e07b45SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8f8e07b45SAndrew Rist  * "License"); you may not use this file except in compliance
9f8e07b45SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11f8e07b45SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13f8e07b45SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14f8e07b45SAndrew Rist  * software distributed under the License is distributed on an
15f8e07b45SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f8e07b45SAndrew Rist  * KIND, either express or implied.  See the License for the
17f8e07b45SAndrew Rist  * specific language governing permissions and limitations
18f8e07b45SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20f8e07b45SAndrew Rist  *************************************************************/
21f8e07b45SAndrew Rist 
22f8e07b45SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef __FRAMEWORK_LOGINDIALOG_LOGINDIALOG_HXX_
25cdf0e10cSrcweir #define __FRAMEWORK_LOGINDIALOG_LOGINDIALOG_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir //_________________________________________________________________________________________________________________
28cdf0e10cSrcweir //  my own includes
29cdf0e10cSrcweir //_________________________________________________________________________________________________________________
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #ifndef __FRAMEWORK_THREADHELPER_THREADHELPBASE_HXX_
32cdf0e10cSrcweir #include <threadhelp/threadhelpbase.hxx>
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir #include <macros/generic.hxx>
35cdf0e10cSrcweir #include <macros/debug.hxx>
36cdf0e10cSrcweir #include <macros/xinterface.hxx>
37cdf0e10cSrcweir #include <macros/xtypeprovider.hxx>
38cdf0e10cSrcweir #include <macros/xserviceinfo.hxx>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir #include <services/logindialog.hrc>
41cdf0e10cSrcweir 
42cdf0e10cSrcweir //_________________________________________________________________________________________________________________
43cdf0e10cSrcweir //  interface includes
44cdf0e10cSrcweir //_________________________________________________________________________________________________________________
45cdf0e10cSrcweir #include <com/sun/star/awt/XDialog.hpp>
46cdf0e10cSrcweir #include <com/sun/star/lang/IllegalArgumentException.hpp>
47cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySetInfo.hpp>
48cdf0e10cSrcweir #include <com/sun/star/beans/Property.hpp>
49cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp>
50cdf0e10cSrcweir #include <com/sun/star/lang/Locale.hpp>
51cdf0e10cSrcweir #include <com/sun/star/util/XFlushable.hpp>
52cdf0e10cSrcweir 
53cdf0e10cSrcweir //_________________________________________________________________________________________________________________
54cdf0e10cSrcweir //  other includes
55cdf0e10cSrcweir //_________________________________________________________________________________________________________________
56cdf0e10cSrcweir #include <tools/config.hxx>
57cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
58cdf0e10cSrcweir #include <cppuhelper/propshlp.hxx>
59cdf0e10cSrcweir #include <vcl/dialog.hxx>
60cdf0e10cSrcweir #include <vcl/fixed.hxx>
61cdf0e10cSrcweir #include <vcl/edit.hxx>
62cdf0e10cSrcweir #include <vcl/combobox.hxx>
63cdf0e10cSrcweir 
64cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX
65cdf0e10cSrcweir #include <vcl/button.hxx>
66cdf0e10cSrcweir #endif
67cdf0e10cSrcweir 
68cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX
69cdf0e10cSrcweir #include <vcl/button.hxx>
70cdf0e10cSrcweir #endif
71cdf0e10cSrcweir #include <vcl/morebtn.hxx>
72cdf0e10cSrcweir 
73cdf0e10cSrcweir //_________________________________________________________________________________________________________________
74cdf0e10cSrcweir //  namespace
75cdf0e10cSrcweir //_________________________________________________________________________________________________________________
76cdf0e10cSrcweir 
77cdf0e10cSrcweir namespace framework{
78cdf0e10cSrcweir 
79cdf0e10cSrcweir #define ANY                                 ::com::sun::star::uno::Any
80cdf0e10cSrcweir #define EXCEPTION                           ::com::sun::star::uno::Exception
81cdf0e10cSrcweir #define ILLEGALARGUMENTEXCEPTION            ::com::sun::star::lang::IllegalArgumentException
82cdf0e10cSrcweir #define IPROPERTYARRAYHELPER                ::cppu::IPropertyArrayHelper
83cdf0e10cSrcweir #define OBROADCASTHELPER                    ::cppu::OBroadcastHelper
84cdf0e10cSrcweir #define OPROPERTYSETHELPER                  ::cppu::OPropertySetHelper
85cdf0e10cSrcweir #define OUSTRING                            ::rtl::OUString
86cdf0e10cSrcweir #define OWEAKOBJECT                         ::cppu::OWeakObject
87cdf0e10cSrcweir #define PROPERTY                            ::com::sun::star::beans::Property
88cdf0e10cSrcweir #define REFERENCE                           ::com::sun::star::uno::Reference
89cdf0e10cSrcweir #define RUNTIMEEXCEPTION                    ::com::sun::star::uno::RuntimeException
90cdf0e10cSrcweir #define SEQUENCE                            ::com::sun::star::uno::Sequence
91cdf0e10cSrcweir #define XDIALOG                             ::com::sun::star::awt::XDialog
92cdf0e10cSrcweir #define XMULTISERVICEFACTORY                ::com::sun::star::lang::XMultiServiceFactory
93cdf0e10cSrcweir #define XPROPERTYSETINFO                    ::com::sun::star::beans::XPropertySetInfo
94cdf0e10cSrcweir #define XSERVICEINFO                        ::com::sun::star::lang::XServiceInfo
95cdf0e10cSrcweir #define XTYPEPROVIDER                       ::com::sun::star::lang::XTypeProvider
96cdf0e10cSrcweir #define PROPERTYVALUE                       ::com::sun::star::beans::PropertyValue
97cdf0e10cSrcweir #define LOCALE                              ::com::sun::star::lang::Locale
98cdf0e10cSrcweir #define XFLUSHABLE                          ::com::sun::star::util::XFlushable
99cdf0e10cSrcweir #define XFLUSHLISTENER                      ::com::sun::star::util::XFlushListener
100cdf0e10cSrcweir 
101cdf0e10cSrcweir //_________________________________________________________________________________________________________________
102cdf0e10cSrcweir //  exported const
103cdf0e10cSrcweir //_________________________________________________________________________________________________________________
104cdf0e10cSrcweir 
105cdf0e10cSrcweir #ifdef WNT
106cdf0e10cSrcweir     #define ININAME                             DECLARE_ASCII("login.ini")
107cdf0e10cSrcweir #elif defined UNIX
108cdf0e10cSrcweir     #define ININAME                             DECLARE_ASCII("loginrc")
109cdf0e10cSrcweir #else
110cdf0e10cSrcweir     #error "name of login profile unknown!"
111cdf0e10cSrcweir #endif
112cdf0e10cSrcweir 
113cdf0e10cSrcweir #define UNCPATHSEPERATOR                        sal_Unicode(0x002F)
114cdf0e10cSrcweir #define MAX_SERVERHISTORY                       10
115cdf0e10cSrcweir 
116cdf0e10cSrcweir //  Use follow keys in follow order.
117cdf0e10cSrcweir //  [Global]
118cdf0e10cSrcweir //  UserName=as
119cdf0e10cSrcweir //  ActiveServer=2
120cdf0e10cSrcweir //  ConnectionType=https
121cdf0e10cSrcweir //  Language=en-US
122cdf0e10cSrcweir //  UseProxy=[browser|custom|none]
123cdf0e10cSrcweir //  SecurityProxy=so-webcache:3128
124cdf0e10cSrcweir //  dialog=[big|small]
125cdf0e10cSrcweir //
126cdf0e10cSrcweir //  [DefaultPorts]
127cdf0e10cSrcweir //  https=8445
128cdf0e10cSrcweir //  http=8090
129cdf0e10cSrcweir //
130cdf0e10cSrcweir //  [ServerHistory]
131cdf0e10cSrcweir //  Server_1=localhost
132cdf0e10cSrcweir //  Server_2=munch:7202
133cdf0e10cSrcweir //  Server_3=www.xxx.com:8000
134cdf0e10cSrcweir 
135cdf0e10cSrcweir #define SECTION_GLOBAL                          "Global"
136cdf0e10cSrcweir #define SECTION_DEFAULTPORTS                    "DefaultPorts"
137cdf0e10cSrcweir #define SECTION_SERVERHISTORY                   "ServerHistory"
138cdf0e10cSrcweir 
139cdf0e10cSrcweir #define SECTION_USERNAME                        SECTION_GLOBAL
140cdf0e10cSrcweir #define SECTION_ACTIVESERVER                    SECTION_GLOBAL
141cdf0e10cSrcweir #define SECTION_CONNECTIONTYPE                  SECTION_GLOBAL
142cdf0e10cSrcweir #define SECTION_LANGUAGE                        SECTION_GLOBAL
143cdf0e10cSrcweir #define SECTION_SECURITYPROXY                   SECTION_GLOBAL
144cdf0e10cSrcweir #define SECTION_DIALOG                          SECTION_GLOBAL
145cdf0e10cSrcweir #define SECTION_HTTP                            SECTION_DEFAULTPORTS
146cdf0e10cSrcweir #define SECTION_HTTPS                           SECTION_DEFAULTPORTS
147cdf0e10cSrcweir #define SECTION_SERVER_X                        SECTION_SERVERHISTORY
148cdf0e10cSrcweir 
149cdf0e10cSrcweir #define KEY_USERNAME                            "UserName"
150cdf0e10cSrcweir #define KEY_ACTIVESERVER                        "ActiveServer"
151cdf0e10cSrcweir #define KEY_CONNECTIONTYPE                      "ConnectionType"
152cdf0e10cSrcweir #define KEY_LANGUAGE                            "Language"
153cdf0e10cSrcweir #define KEY_SERVER_X                            "Server_"
154cdf0e10cSrcweir #define KEY_SECURITYPROXY                       "SecurityProxy"
155cdf0e10cSrcweir #define KEY_USESECURITYPROXY                    "UseProxy"
156cdf0e10cSrcweir #define KEY_DIALOG                              "dialog"
157cdf0e10cSrcweir #define KEY_HTTP                                "http"
158cdf0e10cSrcweir #define KEY_HTTPS                               "https"
159cdf0e10cSrcweir 
160cdf0e10cSrcweir #define PROPERTYNAME_CONNECTIONTYPE             DECLARE_ASCII("ConnectionType"                  )
161cdf0e10cSrcweir #define PROPERTYNAME_LANGUAGE                   DECLARE_ASCII("Language"                        )
162cdf0e10cSrcweir #define PROPERTYNAME_PARENTWINDOW               DECLARE_ASCII("ParentWindow"                    )
163cdf0e10cSrcweir #define PROPERTYNAME_PASSWORD                   DECLARE_ASCII("Password"                        )
164cdf0e10cSrcweir #define PROPERTYNAME_SECURITYPROXY              DECLARE_ASCII("SecurityProxy"                   )
165cdf0e10cSrcweir #define PROPERTYNAME_SERVER                     DECLARE_ASCII("Server"                          )
166cdf0e10cSrcweir #define PROPERTYNAME_SERVERHISTORY              DECLARE_ASCII("ServerHistory"                   )
167cdf0e10cSrcweir #define PROPERTYNAME_USERNAME                   DECLARE_ASCII("UserName"                        )
168cdf0e10cSrcweir #define PROPERTYNAME_USEPROXY                   DECLARE_ASCII("UseProxy"                        )
169cdf0e10cSrcweir #define PROPERTYNAME_DIALOG                     DECLARE_ASCII("Dialog"                          )
170cdf0e10cSrcweir #define PROPERTYNAME_HTTP                       DECLARE_ASCII("http"                            )
171cdf0e10cSrcweir #define PROPERTYNAME_HTTPS                      DECLARE_ASCII("https"                           )
172cdf0e10cSrcweir 
173cdf0e10cSrcweir #define PROPERTYHANDLE_CONNECTIONTYPE           1
174cdf0e10cSrcweir #define PROPERTYHANDLE_LANGUAGE                 2
175cdf0e10cSrcweir #define PROPERTYHANDLE_PARENTWINDOW             3
176cdf0e10cSrcweir #define PROPERTYHANDLE_PASSWORD                 4
177cdf0e10cSrcweir #define PROPERTYHANDLE_SERVER                   5
178cdf0e10cSrcweir #define PROPERTYHANDLE_SERVERHISTORY            6
179cdf0e10cSrcweir #define PROPERTYHANDLE_USERNAME                 7
180cdf0e10cSrcweir #define PROPERTYHANDLE_SECURITYPROXY            8
181cdf0e10cSrcweir #define PROPERTYHANDLE_USEPROXY                 9
182cdf0e10cSrcweir #define PROPERTYHANDLE_DIALOG                   10
183cdf0e10cSrcweir #define PROPERTYHANDLE_HTTP                     11
184cdf0e10cSrcweir #define PROPERTYHANDLE_HTTPS                    12
185cdf0e10cSrcweir 
186cdf0e10cSrcweir #define PROPERTYCOUNT                           12
187cdf0e10cSrcweir 
188cdf0e10cSrcweir //_________________________________________________________________________________________________________________
189cdf0e10cSrcweir //  exported definitions
190cdf0e10cSrcweir //_________________________________________________________________________________________________________________
191cdf0e10cSrcweir 
192cdf0e10cSrcweir struct tIMPL_DialogData
193cdf0e10cSrcweir {
194cdf0e10cSrcweir     OUSTRING                sUserName               ;
195cdf0e10cSrcweir     OUSTRING                sPassword               ;
196cdf0e10cSrcweir     SEQUENCE< OUSTRING >    seqServerList           ;
197cdf0e10cSrcweir     sal_Int32               nActiveServer           ;
198cdf0e10cSrcweir     OUSTRING                sConnectionType         ;
199cdf0e10cSrcweir     LOCALE                  aLanguage               ;
200cdf0e10cSrcweir     sal_Int32               nPortHttp               ;
201cdf0e10cSrcweir     sal_Int32               nPortHttps              ;
202cdf0e10cSrcweir     ANY                     aParentWindow           ;
203cdf0e10cSrcweir     OUSTRING                sSecurityProxy          ;
204cdf0e10cSrcweir     OUSTRING                sUseProxy               ;
205cdf0e10cSrcweir     OUSTRING                sDialog                 ;
206cdf0e10cSrcweir     sal_Bool                bProxyChanged           ;
207cdf0e10cSrcweir 
208cdf0e10cSrcweir     // default ctor to initialize empty structure.
tIMPL_DialogDataframework::tIMPL_DialogData209cdf0e10cSrcweir     tIMPL_DialogData()
210cdf0e10cSrcweir         :   sUserName               ( OUSTRING()                            )
211cdf0e10cSrcweir         ,   sPassword               ( OUSTRING()                            )
212cdf0e10cSrcweir         ,   seqServerList           ( SEQUENCE< OUSTRING >()                )
213cdf0e10cSrcweir         ,   nActiveServer           ( 1                                     )
214cdf0e10cSrcweir         ,   sConnectionType         ( OUSTRING()                            )
215cdf0e10cSrcweir         ,   aLanguage               ( OUSTRING(), OUSTRING(), OUSTRING()    )
216cdf0e10cSrcweir         ,   nPortHttp               ( 0                                     )
217cdf0e10cSrcweir         ,   nPortHttps              ( 0                                     )
218cdf0e10cSrcweir         ,   aParentWindow           (                                       )
219cdf0e10cSrcweir         ,   sSecurityProxy          ( OUSTRING()                            )
220cdf0e10cSrcweir         ,   sUseProxy               ( OUSTRING()                            )
221cdf0e10cSrcweir         ,   sDialog                 ( OUSTRING()                            )
222cdf0e10cSrcweir         ,   bProxyChanged           ( sal_False                             )
223cdf0e10cSrcweir     {
224cdf0e10cSrcweir     }
225cdf0e10cSrcweir 
226cdf0e10cSrcweir     // copy ctor to initialize structure with values from another one.
tIMPL_DialogDataframework::tIMPL_DialogData227cdf0e10cSrcweir     tIMPL_DialogData( const tIMPL_DialogData& aCopyDataSet )
228cdf0e10cSrcweir         :   sUserName               ( aCopyDataSet.sUserName                )
229cdf0e10cSrcweir         ,   sPassword               ( aCopyDataSet.sPassword                )
230cdf0e10cSrcweir         ,   seqServerList           ( aCopyDataSet.seqServerList            )
231cdf0e10cSrcweir         ,   nActiveServer           ( aCopyDataSet.nActiveServer            )
232cdf0e10cSrcweir         ,   sConnectionType         ( aCopyDataSet.sConnectionType          )
233cdf0e10cSrcweir         ,   aLanguage               ( aCopyDataSet.aLanguage                )
234cdf0e10cSrcweir         ,   nPortHttp               ( aCopyDataSet.nPortHttp                )
235cdf0e10cSrcweir         ,   nPortHttps              ( aCopyDataSet.nPortHttps               )
236cdf0e10cSrcweir         ,   aParentWindow           ( aCopyDataSet.aParentWindow            )
237cdf0e10cSrcweir         ,   sSecurityProxy          ( aCopyDataSet.sSecurityProxy           )
238cdf0e10cSrcweir         ,   sUseProxy               ( aCopyDataSet.sUseProxy                )
239cdf0e10cSrcweir         ,   sDialog                 ( aCopyDataSet.sDialog                  )
240cdf0e10cSrcweir         ,   bProxyChanged           ( aCopyDataSet.bProxyChanged            )
241cdf0e10cSrcweir     {
242cdf0e10cSrcweir     }
243cdf0e10cSrcweir 
244cdf0e10cSrcweir     // assignment operator to cop values from another struct to this one.
operator =framework::tIMPL_DialogData245cdf0e10cSrcweir     tIMPL_DialogData& operator=( const tIMPL_DialogData& aCopyDataSet )
246cdf0e10cSrcweir     {
247cdf0e10cSrcweir         sUserName               = aCopyDataSet.sUserName                ;
248cdf0e10cSrcweir         sPassword               = aCopyDataSet.sPassword                ;
249cdf0e10cSrcweir         seqServerList           = aCopyDataSet.seqServerList            ;
250cdf0e10cSrcweir         nActiveServer           = aCopyDataSet.nActiveServer            ;
251cdf0e10cSrcweir         sConnectionType         = aCopyDataSet.sConnectionType          ;
252cdf0e10cSrcweir         aLanguage               = aCopyDataSet.aLanguage                ;
253cdf0e10cSrcweir         nPortHttp               = aCopyDataSet.nPortHttp                ;
254cdf0e10cSrcweir         nPortHttps              = aCopyDataSet.nPortHttps               ;
255cdf0e10cSrcweir         aParentWindow           = aCopyDataSet.aParentWindow            ;
256cdf0e10cSrcweir         sSecurityProxy          = aCopyDataSet.sSecurityProxy           ;
257cdf0e10cSrcweir         sUseProxy               = aCopyDataSet.sUseProxy                ;
258cdf0e10cSrcweir         sDialog                 = aCopyDataSet.sDialog                  ;
259cdf0e10cSrcweir         bProxyChanged           = aCopyDataSet.bProxyChanged            ;
260cdf0e10cSrcweir         return *this;
261cdf0e10cSrcweir     }
262cdf0e10cSrcweir };
263cdf0e10cSrcweir 
264cdf0e10cSrcweir /*-************************************************************************************************************//**
265cdf0e10cSrcweir     @short      implements an "private inline" dialog class used by follow class LoginDialog to show the dialog
266cdf0e10cSrcweir     @descr      This is a VCL- modal dialog and not threadsafe! We use it as private definition in the context of login dialog only!
267cdf0e10cSrcweir 
268cdf0e10cSrcweir     @implements -
269cdf0e10cSrcweir 
270cdf0e10cSrcweir     @base       ModalDialog
271cdf0e10cSrcweir *//*-*************************************************************************************************************/
272cdf0e10cSrcweir 
273cdf0e10cSrcweir class cIMPL_Dialog  :   public ModalDialog
274cdf0e10cSrcweir {
275cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
276cdf0e10cSrcweir     //  public methods
277cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
278cdf0e10cSrcweir 
279cdf0e10cSrcweir     public:
280cdf0e10cSrcweir 
281cdf0e10cSrcweir         /*-****************************************************************************************************//**
282cdf0e10cSrcweir             @short      default ctor
283816026e9SJohn Bampton             @descr      This ctor initialize the dialog, load resources but not set values on edits or check boxes!
284cdf0e10cSrcweir                         These is implemented by setValues() on the same class.
28502f6802cSJohn Bampton                         You must give us a language identifier to describe which resource should be used!
286cdf0e10cSrcweir 
287cdf0e10cSrcweir             @seealso    method setValues()
288cdf0e10cSrcweir 
28902f6802cSJohn Bampton             @param      "aLanguage" , identifier to describe resource language
290cdf0e10cSrcweir             @param      "pParent"   , parent window handle for dialog! If is it NULL -> no parent exist ...
291cdf0e10cSrcweir             @return     -
292cdf0e10cSrcweir 
293cdf0e10cSrcweir             @onerror    -
294cdf0e10cSrcweir         *//*-*****************************************************************************************************/
295cdf0e10cSrcweir 
296cdf0e10cSrcweir         cIMPL_Dialog( ::com::sun::star::lang::Locale aLocale, Window* pParent );
297cdf0e10cSrcweir 
298cdf0e10cSrcweir         /*-****************************************************************************************************//**
299cdf0e10cSrcweir             @short      default dtor
300816026e9SJohn Bampton             @descr      This dtor deinitialize the dialog and free all used resources.
301cdf0e10cSrcweir                         But you can't get the values of the dialog. Use getValues() to do this.
302cdf0e10cSrcweir 
303cdf0e10cSrcweir             @seealso    method getValues()
304cdf0e10cSrcweir 
305cdf0e10cSrcweir             @param      -
306cdf0e10cSrcweir             @return     -
307cdf0e10cSrcweir 
308cdf0e10cSrcweir             @onerror    -
309cdf0e10cSrcweir         *//*-*****************************************************************************************************/
310cdf0e10cSrcweir 
311cdf0e10cSrcweir         ~cIMPL_Dialog();
312cdf0e10cSrcweir 
313cdf0e10cSrcweir         /*-****************************************************************************************************//**
314cdf0e10cSrcweir             @short      set new values on dialog to show
315cdf0e10cSrcweir             @descr      Use this to initialize the dialg with new values for showing before execute.
316cdf0e10cSrcweir 
317cdf0e10cSrcweir             @seealso    method getValues()
318cdf0e10cSrcweir 
319cdf0e10cSrcweir             @param      "aDataSet"; struct of variables to set it on dialog controls
320cdf0e10cSrcweir             @return     -
321cdf0e10cSrcweir 
322cdf0e10cSrcweir             @onerror    -
323cdf0e10cSrcweir         *//*-*****************************************************************************************************/
324cdf0e10cSrcweir 
325cdf0e10cSrcweir         void setValues( const tIMPL_DialogData& aDataSet );
326cdf0e10cSrcweir 
327cdf0e10cSrcweir         /*-****************************************************************************************************//**
328cdf0e10cSrcweir             @short      get current values from dialog controls
329cdf0e10cSrcweir             @descr      Use this if you will get all values of dialog after execute.
330cdf0e10cSrcweir 
331cdf0e10cSrcweir             @seealso    method setValues()
332cdf0e10cSrcweir 
333cdf0e10cSrcweir             @param      "aDataSet"; struct of variables filled by dialog
334cdf0e10cSrcweir             @return     -
335cdf0e10cSrcweir 
336cdf0e10cSrcweir             @onerror    -
337cdf0e10cSrcweir         *//*-*****************************************************************************************************/
338cdf0e10cSrcweir 
339cdf0e10cSrcweir         tIMPL_DialogData getValues();
340cdf0e10cSrcweir 
341cdf0e10cSrcweir         /*-****************************************************************************************************/
342cdf0e10cSrcweir         /* handler
343cdf0e10cSrcweir         */
344cdf0e10cSrcweir 
345cdf0e10cSrcweir         DECL_LINK( ClickHdl, void* );
346cdf0e10cSrcweir 
347cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
348cdf0e10cSrcweir     //  private methods
349cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
350cdf0e10cSrcweir 
351cdf0e10cSrcweir     private:
352cdf0e10cSrcweir         void            setCustomSettings();
353cdf0e10cSrcweir 
354cdf0e10cSrcweir         void            showDialogExpanded();
355cdf0e10cSrcweir         void            showDialogCollapsed();
356cdf0e10cSrcweir 
357cdf0e10cSrcweir         /*-****************************************************************************************************//**
358cdf0e10cSrcweir             @short      get a host and port from a concated string form <host>:<port>
359cdf0e10cSrcweir 
360cdf0e10cSrcweir             @param      "aProxyHostPort" ; a string with the following format <host>:<port>
361cdf0e10cSrcweir             @param      "aHost"          ; a host string
362cdf0e10cSrcweir             @param      "aPort"          ; a port string
363cdf0e10cSrcweir             @return     -
364cdf0e10cSrcweir 
365cdf0e10cSrcweir             @onerror    -
366cdf0e10cSrcweir         *//*-*****************************************************************************************************/
367cdf0e10cSrcweir 
368cdf0e10cSrcweir         void            getProxyHostPort( const OUSTRING& aProxyHostPort, OUSTRING& aHost, OUSTRING& aPort );
369cdf0e10cSrcweir 
370cdf0e10cSrcweir         /*-****************************************************************************************************//**
37102f6802cSJohn Bampton             @short      get a resource for given id from right resource file
37202f6802cSJohn Bampton             @descr      This dialog need his own resource. We can't use the global resource manager!
373cdf0e10cSrcweir                         We must use our own.
37402f6802cSJohn Bampton                         You must give us the resource language. If no right resource could be found -
37507a3d7f1SPedro Giffuni                         any  existing one is used automatically!
376cdf0e10cSrcweir 
377cdf0e10cSrcweir             @seealso    method setValues()
378cdf0e10cSrcweir 
37902f6802cSJohn Bampton             @param      "nId"       ; id to convert it in right resource id
38002f6802cSJohn Bampton             @param      "aLanguage" ; type of resource language
381cdf0e10cSrcweir             @return     -
382cdf0e10cSrcweir 
383cdf0e10cSrcweir             @onerror    -
384cdf0e10cSrcweir         *//*-*****************************************************************************************************/
385cdf0e10cSrcweir 
386cdf0e10cSrcweir         static ResId impl_getResId( sal_uInt16      nId         ,
387cdf0e10cSrcweir                                     ::com::sun::star::lang::Locale  aLocale );
388cdf0e10cSrcweir 
389cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
390cdf0e10cSrcweir     //  private member
391cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
392cdf0e10cSrcweir 
393cdf0e10cSrcweir     private:
394cdf0e10cSrcweir 
395cdf0e10cSrcweir         FixedImage          m_imageHeader               ;
396cdf0e10cSrcweir         FixedText           m_textLoginText             ;
397cdf0e10cSrcweir         FixedText           m_textUserName              ;
398cdf0e10cSrcweir         Edit                m_editUserName              ;
399cdf0e10cSrcweir         FixedText           m_textPassword              ;
400cdf0e10cSrcweir         Edit                m_editPassword              ;
401cdf0e10cSrcweir         FixedLine           m_fixedLineServer           ;
402cdf0e10cSrcweir         FixedText           m_textServer                ;
403cdf0e10cSrcweir         ComboBox            m_comboServer               ;
404cdf0e10cSrcweir         FixedLine           m_fixedLineProxySettings    ;
405cdf0e10cSrcweir         RadioButton         m_radioNoProxy              ;
406cdf0e10cSrcweir         RadioButton         m_radioBrowserProxy         ;
407cdf0e10cSrcweir         RadioButton         m_radioCustomProxy          ;
408cdf0e10cSrcweir         FixedText           m_textSecurityProxy         ;
409cdf0e10cSrcweir         FixedText           m_textSecurityProxyHost     ;
410cdf0e10cSrcweir         Edit                m_editSecurityProxyHost     ;
411cdf0e10cSrcweir         FixedText           m_textSecurityProxyPort     ;
412cdf0e10cSrcweir         Edit                m_editSecurityProxyPort     ;
413cdf0e10cSrcweir         FixedLine           m_fixedLineButtons          ;
414cdf0e10cSrcweir         OKButton            m_buttonOK                  ;
415cdf0e10cSrcweir         CancelButton        m_buttonCancel              ;
416cdf0e10cSrcweir         PushButton          m_buttonAdditionalSettings  ;
417cdf0e10cSrcweir         Size                m_expandedDialogSize        ;
418cdf0e10cSrcweir         Size                m_collapsedDialogSize       ;
419cdf0e10cSrcweir         Point               m_expOKButtonPos            ;
420cdf0e10cSrcweir         Point               m_expCancelButtonPos        ;
421cdf0e10cSrcweir         Point               m_expAdditionalButtonPos    ;
422cdf0e10cSrcweir         Point               m_colOKButtonPos            ;
423cdf0e10cSrcweir         Point               m_colCancelButtonPos        ;
424cdf0e10cSrcweir         Point               m_colAdditionalButtonPos    ;
425cdf0e10cSrcweir         OUSTRING            m_colButtonAddText          ;
426cdf0e10cSrcweir         OUSTRING            m_expButtonAddText          ;
427cdf0e10cSrcweir         tIMPL_DialogData    m_aDataSet                  ;
428cdf0e10cSrcweir };
429cdf0e10cSrcweir 
430cdf0e10cSrcweir /*-************************************************************************************************************//**
431cdf0e10cSrcweir     @short
432cdf0e10cSrcweir 
433cdf0e10cSrcweir     @descr      -
434cdf0e10cSrcweir 
435cdf0e10cSrcweir     @implements XInterface
436cdf0e10cSrcweir                 XTypeProvider
437cdf0e10cSrcweir                 XServiceInfo
438cdf0e10cSrcweir                 XDialog
439cdf0e10cSrcweir 
440cdf0e10cSrcweir     @base       ThreadHelpBase
441cdf0e10cSrcweir                 OWeakObject
442cdf0e10cSrcweir *//*-*************************************************************************************************************/
443cdf0e10cSrcweir 
444cdf0e10cSrcweir class LoginDialog   :   public XTYPEPROVIDER                ,
445cdf0e10cSrcweir                         public XSERVICEINFO                 ,
446cdf0e10cSrcweir                         public XDIALOG                      ,
447cdf0e10cSrcweir                         public XFLUSHABLE                   ,
44807a3d7f1SPedro Giffuni                         private ThreadHelpBase              ,   // Order of baseclasses is necessary for right initialization!
449cdf0e10cSrcweir                         public OBROADCASTHELPER             ,
450cdf0e10cSrcweir                         public OPROPERTYSETHELPER           ,
451cdf0e10cSrcweir                         public OWEAKOBJECT
452cdf0e10cSrcweir {
453cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
454cdf0e10cSrcweir     //  public methods
455cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
456cdf0e10cSrcweir 
457cdf0e10cSrcweir     public:
458cdf0e10cSrcweir 
459cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
460cdf0e10cSrcweir         //  constructor / destructor
461cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
462cdf0e10cSrcweir 
463cdf0e10cSrcweir         /*-****************************************************************************************************//**
464cdf0e10cSrcweir             @short      -
465cdf0e10cSrcweir             @descr      -
466cdf0e10cSrcweir 
467cdf0e10cSrcweir             @seealso    -
468cdf0e10cSrcweir 
469cdf0e10cSrcweir             @param      -
470cdf0e10cSrcweir             @return     -
471cdf0e10cSrcweir 
472cdf0e10cSrcweir             @onerror    -
473cdf0e10cSrcweir         *//*-*****************************************************************************************************/
474cdf0e10cSrcweir 
475cdf0e10cSrcweir         LoginDialog( const REFERENCE< XMULTISERVICEFACTORY >& sFactory );
476cdf0e10cSrcweir 
477cdf0e10cSrcweir         /*-****************************************************************************************************//**
478cdf0e10cSrcweir             @short      -
479cdf0e10cSrcweir             @descr      -
480cdf0e10cSrcweir 
481cdf0e10cSrcweir             @seealso    -
482cdf0e10cSrcweir 
483cdf0e10cSrcweir             @param      -
484cdf0e10cSrcweir             @return     -
485cdf0e10cSrcweir 
486cdf0e10cSrcweir             @onerror    -
487cdf0e10cSrcweir         *//*-*****************************************************************************************************/
488cdf0e10cSrcweir 
489cdf0e10cSrcweir         virtual ~LoginDialog();
490cdf0e10cSrcweir 
491cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
492cdf0e10cSrcweir         //  XInterface, XTypeProvider, XServiceInfo
493cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
494cdf0e10cSrcweir 
495cdf0e10cSrcweir         DECLARE_XINTERFACE
496cdf0e10cSrcweir         DECLARE_XTYPEPROVIDER
497cdf0e10cSrcweir         DECLARE_XSERVICEINFO
498cdf0e10cSrcweir 
499cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
500cdf0e10cSrcweir         //  XFlushable
501cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
502cdf0e10cSrcweir 
503cdf0e10cSrcweir         /*-****************************************************************************************************//**
504cdf0e10cSrcweir             @short      write changed values to configuration
5052e3a1b6eSmseidel             @descr      Normally the dialog returns with an OK or ERROR value. If OK occur - we flush data
506*374d2a96SJohn Bampton                         automatically. But otherwise we do nothing. If user of this service wish to use property set
507cdf0e10cSrcweir                         only without any UI(!) - he must call "flush()" explicitly to write data!
508cdf0e10cSrcweir 
509cdf0e10cSrcweir             @seealso    -
510cdf0e10cSrcweir 
511cdf0e10cSrcweir             @param      -
512cdf0e10cSrcweir             @return     -
513cdf0e10cSrcweir 
514cdf0e10cSrcweir             @onerror    -
515cdf0e10cSrcweir         *//*-*****************************************************************************************************/
516cdf0e10cSrcweir 
517cdf0e10cSrcweir         virtual void SAL_CALL flush() throw( RUNTIMEEXCEPTION );
518cdf0e10cSrcweir         virtual void SAL_CALL addFlushListener( const REFERENCE< XFLUSHLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
519cdf0e10cSrcweir         virtual void SAL_CALL removeFlushListener( const REFERENCE< XFLUSHLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
520cdf0e10cSrcweir 
521cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
522cdf0e10cSrcweir         //  XDialog
523cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
524cdf0e10cSrcweir 
525cdf0e10cSrcweir         /*-****************************************************************************************************//**
526cdf0e10cSrcweir             @short      set new title of dialog
527cdf0e10cSrcweir             @descr      -
528cdf0e10cSrcweir 
529cdf0e10cSrcweir             @seealso    -
530cdf0e10cSrcweir 
531cdf0e10cSrcweir             @param      -
532cdf0e10cSrcweir             @return     -
533cdf0e10cSrcweir 
534cdf0e10cSrcweir             @onerror    -
535cdf0e10cSrcweir         *//*-*****************************************************************************************************/
536cdf0e10cSrcweir 
537cdf0e10cSrcweir         virtual void SAL_CALL setTitle( const OUSTRING& sTitle ) throw( RUNTIMEEXCEPTION );
538cdf0e10cSrcweir 
539cdf0e10cSrcweir         /*-****************************************************************************************************//**
540cdf0e10cSrcweir             @short      return the current title of this dialog
541cdf0e10cSrcweir             @descr      -
542cdf0e10cSrcweir 
543cdf0e10cSrcweir             @seealso    -
544cdf0e10cSrcweir 
545cdf0e10cSrcweir             @param      -
546cdf0e10cSrcweir             @return     -
547cdf0e10cSrcweir 
548cdf0e10cSrcweir             @onerror    -
549cdf0e10cSrcweir         *//*-*****************************************************************************************************/
550cdf0e10cSrcweir 
551cdf0e10cSrcweir         virtual OUSTRING SAL_CALL getTitle() throw( RUNTIMEEXCEPTION );
552cdf0e10cSrcweir 
553cdf0e10cSrcweir         /*-****************************************************************************************************//**
554cdf0e10cSrcweir             @short      show the dialog and return user reaction
555cdf0e10cSrcweir             @descr      If user close dialog with OK we return 1 else
556cdf0e10cSrcweir                         user has cancelled this dialog and we return 0.
557cdf0e10cSrcweir                         You can use this return value directly as boolean.
558cdf0e10cSrcweir 
559cdf0e10cSrcweir             @seealso    -
560cdf0e10cSrcweir 
561cdf0e10cSrcweir             @param      -
562cdf0e10cSrcweir             @return     1; if closed with OK
563cdf0e10cSrcweir             @return     0; if cancelled
564cdf0e10cSrcweir 
565cdf0e10cSrcweir             @onerror    We return 0(sal_False).
566cdf0e10cSrcweir         *//*-*****************************************************************************************************/
567cdf0e10cSrcweir 
568cdf0e10cSrcweir         virtual sal_Int16 SAL_CALL execute() throw( RUNTIMEEXCEPTION );
569cdf0e10cSrcweir 
570cdf0e10cSrcweir         /*-****************************************************************************************************//**
571cdf0e10cSrcweir             @short      not implemented yet!
572cdf0e10cSrcweir             @descr      -
573cdf0e10cSrcweir 
574cdf0e10cSrcweir             @seealso    -
575cdf0e10cSrcweir 
576cdf0e10cSrcweir             @param      -
577cdf0e10cSrcweir             @return     -
578cdf0e10cSrcweir 
579cdf0e10cSrcweir             @onerror    -
580cdf0e10cSrcweir         *//*-*****************************************************************************************************/
581cdf0e10cSrcweir 
582cdf0e10cSrcweir         virtual void SAL_CALL endExecute() throw( RUNTIMEEXCEPTION );
583cdf0e10cSrcweir 
584cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
585cdf0e10cSrcweir     //  protected methods
586cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
587cdf0e10cSrcweir 
588cdf0e10cSrcweir     protected:
589cdf0e10cSrcweir 
590cdf0e10cSrcweir         //---------------------------------------------------------------------------
591cdf0e10cSrcweir         //  OPropertySetHelper
592cdf0e10cSrcweir         //---------------------------------------------------------------------------
593cdf0e10cSrcweir 
594cdf0e10cSrcweir         /*-****************************************************************************************************//**
595cdf0e10cSrcweir             @short      try to convert a property value
596cdf0e10cSrcweir             @descr      This method is calling from helperclass "OPropertySetHelper".
597cdf0e10cSrcweir                         Don't use this directly!
598cdf0e10cSrcweir                         You must try to convert the value of given propertyhandle and
599cdf0e10cSrcweir                         return results of this operation. This will be use to ask vetoable
60007a3d7f1SPedro Giffuni                         listener. If no listener have a veto, we will change value really!
601cdf0e10cSrcweir                         ( in method setFastPropertyValue_NoBroadcast(...) )
602cdf0e10cSrcweir 
603cdf0e10cSrcweir             @seealso    class OPropertySetHelper
604cdf0e10cSrcweir             @seealso    method setFastPropertyValue_NoBroadcast()
605cdf0e10cSrcweir             @seealso    method impl_tryToChangeProperty()
606cdf0e10cSrcweir 
607cdf0e10cSrcweir             @param      "aConvertedValue"   new converted value of property
608cdf0e10cSrcweir             @param      "aOldValue"         old value of property
609cdf0e10cSrcweir             @param      "nHandle"           handle of property
610cdf0e10cSrcweir             @param      "aValue"            new value of property
611cdf0e10cSrcweir             @return     sal_True if value will be changed, sal_FALSE otherway
612cdf0e10cSrcweir 
613cdf0e10cSrcweir             @onerror    IllegalArgumentException, if you call this with an invalid argument
614cdf0e10cSrcweir         *//*-*****************************************************************************************************/
615cdf0e10cSrcweir 
616cdf0e10cSrcweir         virtual sal_Bool SAL_CALL convertFastPropertyValue(         ANY&        aConvertedValue ,
617cdf0e10cSrcweir                                                                     ANY&        aOldValue       ,
618cdf0e10cSrcweir                                                                     sal_Int32   nHandle         ,
619cdf0e10cSrcweir                                                             const   ANY&        aValue          ) throw( ILLEGALARGUMENTEXCEPTION );
620cdf0e10cSrcweir 
621cdf0e10cSrcweir         /*-****************************************************************************************************//**
622cdf0e10cSrcweir             @short      set value of a transient property
623cdf0e10cSrcweir             @descr      This method is calling from helperclass "OPropertySetHelper".
624cdf0e10cSrcweir                         Don't use this directly!
625cdf0e10cSrcweir                         Handle and value are valid everyway! You must set the new value only.
62607a3d7f1SPedro Giffuni                         After this, baseclass send messages to all listener automatically.
627cdf0e10cSrcweir 
628cdf0e10cSrcweir             @seealso    OPropertySetHelper
629cdf0e10cSrcweir 
630cdf0e10cSrcweir             @param      "nHandle"   handle of property to change
631cdf0e10cSrcweir             @param      "aValue"    new value of property
632cdf0e10cSrcweir             @return     -
633cdf0e10cSrcweir 
634cdf0e10cSrcweir             @onerror    An exception is thrown.
635cdf0e10cSrcweir         *//*-*****************************************************************************************************/
636cdf0e10cSrcweir 
637cdf0e10cSrcweir         virtual void SAL_CALL setFastPropertyValue_NoBroadcast(         sal_Int32   nHandle ,
638cdf0e10cSrcweir                                                                 const   ANY&        aValue  ) throw( EXCEPTION );
639cdf0e10cSrcweir 
640cdf0e10cSrcweir         /*-****************************************************************************************************//**
641cdf0e10cSrcweir             @short      get value of a transient property
642cdf0e10cSrcweir             @descr      This method is calling from helperclass "OPropertySetHelper".
643cdf0e10cSrcweir                         Don't use this directly!
644cdf0e10cSrcweir 
645cdf0e10cSrcweir             @seealso    OPropertySetHelper
646cdf0e10cSrcweir 
647cdf0e10cSrcweir             @param      "nHandle"   handle of property to change
648cdf0e10cSrcweir             @param      "aValue"    current value of property
649cdf0e10cSrcweir             @return     -
650cdf0e10cSrcweir 
651cdf0e10cSrcweir             @onerror    -
652cdf0e10cSrcweir         *//*-*****************************************************************************************************/
653cdf0e10cSrcweir 
654cdf0e10cSrcweir         virtual void SAL_CALL getFastPropertyValue( ANY&        aValue  ,
655cdf0e10cSrcweir                                                     sal_Int32   nHandle ) const;
656cdf0e10cSrcweir 
657cdf0e10cSrcweir         /*-****************************************************************************************************//**
658cdf0e10cSrcweir             @short      return structure and information about transient properties
659cdf0e10cSrcweir             @descr      This method is calling from helperclass "OPropertySetHelper".
660cdf0e10cSrcweir                         Don't use this directly!
661cdf0e10cSrcweir 
662cdf0e10cSrcweir             @seealso    OPropertySetHelper
663cdf0e10cSrcweir 
664cdf0e10cSrcweir             @param      -
665cdf0e10cSrcweir             @return     structure with property-informations
666cdf0e10cSrcweir 
667cdf0e10cSrcweir             @onerror    -
668cdf0e10cSrcweir         *//*-*****************************************************************************************************/
669cdf0e10cSrcweir 
670cdf0e10cSrcweir         virtual IPROPERTYARRAYHELPER& SAL_CALL getInfoHelper();
671cdf0e10cSrcweir 
672cdf0e10cSrcweir         /*-****************************************************************************************************//**
673cdf0e10cSrcweir             @short      return propertysetinfo
674cdf0e10cSrcweir             @descr      You can call this method to get information about transient properties
675cdf0e10cSrcweir                         of this object.
676cdf0e10cSrcweir 
677cdf0e10cSrcweir             @seealso    OPropertySetHelper
678cdf0e10cSrcweir             @seealso    XPropertySet
679cdf0e10cSrcweir             @seealso    XMultiPropertySet
680cdf0e10cSrcweir 
681cdf0e10cSrcweir             @param      -
682cdf0e10cSrcweir             @return     reference to object with information [XPropertySetInfo]
683cdf0e10cSrcweir 
684cdf0e10cSrcweir             @onerror    -
685cdf0e10cSrcweir         *//*-*****************************************************************************************************/
686cdf0e10cSrcweir 
687cdf0e10cSrcweir         virtual REFERENCE< XPROPERTYSETINFO > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException);
688cdf0e10cSrcweir 
689cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
690cdf0e10cSrcweir     //  private methods
691cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
692cdf0e10cSrcweir 
693cdf0e10cSrcweir     private:
694cdf0e10cSrcweir 
695cdf0e10cSrcweir         /*-****************************************************************************************************//**
696cdf0e10cSrcweir             @short      return table of all supported properties
697cdf0e10cSrcweir             @descr      We need this table to initialize our helper baseclass OPropertySetHelper
698cdf0e10cSrcweir 
699cdf0e10cSrcweir             @seealso    -
700cdf0e10cSrcweir 
701cdf0e10cSrcweir             @param      -
702cdf0e10cSrcweir             @return     -
703cdf0e10cSrcweir 
704cdf0e10cSrcweir             @onerror    -
705cdf0e10cSrcweir         *//*-*****************************************************************************************************/
706cdf0e10cSrcweir 
707cdf0e10cSrcweir         const SEQUENCE< PROPERTY > impl_getStaticPropertyDescriptor();
708cdf0e10cSrcweir 
709cdf0e10cSrcweir         /*-****************************************************************************************************//**
710cdf0e10cSrcweir             @short      helper method to check if a property will change his value
71107a3d7f1SPedro Giffuni             @descr      Is necessary for vetoable listener mechanism of OPropertySethelper.
712cdf0e10cSrcweir 
713cdf0e10cSrcweir             @seealso    -
714cdf0e10cSrcweir 
715cdf0e10cSrcweir             @param      -
716cdf0e10cSrcweir             @return     -
717cdf0e10cSrcweir 
718cdf0e10cSrcweir             @onerror    -
719cdf0e10cSrcweir         *//*-*****************************************************************************************************/
720cdf0e10cSrcweir 
721cdf0e10cSrcweir         sal_Bool impl_tryToChangeProperty(  const   OUSTRING&               sProperty       ,
722cdf0e10cSrcweir                                             const   ANY&                    aValue          ,
723cdf0e10cSrcweir                                                     ANY&                    aOldValue       ,
724cdf0e10cSrcweir                                                     ANY&                    aConvertedValue ) throw( ILLEGALARGUMENTEXCEPTION );
725cdf0e10cSrcweir 
726cdf0e10cSrcweir         sal_Bool impl_tryToChangeProperty(  const   SEQUENCE< OUSTRING >&   seqProperty     ,
727cdf0e10cSrcweir                                             const   ANY&                    aValue          ,
728cdf0e10cSrcweir                                                     ANY&                    aOldValue       ,
729cdf0e10cSrcweir                                                     ANY&                    aConvertedValue ) throw( ILLEGALARGUMENTEXCEPTION );
730cdf0e10cSrcweir 
731cdf0e10cSrcweir         sal_Bool impl_tryToChangeProperty(  const   sal_Int32&              nProperty       ,
732cdf0e10cSrcweir                                             const   ANY&                    aValue          ,
733cdf0e10cSrcweir                                                     ANY&                    aOldValue       ,
734cdf0e10cSrcweir                                                     ANY&                    aConvertedValue ) throw( ILLEGALARGUMENTEXCEPTION );
735cdf0e10cSrcweir 
736cdf0e10cSrcweir         sal_Bool impl_tryToChangeProperty(  const   LOCALE&                 aProperty       ,
737cdf0e10cSrcweir                                             const   ANY&                    aValue          ,
738cdf0e10cSrcweir                                                     ANY&                    aOldValue       ,
739cdf0e10cSrcweir                                                     ANY&                    aConvertedValue ) throw( ILLEGALARGUMENTEXCEPTION );
740cdf0e10cSrcweir 
741cdf0e10cSrcweir         sal_Bool impl_tryToChangeProperty(  const   ANY&                    aProperty       ,
742cdf0e10cSrcweir                                             const   ANY&                    aValue          ,
743cdf0e10cSrcweir                                                     ANY&                    aOldValue       ,
744cdf0e10cSrcweir                                                     ANY&                    aConvertedValue ) throw( ILLEGALARGUMENTEXCEPTION );
745cdf0e10cSrcweir 
746cdf0e10cSrcweir         /*-****************************************************************************************************//**
747cdf0e10cSrcweir             @short      search and open profile
748cdf0e10cSrcweir             @descr      This method search and open the ini file. It initialize some member too.
749cdf0e10cSrcweir 
750cdf0e10cSrcweir             @seealso    -
751cdf0e10cSrcweir 
752cdf0e10cSrcweir             @param      -
753cdf0e10cSrcweir             @return     -
754cdf0e10cSrcweir 
755cdf0e10cSrcweir             @onerror    -
756cdf0e10cSrcweir         *//*-*****************************************************************************************************/
757cdf0e10cSrcweir 
758cdf0e10cSrcweir         void impl_openProfile();
759cdf0e10cSrcweir 
760cdf0e10cSrcweir         /*-****************************************************************************************************//**
761cdf0e10cSrcweir             @short      close profile and free some member
762cdf0e10cSrcweir             @descr      This method close current opened ini file and deinitialize some member too.
763cdf0e10cSrcweir 
764cdf0e10cSrcweir             @seealso    -
765cdf0e10cSrcweir 
766cdf0e10cSrcweir             @param      -
767cdf0e10cSrcweir             @return     -
768cdf0e10cSrcweir 
769cdf0e10cSrcweir             @onerror    -
770cdf0e10cSrcweir         *//*-*****************************************************************************************************/
771cdf0e10cSrcweir 
772cdf0e10cSrcweir         void impl_closeProfile();
773cdf0e10cSrcweir 
774cdf0e10cSrcweir         /*-****************************************************************************************************//**
775cdf0e10cSrcweir             @short      write profile and free some member
776cdf0e10cSrcweir             @descr      This method writes current settings and deinitialize some member too.
777cdf0e10cSrcweir 
778cdf0e10cSrcweir             @seealso    -
779cdf0e10cSrcweir 
780cdf0e10cSrcweir             @param      -
781cdf0e10cSrcweir             @return     -
782cdf0e10cSrcweir 
783cdf0e10cSrcweir             @onerror    -
784cdf0e10cSrcweir         *//*-*****************************************************************************************************/
785cdf0e10cSrcweir         void impl_writeProfile();
786cdf0e10cSrcweir 
787cdf0e10cSrcweir         /*-****************************************************************************************************//**
788cdf0e10cSrcweir             @short      check current server history
789cdf0e10cSrcweir             @descr      Our current server history implementation can handle 10 elements as maximum.
790cdf0e10cSrcweir                         If more then 10 elements exist; old ones will be deleted.
791cdf0e10cSrcweir 
792cdf0e10cSrcweir             @seealso    -
793cdf0e10cSrcweir 
794cdf0e10cSrcweir             @param      "seqHistory"; current history
795cdf0e10cSrcweir             @return     Sequence< OUString >; checked and repaired history
796cdf0e10cSrcweir 
797cdf0e10cSrcweir             @onerror    -
798cdf0e10cSrcweir         *//*-*****************************************************************************************************/
799cdf0e10cSrcweir 
800cdf0e10cSrcweir         void impl_addServerToHistory(           SEQUENCE< OUSTRING >&   seqHistory      ,
801cdf0e10cSrcweir                                                 sal_Int32&              nActiveServer   ,
802cdf0e10cSrcweir                                         const   OUSTRING&               sServer         );
803cdf0e10cSrcweir 
804cdf0e10cSrcweir         /*-****************************************************************************************************//**
805cdf0e10cSrcweir             @short      helper methods to read/write  properties from/to ini file
806cdf0e10cSrcweir             @descr      Using of Config-Class isn't easy every time :-(
807cfd52e18Smseidel                         That's the reason for these helper. State of operation isn't really important...
80807a3d7f1SPedro Giffuni                         but we assert impossible cases or occurred errors!
809cdf0e10cSrcweir 
810cdf0e10cSrcweir             @seealso    -
811cdf0e10cSrcweir 
812cdf0e10cSrcweir             @param      -
813cdf0e10cSrcweir             @return     -
814cdf0e10cSrcweir 
815cdf0e10cSrcweir             @onerror    Assertions are shown.
816cdf0e10cSrcweir         *//*-*****************************************************************************************************/
817cdf0e10cSrcweir 
818cdf0e10cSrcweir         void                    impl_writeUserName              (   const   OUSTRING&               sUserName       );
819cdf0e10cSrcweir         void                    impl_writeActiveServer          (           sal_Int32               nActiveServer   );
820cdf0e10cSrcweir         void                    impl_writeServerHistory         (   const   SEQUENCE< OUSTRING >&   lHistory        );
821cdf0e10cSrcweir         void                    impl_writeConnectionType        (   const   OUSTRING&               sConnectionType );
822cdf0e10cSrcweir         void                    impl_writeLanguage              (   const   LOCALE&                 aLanguage       );
823cdf0e10cSrcweir         void                    impl_writePortHttp              (           sal_Int32               nPort           );
824cdf0e10cSrcweir         void                    impl_writePortHttps             (           sal_Int32               nPort           );
825cdf0e10cSrcweir         void                    impl_writeSecurityProxy         (   const   OUSTRING&               sSecurityProxy  );
826cdf0e10cSrcweir         void                    impl_writeUseProxy              (   const   OUSTRING&               sUseProxy       );
827cdf0e10cSrcweir         void                    impl_writeDialog                (   const   OUSTRING&               sDialog         );
828cdf0e10cSrcweir 
829cdf0e10cSrcweir         OUSTRING                impl_readUserName               (                                                   );
830cdf0e10cSrcweir         sal_Int32               impl_readActiveServer           (                                                   );
831cdf0e10cSrcweir         SEQUENCE< OUSTRING >    impl_readServerHistory          (                                                   );
832cdf0e10cSrcweir         OUSTRING                impl_readConnectionType         (                                                   );
833cdf0e10cSrcweir         LOCALE                  impl_readLanguage               (                                                   );
834cdf0e10cSrcweir         sal_Int32               impl_readPortHttp               (                                                   );
835cdf0e10cSrcweir         sal_Int32               impl_readPortHttps              (                                                   );
836cdf0e10cSrcweir         OUSTRING                impl_readSecurityProxy          (                                                   );
837cdf0e10cSrcweir         OUSTRING                impl_readUseProxy               (                                                   );
838cdf0e10cSrcweir         OUSTRING                impl_readDialog                 (                                                   );
839cdf0e10cSrcweir 
840cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
841cdf0e10cSrcweir     //  debug methods
842cdf0e10cSrcweir     //  (should be private everyway!)
843cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
844cdf0e10cSrcweir 
845cdf0e10cSrcweir         /*-****************************************************************************************************//**
846ad1df53dSJohn Bampton             @short      debug-method to check incoming parameter of some other methods of this class
847cdf0e10cSrcweir             @descr      The following methods are used to check parameters for other methods
848cdf0e10cSrcweir                         of this class. The return value is used directly for an ASSERT(...).
849cdf0e10cSrcweir 
850cdf0e10cSrcweir             @seealso    ASSERTs in implementation!
851cdf0e10cSrcweir 
852cdf0e10cSrcweir             @param      references to checking variables
853cdf0e10cSrcweir             @return     sal_False on invalid parameter<BR>
854cdf0e10cSrcweir                         sal_True  otherway
855cdf0e10cSrcweir 
856cdf0e10cSrcweir             @onerror    -
857cdf0e10cSrcweir         *//*-*****************************************************************************************************/
858cdf0e10cSrcweir 
859cdf0e10cSrcweir     #ifdef ENABLE_ASSERTIONS
860cdf0e10cSrcweir 
861cdf0e10cSrcweir     private:
862cdf0e10cSrcweir 
863cdf0e10cSrcweir         sal_Bool impldbg_checkParameter_LoginDialog (   const   REFERENCE< XMULTISERVICEFACTORY >&  xFactory    );
864cdf0e10cSrcweir         sal_Bool impldbg_checkParameter_setTitle    (   const   OUSTRING&                           sTitle      );
865cdf0e10cSrcweir 
866cdf0e10cSrcweir     #endif  // #ifdef ENABLE_ASSERTIONS
867cdf0e10cSrcweir 
868cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
869cdf0e10cSrcweir     //  variables
870cdf0e10cSrcweir     //  (should be private everyway!)
871cdf0e10cSrcweir     //-------------------------------------------------------------------------------------------------------------
872cdf0e10cSrcweir 
873cdf0e10cSrcweir     private:
874cdf0e10cSrcweir 
875cdf0e10cSrcweir         REFERENCE< XMULTISERVICEFACTORY >       m_xFactory          ;   /// reference to factory, which has created this instance
876cdf0e10cSrcweir         OUSTRING                                m_sININame          ;   /// full qualified path to profile UNC-notation
877cdf0e10cSrcweir         Config*                                 m_pINIManager       ;   /// manager for full access to ini file
878cdf0e10cSrcweir         sal_Bool                                m_bInExecuteMode    ;   /// protection against setting of properties during showing of dialog
879cdf0e10cSrcweir         cIMPL_Dialog*                           m_pDialog           ;   /// VCL dialog
880cdf0e10cSrcweir         tIMPL_DialogData                        m_aPropertySet      ;
881cdf0e10cSrcweir 
882cdf0e10cSrcweir };      //  class LoginDialog
883cdf0e10cSrcweir 
884cdf0e10cSrcweir }       //  namespace framework
885cdf0e10cSrcweir 
886cdf0e10cSrcweir #endif  //  #ifndef __FRAMEWORK_LOGINDIALOG_LOGINDIALOG_HXX_
887