~ubuntu-branches/ubuntu/quantal/jackd2/quantal

« back to all changes in this revision

Viewing changes to .pc/0000_sync_upstream_VCS.patch/common/driver_interface.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler, Adrian Knoth, Reinhard Tartler, Jonas Smedegaard
  • Date: 2010-06-19 18:54:29 UTC
  • Revision ID: james.westby@ubuntu.com-20100619185429-zhbhh0mqvukgzx0l
Tags: 1.9.5~dfsg-15
[ Adrian Knoth ]
* Also provide the shlibs file for libjack-jackd2-0
* Fix FTBFS on sparc64 (Closes: #586257)

[ Reinhard Tartler ]
* jackd must not be a virtual package, use 'jack-daemon' for that
* add breaks/replaces on old libjack0
* change shlibsfile to prefer jackd2's libjack
* use conflicts instead of breaks. libjack-jackd2-0 has file conflicts
  with libjack0 and will keep it

[ Jonas Smedegaard ]
* Update control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (C) 2003 Bob Ham <rah@bash.sh>
 
3
  Copyright (C) 2008 Nedko Arnaudov <nedko@arnaudov.name>
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU Lesser General Public License as published by
 
7
  the Free Software Foundation; either version 2.1 of the License, or
 
8
  (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.
 
14
 
 
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
18
 
 
19
*/
 
20
 
 
21
#ifndef __jack_driver_interface_h__
 
22
#define __jack_driver_interface_h__
 
23
 
 
24
#ifdef __cplusplus
 
25
extern "C"
 
26
{
 
27
#endif
 
28
 
 
29
#include <limits.h>
 
30
#include "jslist.h"
 
31
#include "JackCompilerDeps.h"
 
32
#include "JackSystemDeps.h"
 
33
 
 
34
#define JACK_DRIVER_NAME_MAX          15
 
35
#define JACK_DRIVER_PARAM_NAME_MAX    15
 
36
#define JACK_DRIVER_PARAM_STRING_MAX  63
 
37
#define JACK_DRIVER_PARAM_DESC        255
 
38
#define JACK_PATH_MAX                 511
 
39
 
 
40
#define JACK_CONSTRAINT_FLAG_RANGE       ((uint32_t)1) /**< if set, constraint is a range (min-max) */
 
41
#define JACK_CONSTRAINT_FLAG_STRICT      ((uint32_t)2) /**< if set, constraint is strict, i.e. supplying non-matching value will not work */
 
42
#define JACK_CONSTRAINT_FLAG_FAKE_VALUE  ((uint32_t)4) /**< if set, values have no user meaningful meaning */
 
43
 
 
44
    /** Driver parameter types */
 
45
    typedef enum
 
46
    {
 
47
        JackDriverParamInt = 1,
 
48
        JackDriverParamUInt,
 
49
        JackDriverParamChar,
 
50
        JackDriverParamString,
 
51
        JackDriverParamBool
 
52
    } jack_driver_param_type_t;
 
53
 
 
54
    /** Driver parameter value */
 
55
    typedef union
 
56
    {
 
57
        uint32_t ui;
 
58
        int32_t i;
 
59
        char c;
 
60
        char str[JACK_DRIVER_PARAM_STRING_MAX + 1];
 
61
    } jack_driver_param_value_t;
 
62
 
 
63
    typedef struct {
 
64
        jack_driver_param_value_t value;
 
65
        char short_desc[64];               /**< A short (~30 chars) description for the user */
 
66
    } jack_driver_param_value_enum_t;
 
67
 
 
68
    typedef struct {
 
69
        uint32_t flags;         /**< JACK_CONSTRAINT_FLAG_XXX */
 
70
 
 
71
        union {
 
72
            struct {
 
73
                jack_driver_param_value_t min;
 
74
                jack_driver_param_value_t max;
 
75
            } range;            /**< valid when JACK_CONSTRAINT_FLAG_RANGE flag is set */
 
76
 
 
77
            struct {
 
78
                uint32_t count;
 
79
                jack_driver_param_value_enum_t * possible_values_array;
 
80
            } enumeration;      /**< valid when JACK_CONSTRAINT_FLAG_RANGE flag is not set */
 
81
        } constraint;
 
82
    } jack_driver_param_constraint_desc_t;
 
83
 
 
84
    /** A driver parameter descriptor */
 
85
    typedef struct {
 
86
        char name[JACK_DRIVER_NAME_MAX + 1]; /**< The parameter's name */
 
87
        char character;                    /**< The parameter's character (for getopt, etc) */
 
88
        jack_driver_param_type_t type;     /**< The parameter's type */
 
89
        jack_driver_param_value_t value;   /**< The parameter's (default) value */
 
90
        jack_driver_param_constraint_desc_t * constraint; /**< Pointer to parameter constraint descriptor. NULL if there is no constraint */
 
91
        char short_desc[64];               /**< A short (~30 chars) description for the user */
 
92
        char long_desc[1024];              /**< A longer description for the user */
 
93
    }
 
94
    jack_driver_param_desc_t;
 
95
 
 
96
    /** A driver parameter */
 
97
    typedef struct {
 
98
        char character;
 
99
        jack_driver_param_value_t value;
 
100
    }
 
101
    jack_driver_param_t;
 
102
 
 
103
 
 
104
    /** A struct for describing a jack driver */
 
105
    typedef struct {
 
106
        char name[JACK_DRIVER_NAME_MAX + 1];      /**< The driver's canonical name */
 
107
        char desc[JACK_DRIVER_PARAM_DESC + 1];    /**< The driver's extended description */
 
108
        char file[JACK_PATH_MAX + 1];             /**< The filename of the driver's shared object file */
 
109
        uint32_t nparams;                         /**< The number of parameters the driver has */
 
110
        jack_driver_param_desc_t * params;        /**< An array of parameter descriptors */
 
111
    }
 
112
    jack_driver_desc_t;
 
113
 
 
114
 
 
115
SERVER_EXPORT int jack_parse_driver_params (jack_driver_desc_t * desc, int argc, char* argv[], JSList ** param_ptr);
 
116
 
 
117
#ifdef __cplusplus
 
118
}
 
119
#endif
 
120
 
 
121
#endif /* __jack_driver_interface_h__ */
 
122
 
 
123