refactor(meshtastic): drop exclude guards

This commit is contained in:
Ben Allfree committed 2026-10-06 23:17:00 -07:00
1 parent 5bffe8d259
commit 6fdcc71953
98 files changed
+7 -279

No files matched your search

-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "AppUtil.h"
#include "../LoBBSCommandCtx.h"
#include "../LoBBSCommandRegistry.h"
@@ -150,4 +148,3 @@ LoDbError lobbsQuotaAdd(LoDb &db, const char *table, uint64_t userUuid, uint32_t
return db.upsert(table, userUuid, rec);
}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <lodb/LoDB.h>
#include <loscalar/LoScalar.h>
#include <stddef.h>
@@ -40,4 +38,3 @@ LoDbError lobbsQuotaAdd(LoDb &db, const char *table, uint64_t userUuid, uint32_t
/** IEEE CRC32; pass 0xffffffff before the first byte, invert the return value for the digest. */
uint32_t lobbsCrc32Update(uint32_t crc, const uint8_t *data, size_t len);
uint32_t lobbsCrc32(const uint8_t *data, size_t len);
#endif
-3
View File
@@ -1,9 +1,6 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "Auth.h"
#include "LoBBSStackGuard.h"
AuthApp::AuthApp(LoDb &lodb) : dal_(lodb) {}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "AuthDal.h"
class AuthApp
@@ -13,4 +11,3 @@ class AuthApp
AuthDal dal_;
};
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "AuthCommands.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSHooks.h"
@@ -456,4 +454,3 @@ void lobbsAuthRegisterCommands()
#endif
}
#endif
-3
View File
@@ -1,6 +1,3 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
void lobbsAuthRegisterCommands();
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "AuthDal.h"
#include "AuthRecords.h"
#include "configuration.h"
@@ -359,4 +357,3 @@ bool AuthDal::kickUserByUsername(const char *username)
return true;
}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "../../LoBBSConfig.h"
#include <lodb/LoDB.h>
#include <stdint.h>
@@ -63,4 +61,3 @@ class AuthDal
SessionConfig sessionCfg_ = {LOBBS_SESSION_DEFAULT_MAX, LOBBS_SESSION_DEFAULT_IDLE_SEC};
};
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <cstdint>
/** App field slots for `users` rows (system fields 95..99 are in LoDB.h). */
@@ -11,4 +9,3 @@ inline constexpr uint32_t FIELD_SYSOP = 1;
inline constexpr uint32_t FIELD_PASSWORD = 2;
} // namespace AuthUser
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "../../LoBBSConfig.h"
#if LOBBS_SEED
@@ -26,4 +24,3 @@ void lobbsSeedAuth(LoBBSModule &mod)
}
#endif
#endif
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS && LOBBS_SEED
#if LOBBS_SEED
class LoBBSModule;
void lobbsSeedAuth(LoBBSModule &mod);
-3
View File
@@ -1,9 +1,6 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "Config.h"
#include "LoBBSStackGuard.h"
ConfigApp::ConfigApp(LoDb &lodb) : dal_(lodb) {}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "ConfigDal.h"
#include <lodb/LoDB.h>
@@ -14,4 +12,3 @@ class ConfigApp
ConfigDal dal_;
};
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "ConfigCommands.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSHooks.h"
@@ -197,4 +195,3 @@ void lobbsConfigRegisterCommands()
lobbsAddFilter("help_for_topic", filterConfigHelpForTopic, LOBBS_HOOK_PRIORITY_FEATURE);
}
#endif
-3
View File
@@ -1,9 +1,6 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <cstdint>
void lobbsConfigRegisterCommands();
uint32_t lobbsReplyCacheTtlSec();
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "ConfigCommon.h"
#include "../../LoBBSModule.h"
#include "ConfigDal.h"
@@ -28,4 +26,3 @@ uint32_t lobbsConfigGet(LoBBSCommandCtx &ctx, const char *key)
return ctx.mod->config().dal().effectiveValue(ctx, key);
}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "../../LoBBSCommandCtx.h"
#include "ConfigRecords.h"
#include <lodb/LoDB.h>
@@ -11,4 +9,3 @@ void lobbsConfigPushKey(std::vector<LoScalar> &keys, const char *key, uint32_t d
uint32_t lobbsConfigGet(LoBBSCommandCtx &ctx, const char *key);
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "ConfigDal.h"
#include "../../LoBBSCommandCtx.h"
#include "../../LoBBSHooks.h"
@@ -155,4 +153,3 @@ void ConfigDal::notifyDatabaseOpened(LoBBSModule &mod)
}
}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <lodb/LoDB.h>
#include <loscalar/LoScalar.h>
#include <map>
@@ -37,4 +35,3 @@ class ConfigDal
char lastValidateError_[128] = {0};
};
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <cstdint>
/** Stored override row in table `config`. */
@@ -23,4 +21,3 @@ namespace ConfigValidateField
inline constexpr uint32_t FIELD_VALUE = 0;
} // namespace ConfigValidateField
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "FsCommands.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSHooks.h"
@@ -1102,4 +1100,3 @@ void lobbsFsRegisterCommands()
lobbsAddFilter("help_for_topic", filterFsHelpForTopic, LOBBS_HOOK_PRIORITY_FEATURE);
}
#endif
-3
View File
@@ -1,6 +1,3 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
void lobbsFsRegisterCommands();
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "HelpCommands.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSConfig.h"
@@ -121,4 +119,3 @@ void lobbsHelpRegisterCommands()
lobbsAddFilter("help_for_topic", filterHelpForTopic, LOBBS_HOOK_PRIORITY_HELP);
}
#endif
-3
View File
@@ -1,6 +1,3 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
void lobbsHelpRegisterCommands();
#endif
-3
View File
@@ -1,9 +1,6 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "Mail.h"
#include "LoBBSStackGuard.h"
MailApp::MailApp(LoDb &lodb) : dal_(lodb) {}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "MailDal.h"
class MailApp
@@ -13,4 +11,3 @@ class MailApp
MailDal dal_;
};
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "MailCommands.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSConfig.h"
@@ -284,4 +282,3 @@ void lobbsMailRegisterCommands()
#endif
}
#endif
-3
View File
@@ -1,6 +1,3 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
void lobbsMailRegisterCommands();
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "MailDal.h"
#include "../../LoBBSConfig.h"
#include "MailRecords.h"
@@ -155,4 +153,3 @@ bool MailDal::deleteMailInboxIndex(uint64_t inboxOwnerUuid, uint32_t oneBasedInd
return deleteMailUuid(uuid);
}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <lodb/LoDB.h>
#include <stdint.h>
#include <vector>
@@ -30,4 +28,3 @@ class MailDal
LoDb &lodb_;
};
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <cstdint>
/** App field slots for `mail` rows (message body is LODB_F_DESCRIPTION). */
@@ -11,4 +9,3 @@ inline constexpr uint32_t FIELD_FROM = 1;
inline constexpr uint32_t FIELD_TO = 2;
} // namespace MailField
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "../../LoBBSConfig.h"
#if LOBBS_SEED
@@ -36,4 +34,3 @@ void lobbsSeedMail(LoBBSModule &mod)
}
#endif
#endif
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS && LOBBS_SEED
#if LOBBS_SEED
class LoBBSModule;
void lobbsSeedMail(LoBBSModule &mod);
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "MsgCommon.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSHooks.h"
@@ -58,4 +56,3 @@ void lobbsMsgRegisterDisplay()
lobbsAddFilter("display_human", displayMsgHuman, LOBBS_HOOK_PRIORITY_FEATURE);
}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "../../LoBBSCommandCtx.h"
#include <stddef.h>
#include <stdint.h>
@@ -8,4 +6,3 @@
bool lobbsMsgShiftIndex(LoBBSCommandCtx &ctx, size_t count, const char *usage, const char *badNumMsg, uint32_t &idxOut);
void lobbsMsgRegisterDisplay();
#endif
-3
View File
@@ -1,9 +1,6 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "News.h"
#include "LoBBSStackGuard.h"
NewsApp::NewsApp(LoDb &lodb) : dal_(lodb) {}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "NewsDal.h"
class NewsApp
@@ -13,4 +11,3 @@ class NewsApp
NewsDal dal_;
};
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "NewsCommands.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSConfig.h"
@@ -260,4 +258,3 @@ void lobbsNewsRegisterCommands()
#endif
}
#endif
-3
View File
@@ -1,6 +1,3 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
void lobbsNewsRegisterCommands();
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "NewsDal.h"
#include "../../LoBBSConfig.h"
#include "NewsRecords.h"
@@ -156,4 +154,3 @@ bool NewsDal::deleteNewsUuid(uint64_t newsUuidVal)
return lodb_.deleteRecord("news", newsUuidVal) == LODB_OK;
}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <lodb/LoDB.h>
#include <stdint.h>
#include <vector>
@@ -33,4 +31,3 @@ class NewsDal
LoDb &lodb_;
};
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <cstdint>
/** App field slots for `news` rows (message body is LODB_F_DESCRIPTION). */
@@ -18,4 +16,3 @@ inline constexpr uint32_t FIELD_NEWS_UUID = 0;
inline constexpr uint32_t FIELD_USER_UUID = 1;
} // namespace NewsReadField
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "../../LoBBSConfig.h"
#if LOBBS_SEED
@@ -27,4 +25,3 @@ void lobbsSeedNews(LoBBSModule &mod)
}
#endif
#endif
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS && LOBBS_SEED
#if LOBBS_SEED
class LoBBSModule;
void lobbsSeedNews(LoBBSModule &mod);
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "StatusCommands.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSHooks.h"
@@ -37,4 +35,3 @@ void lobbsStatusRegisterCommands()
lobbsAddFilter("help_topics", filterStatusHelpTopics, LOBBS_HOOK_PRIORITY_STATUS);
}
#endif
-3
View File
@@ -1,6 +1,3 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
void lobbsStatusRegisterCommands();
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "TimeCommands.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSHooks.h"
@@ -77,4 +75,3 @@ void lobbsTimeRegisterCommands()
lobbsAddFilter("help_for_topic", filterTimeHelpForTopic, LOBBS_HOOK_PRIORITY_TIME);
}
#endif
-3
View File
@@ -1,6 +1,3 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
void lobbsTimeRegisterCommands();
#endif
-3
View File
@@ -1,9 +1,6 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "Wall.h"
#include "LoBBSStackGuard.h"
WallApp::WallApp(LoDb &lodb) : dal_(lodb) {}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "WallDal.h"
#include <lodb/LoDB.h>
@@ -14,4 +12,3 @@ class WallApp
WallDal dal_;
};
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "WallCommands.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSHooks.h"
@@ -122,4 +120,3 @@ void lobbsWallRegisterCommands()
#endif
}
#endif
-3
View File
@@ -1,6 +1,3 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
void lobbsWallRegisterCommands();
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "WallDal.h"
#include "../AppUtil.h"
#include "WallRecords.h"
@@ -205,4 +203,3 @@ const char *WallDal::applyPaintTokens(uint64_t userUuid, bool isSysop, const cha
return nullptr;
}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <lodb/LoDB.h>
#include <stddef.h>
#include <stdint.h>
@@ -38,4 +36,3 @@ class WallDal
LoDb &lodb_;
};
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <cstdint>
/** `wall_canvas`. */
@@ -17,4 +15,3 @@ inline constexpr uint32_t FIELD_USER_UUID = 0;
inline constexpr uint32_t FIELD_CRC32 = 1;
} // namespace WallSeenField
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "../../LoBBSConfig.h"
#if LOBBS_SEED
@@ -21,4 +19,3 @@ void lobbsSeedWall(LoBBSModule &mod)
}
#endif
#endif
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS && LOBBS_SEED
#if LOBBS_SEED
class LoBBSModule;
void lobbsSeedWall(LoBBSModule &mod);
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "Yarn.h"
#include "../../LoBBSBootTrace.h"
@@ -10,4 +8,3 @@ YarnApp::YarnApp(LoDb &lodb) : dal_(lodb)
LOBBS_BOOT_STEP("apps init done (yarn last)");
}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "YarnDal.h"
#include <lodb/LoDB.h>
@@ -14,4 +12,3 @@ class YarnApp
YarnDal dal_;
};
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "YarnCommands.h"
#include "../../LoBBSCommandRegistry.h"
#include "../../LoBBSHooks.h"
@@ -130,4 +128,3 @@ void lobbsYarnRegisterCommands()
#endif
}
#endif
-3
View File
@@ -1,6 +1,3 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
void lobbsYarnRegisterCommands();
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "YarnDal.h"
#include "../AppUtil.h"
#include "YarnRecords.h"
@@ -187,4 +185,3 @@ const char *YarnDal::appendWords(uint64_t userUuid, bool isSysop, const char *co
return nullptr;
}
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <lodb/LoDB.h>
#include <stddef.h>
#include <stdint.h>
@@ -36,4 +34,3 @@ class YarnDal
LoDb &lodb_;
};
#endif
-3
View File
@@ -1,6 +1,4 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS
#include <cstdint>
/** `yarn_current` (collaborative text is LODB_F_DESCRIPTION). */
@@ -16,4 +14,3 @@ inline constexpr uint32_t FIELD_USER_UUID = 0;
inline constexpr uint32_t FIELD_LAST_TOTAL_WORDS = 1;
} // namespace YarnSeenField
#endif
-3
View File
@@ -1,5 +1,3 @@
#if !MESHTASTIC_EXCLUDE_LOBBS
#include "../../LoBBSConfig.h"
#if LOBBS_SEED
@@ -25,4 +23,3 @@ void lobbsSeedYarn(LoBBSModule &mod)
}
#endif
#endif
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#if !MESHTASTIC_EXCLUDE_LOBBS && LOBBS_SEED
#if LOBBS_SEED
class LoBBSModule;
void lobbsSeedYarn(LoBBSModule &mod);