root/trunk/libffado/src/bebob/terratec/terratec_cmd.h

Revision 618, 4.0 kB (checked in by ppalmers, 13 years ago)

move serialization routines to libutil such that they can be used for non-AVC stuff too (fireworks EFC)

Line 
1 /*
2  * Copyright (C) 2005-2007 by Pieter Palmers
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License version 2.1, as published by the Free Software Foundation;
12  *
13  * This library 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 GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
22  */
23
24 #ifndef TERRATECVENDORDEPENDENT_H
25 #define TERRATECVENDORDEPENDENT_H
26
27 #include "libavc/general/avc_generic.h"
28 #include "libutil/cmd_serialize.h"
29 #include "libavc/general/avc_vendor_dependent_cmd.h"
30
31 #include <libavc1394/avc1394.h>
32
33 namespace BeBoB {
34 namespace Terratec {
35
36 class TerratecVendorDependentCmd: public AVC::VendorDependentCmd
37 {
38 public:
39     TerratecVendorDependentCmd(Ieee1394Service& ieee1394service);
40     virtual ~TerratecVendorDependentCmd() {};
41
42     virtual bool serialize( Util::IOSSerialize& se );
43     virtual bool deserialize( Util::IISDeserialize& de );
44
45     virtual const char* getCmdName() const
46     { return "TerratecVendorDependentCmd"; }
47
48 protected:
49     byte_t m_subfunction;
50 };
51
52 class TerratecSyncStateCmd: public TerratecVendorDependentCmd
53 {
54 public:
55     TerratecSyncStateCmd(Ieee1394Service& ieee1394service);
56     virtual ~TerratecSyncStateCmd() {};
57
58     virtual bool serialize( Util::IOSSerialize& se );
59     virtual bool deserialize( Util::IISDeserialize& de );
60
61     virtual const char* getCmdName() const
62     { return "TerratecSyncStateCmd"; }
63
64     byte_t m_syncstate;
65 };
66
67 class TerratecStoreMixerSettingsCmd: public TerratecVendorDependentCmd
68 {
69 public:
70     TerratecStoreMixerSettingsCmd(Ieee1394Service& ieee1394service);
71     virtual ~TerratecStoreMixerSettingsCmd() {};
72
73     virtual bool serialize( Util::IOSSerialize& se );
74     virtual bool deserialize( Util::IISDeserialize& de );
75
76     virtual const char* getCmdName() const
77     { return "TerratecStoreMixerSettingsCmd"; }
78 };
79
80 class TerratecSetMidiRemoteChannelCmd: public TerratecVendorDependentCmd
81 {
82 public:
83     TerratecSetMidiRemoteChannelCmd(Ieee1394Service& ieee1394service);
84     virtual ~TerratecSetMidiRemoteChannelCmd() {};
85
86     virtual bool serialize( Util::IOSSerialize& se );
87     virtual bool deserialize( Util::IISDeserialize& de );
88
89     virtual const char* getCmdName() const
90     { return "TerratecSetMidiRemoteChannelCmd"; }
91
92     byte_t m_midichannel;
93 };
94
95 class TerratecSetMidiControlCmd: public TerratecVendorDependentCmd
96 {
97 public:
98     TerratecSetMidiControlCmd(Ieee1394Service& ieee1394service);
99     virtual ~TerratecSetMidiControlCmd() {};
100
101     virtual bool serialize( Util::IOSSerialize& se );
102     virtual bool deserialize( Util::IISDeserialize& de );
103
104     virtual const char* getCmdName() const
105     { return "TerratecSetMidiControlCmd"; }
106
107     byte_t m_mixercontrol;
108     byte_t m_midicontroller;
109 };
110
111 class TerratecSetDefaultRoutingCmd: public TerratecVendorDependentCmd
112 {
113 public:
114     TerratecSetDefaultRoutingCmd(Ieee1394Service& ieee1394service);
115     virtual ~TerratecSetDefaultRoutingCmd() {};
116
117     virtual bool serialize( Util::IOSSerialize& se );
118     virtual bool deserialize( Util::IISDeserialize& de );
119
120     virtual const char* getCmdName() const
121     { return "TerratecSetDefaultRoutingCmd"; }
122
123     byte_t m_output;
124     byte_t m_source;
125 };
126
127 class TerratecDeviceIdCmd: public TerratecVendorDependentCmd
128 {
129 public:
130     TerratecDeviceIdCmd(Ieee1394Service& ieee1394service);
131     virtual ~TerratecDeviceIdCmd() {};
132
133     virtual bool serialize( Util::IOSSerialize& se );
134     virtual bool deserialize( Util::IISDeserialize& de );
135
136     virtual const char* getCmdName() const
137     { return "TerratecDeviceIdCmd"; }
138
139     byte_t m_deviceid;
140 };
141
142 }
143 }
144
145 #endif // TERRATECVENDORDEPENDENT_H
Note: See TracBrowser for help on using the browser.