This file is indexed.

/usr/share/idl/thunderbird/nsIDOMCameraManager.idl is in thunderbird-dev 1:24.4.0+build1-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
#include "domstubs.idl"

#include "nsIDOMMediaStream.idl"
#include "nsIDOMDOMRequest.idl"


interface nsIDOMBlob;
interface nsIDOMDeviceStorage;

/* Used to set the dimensions of a captured picture,
   a preview stream, a video capture stream, etc. */
dictionary CameraSize {
    unsigned long width;
    unsigned long height;
};

/* Camera regions are used to set focus and metering areas;
   the coordinates are referenced to the sensor:
     (-1000, -1000) is the top left corner
     (1000, 1000) is the bottom left corner
   The weight of the region can range from 0 to 1000. */
dictionary CameraRegion {
    long top;
    long left;
    long bottom;
    long right;
    unsigned long weight;
};

/* The position information to record in the image header.
   'NaN' indicates the information is not available. */
dictionary CameraPosition {
    double latitude;
    double longitude;
    double altitude;
    double timestamp;
};

[scriptable, uuid(177472c9-f83d-48b5-8782-03b43b27f25d)]
interface nsICameraCapabilities : nsISupports
{
    /* an array of objects with 'height' and 'width' properties
       supported for the preview stream */
    [implicit_jscontext]
    readonly attribute jsval        previewSizes;

    /* an array of objects with 'height' and 'width' properties
       supported for picture taking */
    [implicit_jscontext]
    readonly attribute jsval        pictureSizes;

    /* an array of strings, e.g. [ "jpeg", "rgb565" ] */
    [implicit_jscontext]
    readonly attribute jsval        fileFormats;

    /* an array of strings, e.g. [ "auto", "fluorescent", etc. ] */
    [implicit_jscontext]
    readonly attribute jsval        whiteBalanceModes;

    /* an array of strings, e.g. [ "auto", "night", "beach", etc. ] */
    [implicit_jscontext]
    readonly attribute jsval        sceneModes;

    /* an array of strings, e.g. [ "normal", "sepia", "mono", etc. ] */
    [implicit_jscontext]
    readonly attribute jsval        effects;

    /* an array of strings, e.g. [ "auto", "off", "on", etc. ] */
    [implicit_jscontext]
    readonly attribute jsval        flashModes;

    /* an array of strings, e.g. [ "auto", "fixed", "macro", etc. ] */
    [implicit_jscontext]
    readonly attribute jsval        focusModes;

    /* the maximum number of focus areas supported by the camera */
    [implicit_jscontext]
    readonly attribute long         maxFocusAreas;

    /* the minimum supported exposure compensation value */
    [implicit_jscontext]
    readonly attribute double       minExposureCompensation;

    /* the maximum supported exposure compensation value */
    [implicit_jscontext]
    readonly attribute double       maxExposureCompensation;

    /* exposure compensation minimum step-size */
    [implicit_jscontext]
    readonly attribute double       stepExposureCompensation;

    /* the maximum number of metering areas supported by the camera */
    [implicit_jscontext]
    readonly attribute long         maxMeteringAreas;

    /* an array of doubles, e.g. [ 1.0, 1.2, 1.5, 2.0, 3.0, etc. ],
       or null if zooming is not supported */
    [implicit_jscontext]
    readonly attribute jsval        zoomRatios;

    /* an array of objects with 'height' and 'width' properties
       supported for video recording */
    [implicit_jscontext]
    readonly attribute jsval        videoSizes;

    /* an object with attributes for each of the supported recorder
       profiles, e.g. recorderProfiles.cif, recorderProfiles.qvga,
       etc. */
    [implicit_jscontext]
    readonly attribute jsval        recorderProfiles;
};

/* These properties affect the video recording preview, e.g.
      {
         profile: "1080p",
         rotation: 0
      }

   'profile' is one of the profiles returned by
   nsICameraCapabilities.recorderProfiles'; if this profile is missing,
   an arbitrary profile will be chosen.

   'rotation' is the degrees clockwise to rotate the preview; if
   this option is not supported, it will be ignored; if this option
   is missing, the default is 0.
*/
dictionary CameraRecorderOptions
{
    DOMString profile;
    long      rotation;
};

/* These properties affect the actual video recording, e.g.
      {
         rotation: 0,
         maxFileSizeBytes: 1024 * 1024,
         maxVideoLengthMs: 0
      }

   'rotation' is the degrees clockwise to rotate the recorded video; if
   this options is not supported, it will be ignored; if this option is
   missing, the default is 0.

   'maxFileSizeBytes' is the maximum size in bytes to which the recorded
   video file will be allowed to grow.

   'maxVideoLengthMs' is the maximum length in milliseconds to which the
   recorded video will be allowed to grow.

   if either 'maxFileSizeBytes' or 'maxVideoLengthMs' is missing, zero,
   or negative, that limit will be disabled.
*/
dictionary CameraStartRecordingOptions
{
    long      rotation;
    long long maxFileSizeBytes;
    long long maxVideoLengthMs;
};

[scriptable, function, uuid(0444a687-4bc9-462c-8246-5423f0fe46a4)]
interface nsICameraPreviewStreamCallback : nsISupports
{
    void handleEvent(in nsIDOMMediaStream stream);
};

[scriptable, function, uuid(6baa4ac7-9c25-4c48-9bb0-5193b38b9b0a)]
interface nsICameraAutoFocusCallback : nsISupports
{
    void handleEvent(in boolean success);
};

[scriptable, function, uuid(17af779e-cb6f-4ca5-890c-06468ff82e4f)]
interface nsICameraTakePictureCallback : nsISupports
{
    void handleEvent(in nsIDOMBlob picture);
};

[scriptable, function, uuid(89a762f8-581b-410a-ad86-e2bd2113ad82)]
interface nsICameraStartRecordingCallback : nsISupports
{
    void handleEvent();
};

[scriptable, function, uuid(fb80db71-e315-42f0-9ea9-dd3dd312ed70)]
interface nsICameraShutterCallback : nsISupports
{
    void handleEvent();
};

[scriptable, function, uuid(0ef0f01e-ce74-4741-9bba-54376adfb7a2)]
interface nsICameraClosedCallback : nsISupports
{
    void handleEvent();
};

[scriptable, function, uuid(550d675a-257d-4713-8b3d-0da53eba68fc)]
interface nsICameraRecorderStateChange : nsISupports
{
    void handleStateChange(in DOMString newState);
};

[scriptable, function, uuid(f84d607b-554c-413d-8810-cf848642765a)]
interface nsICameraReleaseCallback : nsISupports
{
    void handleEvent();
};

[scriptable, function, uuid(a302c6c9-3776-4d1d-a395-f4105d47c3d3)]
interface nsICameraErrorCallback : nsISupports
{
    void handleEvent(in DOMString error);
};

/*
    attributes here affect the preview, any pictures taken, and/or
    any video recorded by the camera.
*/
[scriptable, uuid(c8e7418d-8913-4b66-bd9f-562fba627266)]
interface nsICameraControl : nsISupports
{
    readonly attribute nsICameraCapabilities capabilities;

    /* one of the vales chosen from capabilities.effects;
       default is "none" */
    attribute DOMString         effect;

    /* one of the values chosen from capabilities.whiteBalanceModes;
       default is "auto" */
    attribute DOMString         whiteBalanceMode;

    /* one of the valus chosen from capabilities.sceneModes;
       default is "auto" */
    attribute DOMString         sceneMode;

    /* one of the values chosen from capabilities.flashModes;
       default is "auto" */
    attribute DOMString         flashMode;

    /* one of the values chosen from capabilities.focusModes;
       default is "auto", if supported, or "fixed" */
    attribute DOMString         focusMode;

    /* one of the values chosen from capabilities.zoomRatios; other
       values will be rounded to the nearest supported value;
       default is 1.0 */
    attribute double            zoom;

    /* an array of one or more objects that define where the
       camera will perform light metering, each defining the properties:
        {
            top: -1000,
            left: -1000,
            bottom: 1000,
            right: 1000,
            weight: 1000
        }

        'top', 'left', 'bottom', and 'right' all range from -1000 at
        the top-/leftmost of the sensor to 1000 at the bottom-/rightmost
        of the sensor.

        objects missing one or more of these properties will be ignored;
        if the array contains more than capabilities.maxMeteringAreas,
        extra areas will be ignored.

        this attribute can be set to null to allow the camera to determine
        where to perform light metering. */
    [implicit_jscontext]
    attribute jsval             meteringAreas;

