1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - SSP - include
3   File:     exifdec.h
4 
5   Copyright 2007-2008 Nintendo. All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law. They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Date:: 2009-01-09#$
14   $Rev: 9810 $
15   $Author: kitase_hirotake $
16  *---------------------------------------------------------------------------*/
17 
18 #ifndef TWL_SSP_EXIFDEC_H_
19 #define TWL_SSP_EXIFDEC_H_
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #include <twl/types.h>
26 
27 /*---------------------------------------------------------------------------*
28   Name:         SSP_GetJpegDecoderDateTime
29 
30   Description:  Gets the date and time information as they exist when a JPEG is decoded.
31 
32   Arguments:    buffer: Buffer in which to put the date and time information
33 
34   Returns:      Size
35  *---------------------------------------------------------------------------*/
36 u16 SSP_GetJpegDecoderDateTime(u8* buffer);
37 
38 /*---------------------------------------------------------------------------*
39   Name:         SSP_GetJpegDecoderSoftware
40 
41   Description:  Gets the lower 4 bytes of the title ID registered with the JPEG Software tag.
42 
43   Arguments:    buffer: Buffer in which to put the Software information
44 
45   Returns:      Size
46  *---------------------------------------------------------------------------*/
47 u16 SSP_GetJpegDecoderSoftware(char* buffer);
48 
49 /*---------------------------------------------------------------------------*
50   Name:         SSP_GetJpegDecoderMakerNoteAddrEx
51 
52   Description:  Gets the starting address of a MakerNote when decoding a JPEG.
53 
54   Arguments:    tag: The type of data to get
55 
56   Returns:      Address
57  *---------------------------------------------------------------------------*/
58 u8* SSP_GetJpegDecoderMakerNoteAddrEx(SSPJpegMakernote tag);
59 
60 /*---------------------------------------------------------------------------*
61   Name:         SSP_GetJpegDecoderMakerNoteSizeEx
62 
63   Description:  Gets the size of a MakerNote when decoding a JPEG.
64 
65   Arguments:    tag: The type of data to get
66 
67   Returns:      Size
68  *---------------------------------------------------------------------------*/
69 u16 SSP_GetJpegDecoderMakerNoteSizeEx(SSPJpegMakernote tag);
70 
71 /*---------------------------------------------------------------------------*
72   Name:         SSP_GetJpegDecoderMakerNoteAddr
73 
74   Description:  Gets the starting address of the MakerNote's DSi camera data when decoding a JPEG.
75 
76   Arguments:    None.
77 
78   Returns:      Address
79  *---------------------------------------------------------------------------*/
SSP_GetJpegDecoderMakerNoteAddr(void)80 static inline u8* SSP_GetJpegDecoderMakerNoteAddr(void)
81 {
82     return SSP_GetJpegDecoderMakerNoteAddrEx(SSP_MAKERNOTE_PHOTO);
83 }
84 
85 /*---------------------------------------------------------------------------*
86   Name:         SSP_GetJpegDecoderMakerNoteSize
87 
88   Description:  Gets the size of the MakerNote's DSi camera data when decoding a JPEG.
89 
90   Arguments:    None.
91 
92   Returns:      Size
93  *---------------------------------------------------------------------------*/
SSP_GetJpegDecoderMakerNoteSize(void)94 static inline u16 SSP_GetJpegDecoderMakerNoteSize(void)
95 {
96     return SSP_GetJpegDecoderMakerNoteSizeEx(SSP_MAKERNOTE_PHOTO);
97 }
98 
99 /*---------------------------------------------------------------------------*
100   Name:         SSP_SetJpegDecoderSignMode
101 
102   Description:  Enables or disables functionality that checks a signature when decoding a JPEG.
103 
104   Arguments:    If TRUE, it will be turned on. If FALSE, it will be turned off.
105 
106   Returns:      Returns the previously set mode.
107  *---------------------------------------------------------------------------*/
108 BOOL SSP_SetJpegDecoderSignMode(BOOL mode);
109 
110 s32 SSP_ExifDecode(u8* src, u32 src_size, int* cur, int option);
111 
112 #ifdef __cplusplus
113 } /* extern "C" */
114 #endif
115 
116 /* TWL_SSP_EXIFDEC_H_ */
117 #endif
118