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.
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"
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
);
47 LIB_FT_Function(dtlRegister
)
48 LIB_FT_Function(dtlUnregister
)
51 VectorT
< IRegHook
* > *pReaders
;
52 VectorT
< IRegHook
* > *pWriters
;
57 uint32 StartupFlags
= 0;
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>;
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
];
112 request("Information", "This module is not executable\nIt is a part of FryingPan Package", "Ok", 0);
116 bool dtlRegister(MinList
*pList
)
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());
135 void dtlUnregister(MinList
*pList
)
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
]);