2 * FryingPan - Amiga CD/DVD Recording Software (User Interface and supporting Libraries only)
3 * Copyright (C) 2001-2011 Tomasz Wiszkowski Tomasz.Wiszkowski at gmail.com
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation; either version 2.1
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #include "Application.h"
21 #include <Generic/Debug.h>
22 #include <LibC/LibC.h>
24 uint32 StartupFlags
= 0;
26 Application::Application()
28 _createDebug(true, "Application");
31 _d(Lvl_Info
, "%s: Acquiring interface..", (IPTR
)__PRETTY_FUNCTION__
);
32 Module
= GUIIFace::GetInstance(0);
33 _d(Lvl_Info
, "%s: Module caught at %08lx", (IPTR
)__PRETTY_FUNCTION__
, (IPTR
)Module
);
37 _d(Lvl_Info
, "%s: Acquiring module interface...", (IPTR
)__PRETTY_FUNCTION__
);
38 Interface
= Module
->getInterface();
39 _d(Lvl_Info
, "%s: Obtained interface: %08lx (%s)", (IPTR
)__PRETTY_FUNCTION__
, (IPTR
)Interface
, (IPTR
)(Interface
== 0 ? "Bad" : "Good"));
40 ASSERT(NULL
!= Interface
);
42 if (NULL
!= Interface
)
44 _d(Lvl_Info
, "%s: Starting the interface", (IPTR
)__PRETTY_FUNCTION__
);
46 _d(Lvl_Info
, "%s: Stoping the interface", (IPTR
)__PRETTY_FUNCTION__
);
48 _d(Lvl_Info
, "%s: Disposing the interface", (IPTR
)__PRETTY_FUNCTION__
);
52 _d(Lvl_Info
, "%s: Freeing module...", (IPTR
)__PRETTY_FUNCTION__
);
53 Module
->FreeInstance();
57 request("Information", "The Frying Pan was unable to open its libraries.\nPlease reinstall the software and make sure that\nInstaller adds the Assign to your system.", "Ok", 0);
62 Application::~Application()
64 _d(Lvl_Info
, "%s: Shutting down", (IPTR
)__PRETTY_FUNCTION__
);
68 void Application::setDebug(DbgHandler
* d
)
73 DbgHandler
* Application::getDebug()