Paperd.Ink Library 0.0.5
Library for interacting with Paperd.Ink devices.
Loading...
Searching...
No Matches
TodoTaigaJsonListener Class Reference

#include <taiga_parser.h>

Inheritance diagram for TodoTaigaJsonListener:

Public Member Functions

virtual void whitespace (char c)
 
virtual void startDocument ()
 
virtual void key (String key)
 
virtual void value (String value)
 
virtual void endArray ()
 
virtual void endObject ()
 
virtual void endDocument ()
 
virtual void startArray ()
 
virtual void startObject ()
 

Detailed Description

Definition at line 6 of file taiga_parser.h.

Member Function Documentation

◆ endArray()

void TodoTaigaJsonListener::endArray ( )
virtual

Definition at line 60 of file taiga_parser.cpp.

61{
62}

◆ endDocument()

void TodoTaigaJsonListener::endDocument ( )
virtual

Definition at line 68 of file taiga_parser.cpp.

69{
70}

◆ endObject()

void TodoTaigaJsonListener::endObject ( )
virtual

Definition at line 64 of file taiga_parser.cpp.

65{
66}

◆ key()

void TodoTaigaJsonListener::key ( String key)
virtual

Definition at line 18 of file taiga_parser.cpp.

19{
20 if (key.equals("auth_token"))
21 key_state = FOUND_TOKEN;
22
23 if (key_state == W_ID && key.equals("id")) {
24 DEBUG.println("Got id");
25 key_state = FOUND_ID;
26 }
27
29 if (id_found && key.equals("subject"))
30 key_state = FOUND_TASK;
31 }
32}
virtual void key(String key)
#define DEBUG
@ FOUND_ID
@ FOUND_TASK
@ FOUND_TOKEN
@ W_ID
PaperdinkUITodoListTaigaClass Paperdink_TodoListTaiga
#define TODO_LIST_MAX_TASKS
Definition todo_list.h:8

◆ startArray()

void TodoTaigaJsonListener::startArray ( )
virtual

Definition at line 72 of file taiga_parser.cpp.

73{
74}

◆ startDocument()

void TodoTaigaJsonListener::startDocument ( )
virtual

Definition at line 13 of file taiga_parser.cpp.

◆ startObject()

void TodoTaigaJsonListener::startObject ( )
virtual

Definition at line 76 of file taiga_parser.cpp.

77{
78}

◆ value()

void TodoTaigaJsonListener::value ( String value)
virtual

Definition at line 34 of file taiga_parser.cpp.

35{
36 if (key_state == FOUND_TOKEN) {
39 key_state = W_ID;
40 }
41
42 if (!id_found && key_state == FOUND_ID) {
43 id_found = true;
44 DEBUG.println(value);
46 key_state = NOT_FOUND;
47 }
48
49 if (id_found && key_state == FOUND_TASK) {
50 // TODO: Figure out a way to directly print to display
51 // Limit to TODO_LIST_MAX_TODO_STR_LENGTH to display properly on screen
52 // DEBUG.printf("TASK: %s\r\n", value.c_str());
56 key_state = NOT_FOUND;
57 }
58}
char tasks[TODO_LIST_MAX_TASKS][TODO_LIST_MAX_TODO_STR_LENGTH+1]
Definition todo_list.h:14
virtual void value(String value)
@ NOT_FOUND
#define TODO_LIST_MAX_TODO_STR_LENGTH
Definition todo_list.h:9

◆ whitespace()

void TodoTaigaJsonListener::whitespace ( char c)
virtual

Definition at line 9 of file taiga_parser.cpp.

10{
11}

The documentation for this class was generated from the following files: