Cleanups to the MassStorage Device demos, and the MassStorage Device Class driver.
[pub/USBasp.git] / Demos / Device / Incomplete / Sideshow / Lib / SideshowContent.h
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2009.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
7 */
8
9 /*
10 Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11
12 Permission to use, copy, modify, and distribute this software
13 and its documentation for any purpose and without fee is hereby
14 granted, provided that the above copyright notice appear in all
15 copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
20
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
28 this software.
29 */
30
31 #ifndef _SIDESHOW_CONTENT_H_
32 #define _SIDESHOW_CONTENT_H_
33
34 /* Includes: */
35 #include <avr/io.h>
36 #include <stdbool.h>
37 #include <string.h>
38
39 #include "SideshowCommon.h"
40 #include "SideshowApplications.h"
41
42 /* Enums: */
43 enum SideShow_ContentTypes_t
44 {
45 Content_Menu = 0,
46 Content_Content = 1,
47 Content_MenuItem = 2,
48 Content_Button = 3,
49 Content_Text = 4,
50 Content_EndOfContent = 5
51 };
52
53 enum SideShow_ActionTypes_t
54 {
55 TODO
56 };
57
58 enum SideShow_AlignmentTypes_t
59 {
60 TODO2
61 };
62
63 /* Type Defines: */
64 typedef struct
65 {
66 uint8_t ContentType;
67 uint8_t ContentSize;
68 } SideShow_Content_Header_t;
69
70 typedef struct
71 {
72 SideShow_Content_Header_t Header;
73
74 uint32_t ItemID;
75 uint8_t ActionType;
76 char Title[];
77 } SideShow_Content_Menu_t;
78
79 typedef struct
80 {
81 SideShow_Content_Header_t Header;
82
83 uint32_t ItemID;
84 uint32_t Target;
85 bool IsSelected;
86 char Text[];
87 } SideShow_Content_MenuItem_t;
88
89 typedef struct
90 {
91 SideShow_Content_Header_t Header;
92
93 uint8_t Key;
94 uint32_t Target;
95 } SideShow_Content_Button_t;
96
97 typedef struct
98 {
99 SideShow_Content_Header_t Header;
100
101 uint32_t ItemID;
102 uint32_t AssociatedMenuID;
103 char Title[];
104 } SideShow_Content_Content_t;
105
106 typedef struct
107 {
108 SideShow_Content_Header_t Header;
109
110 char Text[];
111 } SideShow_Content_Text_t;
112
113 /* Defines: */
114 #define XML_START_TAG "<body>"
115 #define XML_END_TAG "</body>"
116
117 /* Function Prototypes: */
118 bool SideShow_AddSimpleContent(SideShow_PacketHeader_t* PacketHeader, SideShow_Application_t* Application);
119
120 #if defined(INCLUDE_FROM_SIDESHOWCONTENT_C)
121 static void SideShow_ProcessXMLContent(void* ContentData, uint32_t ContentSize);
122 #endif
123
124 #endif