Update ooo320-m1
[ooovba.git] / desktop / source / deployment / gui / dp_gui_updateinstalldialog.hxx
blob99357e82ed10a0891bc0a1428f23fa22e77e4bde
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dp_gui_updateinstalldialog.hxx,v $
10 * $Revision: 1.4.126.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_INSTALLDIALOG_HXX
32 #define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_INSTALLDIALOG_HXX
34 #include "sal/config.h"
35 #ifndef _SV_BUTTON_HXX
36 #include "vcl/button.hxx"
37 #endif
38 #include "vcl/fixed.hxx"
39 #include "vcl/dialog.hxx"
40 #include "svtools/prgsbar.hxx"
41 #include "rtl/ref.hxx"
42 #include <vector>
44 #include "dp_gui_autoscrolledit.hxx"
45 /// @HTML
47 namespace com { namespace sun { namespace star { namespace uno {
48 class XComponentContext;
49 }}}}
50 namespace com { namespace sun { namespace star { namespace xml { namespace dom {
51 class XNode;
52 }}}}}
53 namespace com { namespace sun { namespace star { namespace xml { namespace xpath {
54 class XXPathAPI;
55 }}}}}
57 class Window;
58 namespace osl {
59 class Condition;
62 namespace dp_gui {
64 struct UpdateData;
65 class UpdateCommandEnv;
68 /**
69 The modal &ldquo;Download and Installation&rdquo; dialog.
71 class UpdateInstallDialog: public ModalDialog {
72 public:
73 /**
74 Create an instance.
76 @param parent
77 the parent window, may be null
79 UpdateInstallDialog(Window * parent, std::vector<UpdateData> & aVecUpdateData,
80 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xCtx);
82 ~UpdateInstallDialog();
84 BOOL Close();
85 virtual short Execute();
87 private:
88 UpdateInstallDialog(UpdateInstallDialog &); // not defined
89 void operator =(UpdateInstallDialog &); // not defined
91 class Thread;
92 friend class Thread;
93 friend class UpdateCommandEnv;
95 DECL_LINK(cancelHandler, void *);
97 //signals in the dialog that we have finished.
98 void updateDone();
99 //Writes a particular error into the info listbox.
100 enum INSTALL_ERROR
102 ERROR_DOWNLOAD,
103 ERROR_INSTALLATION,
104 ERROR_LICENSE_DECLINED
106 void setError(INSTALL_ERROR err, ::rtl::OUString const & sExtension, ::rtl::OUString const & exceptionMessage);
107 void setError(::rtl::OUString const & exceptionMessage);
109 rtl::Reference< Thread > m_thread;
110 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xComponentContext;
111 //Signals that an error occurred during download and installation
112 bool m_bError;
113 bool m_bNoEntry;
114 bool m_bActivated;
116 ::rtl::OUString m_sInstalling;
117 ::rtl::OUString m_sFinished;
118 ::rtl::OUString m_sNoErrors;
119 ::rtl::OUString m_sErrorDownload;
120 ::rtl::OUString m_sErrorInstallation;
121 ::rtl::OUString m_sErrorLicenseDeclined;
122 ::rtl::OUString m_sNoInstall;
123 ::rtl::OUString m_sThisErrorOccurred;
125 FixedText m_ft_action;
126 ProgressBar m_statusbar;
127 FixedText m_ft_extension_name;
128 FixedText m_ft_results;
129 AutoScrollEdit m_mle_info;
130 FixedLine m_line;
131 HelpButton m_help;
132 OKButton m_ok;
133 CancelButton m_cancel;
141 #endif