pianod2
multisource multiuser scriptable networked music player
Namespaces | Functions | Variables
responsejson.cpp File Reference

Send response messages over the JSON protocol. More...

#include <config.h>
#include <cstdarg>
#include <cassert>
#include <sstream>
#include <iomanip>
#include <football/fb_public.h>
#include <parsnip/parsnip.h>
#include "logging.h"
#include "fundamentals.h"
#include "musictypes.h"
#include "musickeys.h"
#include "response.h"
#include "connection.h"
#include "user.h"
#include "mediaunit.h"
Include dependency graph for responsejson.cpp:

Namespaces

 JSON
 
 JSON::Key
 

Functions

const char * JSONFieldName (RESPONSE_CODE code)
 Retrieve the JSON text for a response. More...
 

Variables

static const char * JSON::Key::Events = "events"
 
static const char * JSON::Key::State = "state"
 
static const char * JSON::Key::CurrentSong = "currentSong"
 
static const char * JSON::Key::Errors = "errors"
 
static const char * JSON::Key::Successes = "successes"
 
static const char * JSON::Key::Diagnostics = "failures"
 
static const char * JSON::Key::StatusText = "status"
 
static const char * JSON::Key::StatusNumeric = "code"
 
static const char * JSON::Key::Details = "details"
 
static const char * JSON::Key::Data = "data"
 
static const char * JSON::Key::RelatedId = "id"
 
static const char * JSON::Key::RelatedName = "name"
 
static const char * JSON::Key::PlaybackState = "playbackState"
 
static const char * JSON::Key::QueueMode = "queueMode"
 

Detailed Description

Send response messages over the JSON protocol.

Function Documentation

◆ JSONFieldName()

const char* JSONFieldName ( RESPONSE_CODE  code)

Retrieve the JSON text for a response.

Parameters
codeThe number of the response. For status or error text use ResponseText.
Returns
The name of the field or related text.
Here is the call graph for this function:
Here is the caller graph for this function: