/**
Copyright 2009 Palm, Inc.  All rights reserved.
 */

if (undefined === window.Camera) {
	window.Camera = {};
}
if (undefined === window.Exif) {
	window.Exif = {};
}

Exif.Group = {
	Image : 0x01,
	Gps   : 0x02
};

Exif.Type = {
	Byte       : 0x01,
	Ascii      : 0x02,
	Short      : 0x03,
	Long       : 0x04,
	Rational   : 0x05,
	Undef      : 0x07,
	Slong      : 0x09,
	SRational  : 0x0a
};

Exif.Tag = {
 	Orientation    : [Exif.Group.Image, Exif.Type.Short,  '0112'],
	DateTime       : [Exif.Group.Image, Exif.Type.Ascii,  '0132'],
	Description    : [Exif.Group.Image, Exif.Type.Ascii,  '010e'],
	CameraMake     : [Exif.Group.Image, Exif.Type.Ascii,  '010f'],
	CameraModel    : [Exif.Group.Image, Exif.Type.Ascii,  '0110'],
	Artist         : [Exif.Group.Image, Exif.Type.Ascii,  '013b'],
	
	GpsVersionID   : [Exif.Group.Gps, Exif.Type.Ascii,    '0000'],
	GpsLatRef      : [Exif.Group.Gps, Exif.Type.Ascii,    '0001'],
	GpsLatitude    : [Exif.Group.Gps, Exif.Type.Rational, '0002'],
	GpsLongRef     : [Exif.Group.Gps, Exif.Type.Ascii,    '0003'],
	GpsLongitude   : [Exif.Group.Gps, Exif.Type.Rational, '0004'],
	GpsAltRef      : [Exif.Group.Gps, Exif.Type.Byte,     '0005'],
	GpsAltitude    : [Exif.Group.Gps, Exif.Type.Rational, '0006'],

	GpsStatus      : [Exif.Group.Gps, Exif.Type.Ascii,    '0009'],
	GpsMeasureMode : [Exif.Group.Gps, Exif.Type.Ascii,    '000a'],
	GpsDOP         : [Exif.Group.Gps, Exif.Type.Rational, '000b']
};

Exif.Orientation = {
	UP: 1,     // Exif 0rT/0cL
	RIGHT: 6,  // Exif 0rR/0cT
	DOWN: 3,   // Exif 0rB/0cR
	LEFT: 8    // Exif 0rR/0cB 
};



/**
 * Event class used in callbacks from the Camera object.
 *
 * These event objects contain the type of event and optional additional
 * data about the event.  For example, the 'saved' event will indicate the
 * name of the file that an image has been saved to.
 */
Camera.Event = {
	NULL: '',
	CONNECT: 'x-palm-connect',
	DISCONNECT: 'x-palm-disconnect',
	ERROR: 'error',
	LOAD: 'load',
	PREVIEW: 'preview',
	RENDER_MODE: 'rendermode',
	SAVE: 'saved',
	START: 'start',
	RECORDING: 'recording',
	
	X_PALM_WATCHDOG: 'x-palm-watchdog-triggered',
	X_PALM_CONNECT: 'x-palm-connect',
	X_PALM_DISCONNECT: 'x-palm-disconnect',

};




Camera.FLASH_OFF = "FLASH_OFF";
Camera.FLASH_ON = "FLASH_ON";
Camera.FLASH_AUTO = "FLASH_AUTO";

Camera.Error = {
	NONE: "CAPTURE_ERROR_NONE",
    SAVE: "CAPTURE_ERROR_SAVE",
    SYSTEM: "CAPTURE_ERROR_SYSTEM" 	
};
	

