![]() |
Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
|
Classes | |
| class | CLIArgumentException |
| class | MetaTypeInfo |
| class | Endpoint |
| class | RequestParameter |
Enumerations | |
| enum | CasePolicy { KEEP , PASCAL , CAMEL , SNAKE , SCREAMING_SNAKE , LOWER , UPPER } |
| enum | ParameterLocation { PATH , QUERY , COOKIE , HEADER , BODY } |
Functions | |
| int | main (string[] args) |
| void | realMain (string[] args) |
| void | writeCMakeFile (string[] headerFiles, string[] implementationFiles) |
| void writeRequestTypesFile | R (File headerFile, File implementationFile, R endpoints) if(is(ElementType!R |
| void | generateFileForEndpoints (ref const Node[] endpointNodes, ref const Node allSchemas, ref scope File headerFile, ref scope File implementationFile, ref scope Appender!(Endpoint[]) endpoints, ref const string categoryName) |
| void | generateFileForSchema (ref const string name, ref const Node scheme, Node allSchemas, ref scope File headerFile, ref scope File implementationFile) |
| MetaTypeInfo | getType (ref const string name, const ref Node node, const ref Node allSchemas) |
| MetaTypeInfo[] | collectTypeInfo (const ref Node properties, const ref Node allSchemas) |
| void | writeObjectHeader (File output, string name, MetaTypeInfo[] properties, string[] userImports) |
| void | writeObjectImplementation (File output, string name, MetaTypeInfo[] properties) |
| void | writeEnumHeader (File output, string name, string[] values, string doc="") |
| void | writeEnumImplementation (File output, string name, string[] values) |
| void | writeHeaderPreamble (File output, immutable string[] fileNamespace, string className, string[] imports=[], string[] userImports=[]) |
| void | writeHeaderPostamble (File output, immutable string[] fileNamespace, string className) |
| void | writeImplementationPreamble (File output, immutable string[] fileNamespace, string folder, string className, string[] imports=[]) |
| void | writeImplementationPostamble (File output, immutable string[] fileNamespace, string className) |
| string | applyCasePolicy (string source, CasePolicy input, CasePolicy output) |
| string | guardName (immutable string[] namespace, string className) |
Variables | |
| dub. | sdl |
| string | CMAKE_INCLUDE_FILE = "GeneratedSources.cmake" |
| string | CMAKE_VAR_PREFIX = "openapi" |
| string | INCLUDE_PREFIX = "JellyfinQt" |
| string | SRC_PREFIX = "" |
| string | MODEL_FOLDER = "dto" |
| string | SUPPORT_FOLDER = "support" |
| string | LOADER_FOLDER = "loader" |
| string | HTTP_LOADER_FOLDER = buildPath("loader", "http") |
| string[string] | compatAliases |
| string[string] | memberAliases |
| CasePolicy | OPENAPI_CASING = CasePolicy.PASCAL |
| CasePolicy | CPP_FILENAME_CASING = CasePolicy.LOWER |
| CasePolicy | CPP_CLASS_CASING = CasePolicy.PASCAL |
| CasePolicy | CPP_CLASS_MEMBER_CASING = CasePolicy.CAMEL |
| string | CPP_CLASS_MEMBER_PREFIX = "m_" |
| CasePolicy | CPP_CLASS_METHOD_CASING = CasePolicy.CAMEL |
| bool | GENERATE_PROPERTIES = true |
| string | outputDirectory = "generated" |
| string | USAGE = "USAGE: %s <openapi scheme>" |
| unittest | |
| enum CasePolicy |
| enum ParameterLocation |
| string applyCasePolicy | ( | string | source, |
| CasePolicy | input, | ||
| CasePolicy | output ) |
Transforsm the given string from the input casing system to the ouptut casing system.
Params: source = The string to transform
| MetaTypeInfo[] collectTypeInfo | ( | const ref Node | properties, |
| const ref Node | allSchemas ) |
Given a list of JSON schemes, this will generate a list of MetaTypeInfo[]
| void generateFileForEndpoints | ( | ref const Node[] | endpointNodes, |
| ref const Node | allSchemas, | ||
| ref scope File | headerFile, | ||
| ref scope File | implementationFile, | ||
| ref scope Appender!(Endpoint[]) | endpoints, | ||
| ref const string | categoryName ) |
Generates files for endpoints in a category Params: endpointNode = YAML node representing the endpoint. allSchemas = YAML node containing the schemas that values in the endpointNOde could reference. headerFile = File to write the header (.h) file to implementationFile = File to write the implementation (.cpp) file to. endpoints = Appender to add any requestParameters encountered to. categoryName = name of the category
| void generateFileForSchema | ( | ref const string | name, |
| ref const Node | scheme, | ||
| Node | allSchemas, | ||
| ref scope File | headerFile, | ||
| ref scope File | implementationFile ) |
Generates a file containing a class generated based on the given JSON Schema.
| MetaTypeInfo getType | ( | ref const string | name, |
| const ref Node | node, | ||
| const ref Node | allSchemas ) |
Create a MetaTypeInfo object based on a JSON schema
In the future, this implementation should use some form of configuration file which contains data about the built-in types, since hard-coding doesn't seem like a good idea.
Params: name = The name of this object node = The node containing the JSON Schema of this object allSchemas = The node containing the a map of names to JSON Schemas, which the node parameter could refrence.
| string guardName | ( | immutable string[] | namespace, |
| string | className ) |
Generates a guard name based on a namespace and class name.
Params: namespace = Array of namespaces this class is in. className = The name of this class (or enum or whatever).
| int main | ( | string[] | args | ) |
| void writeRequestTypesFile R | ( | File | headerFile, |
| File | implementationFile, | ||
| R | endpoints ) |
Writes the file with all the types that are just used for making requests to the API endpoint
Params: headerFile = The file to write the header to implementationFile = The file to write the implememntation to endpoints = A list of endpoints to extract request type information from.
| void realMain | ( | string[] | args | ) |
| void writeCMakeFile | ( | string[] | headerFiles, |
| string[] | implementationFiles ) |
Writes a CMake file that includes the specified files.
| void writeEnumHeader | ( | File | output, |
| string | name, | ||
| string[] | values, | ||
| string | doc = "" ) |
| void writeEnumImplementation | ( | File | output, |
| string | name, | ||
| string[] | values ) |
| void writeHeaderPostamble | ( | File | output, |
| immutable string[] | fileNamespace, | ||
| string | className ) |
| void writeHeaderPreamble | ( | File | output, |
| immutable string[] | fileNamespace, | ||
| string | className, | ||
| string[] | imports = [], | ||
| string[] | userImports = [] ) |
| void writeImplementationPostamble | ( | File | output, |
| immutable string[] | fileNamespace, | ||
| string | className ) |
| void writeImplementationPreamble | ( | File | output, |
| immutable string[] | fileNamespace, | ||
| string | folder, | ||
| string | className, | ||
| string[] | imports = [] ) |
| void writeObjectHeader | ( | File | output, |
| string | name, | ||
| MetaTypeInfo[] | properties, | ||
| string[] | userImports ) |
| void writeObjectImplementation | ( | File | output, |
| string | name, | ||
| MetaTypeInfo[] | properties ) |
| string CMAKE_INCLUDE_FILE = "GeneratedSources.cmake" |
| string CMAKE_VAR_PREFIX = "openapi" |
| string [string] compatAliases |
| CasePolicy CPP_CLASS_CASING = CasePolicy.PASCAL |
| CasePolicy CPP_CLASS_MEMBER_CASING = CasePolicy.CAMEL |
| string CPP_CLASS_MEMBER_PREFIX = "m_" |
| CasePolicy CPP_CLASS_METHOD_CASING = CasePolicy.CAMEL |
| CasePolicy CPP_FILENAME_CASING = CasePolicy.LOWER |
| bool GENERATE_PROPERTIES = true |
| string HTTP_LOADER_FOLDER = buildPath("loader", "http") |
| string INCLUDE_PREFIX = "JellyfinQt" |
| string LOADER_FOLDER = "loader" |
| string [string] memberAliases |
| string MODEL_FOLDER = "dto" |
| CasePolicy OPENAPI_CASING = CasePolicy.PASCAL |
| string outputDirectory = "generated" |
| dub. sdl |
| string SRC_PREFIX = "" |
| string SUPPORT_FOLDER = "support" |
| unittest |
| string USAGE = "USAGE: %s <openapi scheme>" |