Debian Codegraph @

components/extension/protocols/writer.h

raw symbols SCIP
1 /* fre:ac - free audio converter
2 * Copyright (C) 2001-2023 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
12
13 #ifndef H_PROTOCOLS_WRITER
14 #define H_PROTOCOLS_WRITER
15
16 #include <smooth.h>
17 #include <boca.h>
18
19 using namespace smooth;
20 using namespace smooth::IO;
21
22 namespace BoCA
23 {
24 class ProtocolData
25 {
26 public:
27 ProtocolData(Int = -1, const Array<Track> * = NIL);
28 ~ProtocolData();
29
30 Bool preliminary;
31 Int conversionID;
32
33 String fileHeader;
34
35 String fileName;
36 OutStream *fileStream;
37
38 String copyName;
39 OutStream *copyStream;
40
41 const Array<Track> *trackList;
42 String singleFileName;
43 };
44
45 class ProtocolWriter
46 {
47 private:
48 static String GetDisplayName(const Protocol *);
49
50 static String FormatHeader(const Protocol *);
51 static Void SaveProtocol(const Protocol *, OutStream *);
52
53 static Array<ProtocolData> protocolData;
54 static Int instanceCount;
55
56 Void OutputMessage(OutStream *, const String &);
57 public:
58 static Void SaveProtocol(const Protocol *, const String &);
59
60 ProtocolWriter();
61 ~ProtocolWriter();
62
63 String GetProtocolFileName(const Protocol *);
64 String GetAdditionalCopyName(const Protocol *);
65 slots:
66 Void OnUpdateProtocolList();
67 Void OnUpdateProtocol(const String &);
68
69 Void OnStartConversion(Int, const Array<Track> &);
70 Void OnSingleFileConversion(Int, const String &);
71 Void OnFinishConversion(Int);
72 };
73 };
74
75 #endif