~ubuntu-branches/ubuntu/quantal/colord/quantal-proposed

« back to all changes in this revision

Viewing changes to src/sensors/cd-sensor-colorhug-private.c

  • Committer: Package Import Robot
  • Author(s): Christopher James Halse Rogers
  • Date: 2012-03-01 17:33:00 UTC
  • mto: (1.1.4) (2.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20120301173300-q1s2bs8yubnybln8
ImportĀ upstreamĀ versionĀ 0.1.18

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2
2
 *
3
 
 * Copyright (C) 2011 Richard Hughes <richard@hughsie.com>
 
3
 * Copyright (C) 2011-2012 Richard Hughes <richard@hughsie.com>
4
4
 *
5
5
 * Licensed under the GNU General Public License Version 2
6
6
 *
86
86
        case CH_ERROR_NO_CALIBRATION:
87
87
                str = "No calibration";
88
88
                break;
 
89
        case CH_ERROR_DEVICE_DEACTIVATED:
 
90
                str = "Device deactivated";
 
91
                break;
 
92
        case CH_ERROR_INCOMPLETE_REQUEST:
 
93
                str = "Incomplete previous request";
 
94
                break;
89
95
        default:
90
96
                str = "Unknown error, please report";
91
97
                break;
134
140
        case CH_CMD_SET_SERIAL_NUMBER:
135
141
                str = "set-serial-number";
136
142
                break;
 
143
        case CH_CMD_GET_OWNER_NAME:
 
144
                str = "get-owner-name";
 
145
                break;
 
146
        case CH_CMD_SET_OWNER_NAME:
 
147
                str = "set-owner-name";
 
148
                break;
 
149
        case CH_CMD_GET_OWNER_EMAIL:
 
150
                str = "get-owner-name";
 
151
                break;
 
152
        case CH_CMD_SET_OWNER_EMAIL:
 
153
                str = "set-owner-email";
 
154
                break;
137
155
        case CH_CMD_GET_LEDS:
138
156
                str = "get-leds";
139
157
                break;
140
158
        case CH_CMD_SET_LEDS:
141
159
                str = "set-leds";
142
160
                break;
 
161
        case CH_CMD_GET_PCB_ERRATA:
 
162
                str = "get-pcb-errata";
 
163
                break;
 
164
        case CH_CMD_SET_PCB_ERRATA:
 
165
                str = "set-pcb-errata";
 
166
                break;
143
167
        case CH_CMD_GET_DARK_OFFSETS:
144
168
                str = "get-dark-offsets";
145
169
                break;
182
206
        case CH_CMD_SET_CALIBRATION_MAP:
183
207
                str = "set-calibration-map";
184
208
                break;
 
209
        case CH_CMD_GET_HARDWARE_VERSION:
 
210
                str = "get-hardware-version";
 
211
                break;
185
212
        default:
186
213
                str = "unknown-command";
187
214
                break;
213
240
        g_print ("%c[%dm\n", 0x1B, 0);
214
241
}
215
242
 
216
 
/* the default timeout */
217
 
#define CH_DEVICE_USB_TIMEOUT   2000
218
 
 
219
243
typedef struct {
220
244
        GUsbDevice              *device;
221
245
        GCancellable            *cancellable;