disable the unrecognized nls and x flags
[AROS-Contrib.git] / FryingPan / DTLib / Main.cpp
blob3bfe5b62c34033a867bf2cb059f4870c7e948b0c
1 /*
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
4 *
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.
9 *
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 "Main.h"
21 #include <exec/lists.h>
22 #include <GenericLib/Library.h>
23 #include <Generic/VectorT.h>
24 #include "ReaderHook.h"
25 #include "WriterHook.h"
26 #include "rRAWAudio.h"
27 #include "rSplitISOData.h"
28 #include "rAIFFAudio.h"
29 #include "rISOData.h"
30 #include "rMP3Audio.h"
31 #include "wRAWAudioData.h"
32 #include "wSplitISOData.h"
33 #include "wAIFFAudio.h"
34 #include "wWAVAudio.h"
35 #include "rWAVAudio.h"
36 #include "wCUESession.h"
37 #include "rCUESession.h"
38 #include "rNRGSession.h"
39 #include <LibC/LibC.h>
40 #include <Generic/LibrarySpool.h>
42 LIBRARY("dtlibio.module", "$VER: dtlibio.module 1.0 Tomasz Wiszkowski", 1);
43 GATE1(bool, dtlRegister, MinList *, a0);
44 GATE1(void, dtlUnregister, MinList *, a0);
46 LIB_FT_Begin
47 LIB_FT_Function(dtlRegister)
48 LIB_FT_Function(dtlUnregister)
49 LIB_FT_End
51 VectorT< IRegHook* > *pReaders;
52 VectorT< IRegHook* > *pWriters;
53 LibrarySpool *pSpool;
55 DbgHandler* dbg;
57 uint32 StartupFlags = 0;
59 bool Lib_SetUp()
61 __setup();
62 LibrarySpool::Init();
64 pReaders = new VectorT< IRegHook* >();
65 pWriters = new VectorT< IRegHook* >();
67 *pReaders << new ReaderHook<rISOData, 100>;
68 *pReaders << new ReaderHook<rSplitISOData, 30>;
69 *pReaders << new ReaderHook<rMP3Audio, 15>;
70 *pReaders << new ReaderHook<rAIFFAudio, 10>;
71 *pReaders << new ReaderHook<rWAVAudio, 10>;
72 *pReaders << new ReaderHook<rRAWAudio, -100>;
74 *pReaders << new ReaderHook<rCUESession, -100>;
75 *pReaders << new ReaderHook<rNRGSession, -120>;
77 *pWriters << new WriterHook<wSplitISOData, 100>;
78 *pWriters << new WriterHook<wWAVAudio, 15>;
79 *pWriters << new WriterHook<wAIFFAudio, 10>;
80 *pWriters << new WriterHook<wRAWAudioData, -100>;
82 *pWriters << new WriterHook<wCUESession, 100>;
83 return true;
86 void Lib_CleanUp()
88 #if (0)
89 for (int i=0; i<pReaders->Count(); i++)
90 delete (*pReaders)[i];
91 for (int i=0; i<pWriters->Count(); i++)
92 delete (*pWriters)[i];
93 #endif
94 delete pReaders;
95 delete pWriters;
97 LibrarySpool::Exit();
98 __cleanup();
101 bool Lib_Acquire()
103 return true;
106 void Lib_Release()
110 int main()
112 request("Information", "This module is not executable\nIt is a part of FryingPan Package", "Ok", 0);
113 return -1;
116 bool dtlRegister(MinList *pList)
118 ASSERT(pList != 0);
119 EList *eList = new EList(pList);
121 for (int i=0; i<pReaders->Count(); i++)
123 eList->AddFeatured((*pReaders)[i], (*pReaders)[i]->getName(), (*pReaders)[i]->getPriority());
126 for (int i=0; i<pWriters->Count(); i++)
128 eList->AddFeatured((*pWriters)[i], (*pWriters)[i]->getName(), (*pWriters)[i]->getPriority());
131 delete eList;
132 return true;
135 void dtlUnregister(MinList *pList)
137 ASSERT(pList != 0);
138 EList *eList = new EList(pList);
140 for (int i=0; i<pReaders->Count(); i++)
142 eList->Rem((*pReaders)[i]);
145 for (int i=0; i<pWriters->Count(); i++)
147 eList->Rem((*pWriters)[i]);
150 delete eList;
153 // vim: ts=3 et