1 /******************************************************************************
2  *
3  * Project:  OpenCPN
4  *
5  ***************************************************************************
6  *   Copyright (C) 2019 Alec Leamas                                        *
7  *                                                                         *
8  *   This program is free software; you can redistribute it and/or modify  *
9  *   it under the terms of the GNU General Public License as published by  *
10  *   the Free Software Foundation; either version 2 of the License, or     *
11  *   (at your option) any later version.                                   *
12  *                                                                         *
13  *   This program is distributed in the hope that it will be useful,       *
14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
16  *   GNU General Public License for more details.                          *
17  *                                                                         *
18  *   You should have received a copy of the GNU General Public License     *
19  *   along with this program; if not, write to the                         *
20  *   Free Software Foundation, Inc.,                                       *
21  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,  USA.         *
22  ***************************************************************************
23 */
24 
25 
26 #ifndef UPDATE_MGR_H__
27 #define UPDATE_MGR_H__
28 
29 #include <vector>
30 
31 #include <wx/dialog.h>
32 #include <wx/window.h>
33 
34 #include "catalog_parser.h"
35 
36 /**
37  * Modal dialog, displays available updates (possibly just one) and lets
38  * user select and eventually confirm update.
39  */
40 class UpdateDialog: public wxDialog
41 {
42     public:
43         UpdateDialog(wxWindow* parent,
44                      const std::vector<PluginMetadata>& updates);
45 
GetUpdate()46         PluginMetadata GetUpdate() { return update;  };
SetUpdate(const PluginMetadata md)47         void SetUpdate(const PluginMetadata md) { update = md; };
48 
49     private:
50         PluginMetadata update;
51 
52 };
53 
54 #endif // UPDATE_MGR_H__
55