deCONZ C++ API v2.6.1
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1
6#ifndef DECONZ_UTIL_H
7#define DECONZ_UTIL_H
8
9/*
10 * Copyright (c) 2012-2023 dresden elektronik ingenieurtechnik gmbh.
11 * All rights reserved.
12 *
13 * The software in this package is published under the terms of the BSD
14 * style license a copy of which has been included with this distribution in
15 * the LICENSE.txt file.
16 *
17 */
18
28#include <QString>
29#include <QMetaType> // QVariantList, QVariantMap
30#include "deconz/declspec.h"
31
37namespace deCONZ {
38
39
40enum StorageLocation
41{
42 HomeLocation,
43 ApplicationsLocation,
44 ApplicationsDataLocation,
45 DocumentsLocation,
46 ZcldbLocation,
47 ConfigLocation,
48 NodeCacheLocation,
49 RuntimeLocation,
50 DdfLocation,
51 DdfUserLocation
52};
53
54int DECONZ_DLLSPEC appArgumentNumeric(const QString &arg, int defaultValue);
55QString DECONZ_DLLSPEC appArgumentString(const QString &arg, const QString &defaultValue);
56QString DECONZ_DLLSPEC jsonStringFromMap(const QVariantMap &map);
57QString DECONZ_DLLSPEC jsonStringFromList(const QVariantList &ls);
58QString DECONZ_DLLSPEC getStorageLocation(StorageLocation location);
59bool DECONZ_DLLSPEC isVirtualMachine();
60} // namespace deCONZ
61
62#define U_INVALID_UNICODE_CODEPOINT 0x20000000
63
64extern "C" {
65
66DECONZ_DLLSPEC const char * U_utf8_codepoint(const char *text, unsigned *codepoint);
67
68} // extern "C"
69
70#endif // DECONZ_UTIL_H
int DECONZ_DLLSPEC appArgumentNumeric(const QString &arg, int defaultValue)
Get the value of a commandline argument.
Definition util.cpp:104
QString DECONZ_DLLSPEC appArgumentString(const QString &arg, const QString &defaultValue)
Get the value of a commandline argument.
Definition util.cpp:153
The deCONZ namespace.
Definition aps.cpp:19
DECONZ_DLLSPEC const char * U_utf8_codepoint(const char *text, unsigned *codepoint)
Convert utf-8 to unicode code point.
Definition util.cpp:447