mirror of
https://github.com/MeshEnvy/lobbs.git
synced 2026-10-31 02:11:59 +01:00
25 lines
807 B
C++
25 lines
807 B
C++
#pragma once
|
|
#if !MESHTASTIC_EXCLUDE_LOBBS
|
|
|
|
#include "LoBBSCommandCtx.h"
|
|
#include <loscalar/LoScalar.h>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
struct LoBBSResponse {
|
|
bool ok = true;
|
|
std::string error;
|
|
std::vector<LoScalar> records;
|
|
};
|
|
|
|
void lobbsResponseSetError(LoBBSResponse &resp, const char *message);
|
|
/** Push a `title` (+ optional `description`) record. Empty strings leave the field unset. */
|
|
void lobbsRecordPush(std::vector<LoScalar> &list, const char *title, const char *description = nullptr);
|
|
void lobbsResponseAppendRecord(LoBBSResponse &resp, const LoScalar &record);
|
|
|
|
void lobbsCommandReplyResponse(LoBBSCommandCtx &ctx, const LoBBSResponse &resp);
|
|
void lobbsCommandReplyError(LoBBSCommandCtx &ctx, const char *message);
|
|
void lobbsReplySendCachedPage(LoBBSCommandCtx &ctx);
|
|
|
|
#endif
|