    /* an array of one or more objects that define where the camera will
       perform auto-focusing, with the same definition as meteringAreas.

       if the array contains more than capabilities.maxFocusAreas, extra
       areas will be ignored.

       this attribute can be set to null to allow the camera to determine
       where to focus. */
    [implicit_jscontext]
    attribute jsval             focusAreas;

    /* focal length in millimetres */
    readonly attribute double   focalLength;

    /* the distances in metres to where the image subject appears to be
       in focus.  'focusDistanceOptimum' is where the subject will appear
       sharpest; the difference between 'focusDistanceFar' and
       'focusDistanceNear' is the image's depth of field.

       'focusDistanceFar' may be infinity. */
    readonly attribute double   focusDistanceNear;
    readonly attribute double   focusDistanceOptimum;
    readonly attribute double   focusDistanceFar;

    /* 'compensation' is optional, and if missing, will
       set the camera to use automatic exposure compensation.

       acceptable values must range from minExposureCompensation
       to maxExposureCompensation in steps of stepExposureCompensation;
       invalid values will be rounded to the nearest valid value. */
    [implicit_jscontext]
    void setExposureCompensation([optional] in jsval compensation);
    readonly attribute double   exposureCompensation;

    /* the function to call on the camera's shutter event, to trigger
       a shutter sound and/or a visual shutter indicator. */
    attribute nsICameraShutterCallback onShutter;

    /* the function to call when the camera hardware is closed
       by the underlying framework, e.g. when another app makes a more
       recent call to get the camera. */
    attribute nsICameraClosedCallback onClosed;

    /* the function to call when the recorder changes state, either because
       the recording process encountered an error, or because one of the
       recording limits (see CameraStartRecordingOptions) was reached. */
    attribute nsICameraRecorderStateChange onRecorderStateChange;

    /* tell the camera to attempt to focus the image */
    void autoFocus(in nsICameraAutoFocusCallback onSuccess, [optional] in nsICameraErrorCallback onError);

    /* capture an image and return it as a blob to the 'onSuccess' callback;
       if the camera supports it, this may be invoked while the camera is
       already recording video.

       invoking this function will stop the preview stream, which must be
       manually restarted (e.g. by calling .play() on it). */
    [implicit_jscontext]
    void takePicture(in jsval aOptions, in nsICameraTakePictureCallback onSuccess, [optional] in nsICameraErrorCallback onError);

    /* get a media stream to be used as a camera viewfinder in video mode;
       'aOptions' is an CameraRecorderOptions object. */
    [implicit_jscontext]
    void getPreviewStreamVideoMode(in jsval aOptions, in nsICameraPreviewStreamCallback onSuccess, [optional] in nsICameraErrorCallback onError);

    /* start recording video; 'aOptions' is a
       CameraStartRecordingOptions object. */
    [implicit_jscontext]
    void startRecording(in jsval aOptions, in nsIDOMDeviceStorage storageArea, in DOMString filename, in nsICameraStartRecordingCallback onSuccess, [optional] in nsICameraErrorCallback onError);

    /* stop precording video. */
    void stopRecording();

    /* get a media stream to be used as a camera viewfinder; the options
       define the desired frame size of the preview, chosen from
       capabilities.previewSizes, e.g.:
        {
            height: 640,
            width:  480,
         }
    */
    [implicit_jscontext]
    void getPreviewStream(in jsval aOptions, in nsICameraPreviewStreamCallback onSuccess, [optional] in nsICameraErrorCallback onError);

    /* call in or after the takePicture() onSuccess callback to
       resume the camera preview stream. */
    void resumePreview();

    /* release the camera so that other applications can use it; you should
       probably call this whenever the camera is not longer in the foreground
       (depending on your usage model).

       the callbacks are optional, unless you really need to know when
       the hardware is ultimately released.

       once this is called, the camera control object is to be considered
       defunct; a new instance will need to be created to access the camera. */
    [binaryname(ReleaseHardware)] void release([optional] in nsICameraReleaseCallback onSuccess, [optional] in nsICameraErrorCallback onError);
};

[scriptable, function, uuid(a267afbc-d91c-413a-8de5-0b94aecffa3e)]
interface nsICameraGetCameraCallback : nsISupports
{
    void handleEvent(in nsICameraControl camera);
};