root/trunk/libffado/src/bebob/focusrite/focusrite_cmd.cpp

Revision 742, 2.2 kB (checked in by ppalmers, 13 years ago)

- Remove some obsolete support files and dirs

- Clean up the license statements in the source files. Everything is

GPL version 3 now.

- Add license and copyright notices to scons scripts

- Clean up some other text files

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 program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #include "focusrite_cmd.h"
25
26 #include <netinet/in.h>
27 #include <iostream>
28
29 using namespace std;
30 using namespace AVC;
31
32 namespace BeBoB {
33 namespace Focusrite {
34
35 FocusriteVendorDependentCmd::FocusriteVendorDependentCmd(Ieee1394Service& ieee1394service)
36     : VendorDependentCmd( ieee1394service )
37     , m_arg1 ( 0x03 )
38     , m_arg2 ( 0x01 )
39     , m_id ( 0x00000000 )
40     , m_value ( 0x00000000 )
41 {
42     m_companyId=0x00130e;
43 }
44
45 FocusriteVendorDependentCmd::~FocusriteVendorDependentCmd()
46 {
47 }
48
49 bool
50 FocusriteVendorDependentCmd::serialize( Util::IOSSerialize& se )
51 {
52     bool result=true;
53     result &= VendorDependentCmd::serialize( se );
54     result &= se.write(m_arg1,"FocusriteVendorDependentCmd arg1");
55     result &= se.write(m_arg2,"FocusriteVendorDependentCmd arg2");
56     // FIXME: this is not consistent, we should not have to care about ntohl here
57     result &= se.write(htonl(m_id),"FocusriteVendorDependentCmd ID");
58     result &= se.write(htonl(m_value),"FocusriteVendorDependentCmd value");
59    
60     return result;
61 }
62
63 bool
64 FocusriteVendorDependentCmd::deserialize( Util::IISDeserialize& de )
65 {
66     bool result=true;
67     result &= VendorDependentCmd::deserialize( de );
68     result &= de.read(&m_arg1);
69     result &= de.read(&m_arg2);
70     result &= de.read(&m_id);
71     m_id=ntohl(m_id);
72     result &= de.read(&m_value);
73     m_value=ntohl(m_value);
74
75     return result;
76 }
77
78 }
79 }
80
Note: See TracBrowser for help on using the browser.