MythTV  master
Classes | Macros | Functions
mythhttpservice.h File Reference
#include <QObject>
#include "libmythbase/http/mythhttprequest.h"
#include "libmythbase/http/mythhttpresponse.h"
Include dependency graph for mythhttpservice.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MythHTTPService
 
class  V2HttpRedirectException
 

Macros

#define SERVICE_PROPERTY2(Type, Name)
 
#define SERVICE_PROPERTY_RO_REF(type, name)
 
#define SERVICE_PROPERTY_PTR(type, name)
 
#define SERVICE_PROPERTY_COND_PTR(type, name)
 

Functions

template<class T >
void CopyListContents (QObject *pParent, QVariantList &dst, const QVariantList &src)
 

Macro Definition Documentation

◆ SERVICE_PROPERTY2

#define SERVICE_PROPERTY2 (   Type,
  Name 
)
Value:
Q_PROPERTY(Type Name READ Get##Name MEMBER m_##Name USER true) \
public: \
Type Get##Name() const { return m_##Name; } \
template <class T> \
typename std::enable_if_t<std::is_same_v<T, QString> || \
std::is_same_v<T, QStringList> || \
std::is_same_v<T, QDateTime> || \
std::is_same_v<T, QVariantMap> || \
std::is_same_v<T, QVariantList>,void> \
set##Name(const T& value) { m_##Name = value; } \
template <class T> \
typename std::enable_if_t<!std::is_same_v<T, QString> && \
!std::is_same_v<T, QStringList> && \
!std::is_same_v<T, QDateTime> && \
!std::is_same_v<T, QVariantMap> && \
!std::is_same_v<T, QVariantList>,void> \
set##Name(T value) { m_##Name = value; } \
private: \
Type m_##Name { };

Definition at line 72 of file mythhttpservice.h.

◆ SERVICE_PROPERTY_RO_REF

#define SERVICE_PROPERTY_RO_REF (   type,
  name 
)
Value:
private: type m_##name; \
public: \
type &name() /* NOLINT(bugprone-macro-parentheses) */ \
{ \
return m_##name; \
}

Definition at line 93 of file mythhttpservice.h.

◆ SERVICE_PROPERTY_PTR

#define SERVICE_PROPERTY_PTR (   type,
  name 
)
Value:
private: type* m_##name {nullptr}; /* NOLINT(bugprone-macro-parentheses) */ \
public: \
type* name() /* NOLINT(bugprone-macro-parentheses) */ \
{ \
if (m_##name == nullptr) \
m_##name = new type( this );\
return m_##name; \
}

Definition at line 101 of file mythhttpservice.h.

◆ SERVICE_PROPERTY_COND_PTR

#define SERVICE_PROPERTY_COND_PTR (   type,
  name 
)
Value:
private: type* m_##name {nullptr}; /* NOLINT(bugprone-macro-parentheses) */ \
bool m_b##name {true}; \
public: \
type* name() /* NOLINT(bugprone-macro-parentheses) */ \
{ \
if (m_##name == nullptr && m_b##name) \
m_##name = new type( this );\
return m_##name; \
} \
void enable##name(bool enabled) \
{ \
m_b##name = enabled; \
}

Definition at line 111 of file mythhttpservice.h.

Function Documentation

◆ CopyListContents()

template<class T >
void CopyListContents ( QObject *  pParent,
QVariantList &  dst,
const QVariantList &  src 
)

Definition at line 129 of file mythhttpservice.h.

Name
Definition: channelsettings.cpp:71