MythTV  master
Macros | Enumerations | Functions | Variables
mythbinaryplist.cpp File Reference
#include <QDateTime>
#include <QSequentialIterable>
#include <QTextStream>
#include <QBuffer>
#include "mythconfig.h"
#include "mythlogging.h"
#include "mythbinaryplist.h"
#include <cmath>
#include <endian.h>
Include dependency graph for mythbinaryplist.cpp:

Go to the source code of this file.

Macros

#define LOC   QString("PList: ")
 
#define MAGIC   QByteArray("bplist")
 
#define VERSION   QByteArray("00")
 
#define MAGIC_SIZE   6
 
#define VERSION_SIZE   2
 
#define TRAILER_SIZE   26
 
#define MIN_SIZE   (MAGIC_SIZE + VERSION_SIZE + TRAILER_SIZE)
 
#define TRAILER_OFFSIZE_INDEX   0
 
#define TRAILER_PARMSIZE_INDEX   1
 
#define TRAILER_NUMOBJ_INDEX   2
 
#define TRAILER_ROOTOBJ_INDEX   10
 
#define TRAILER_OFFTAB_INDEX   18
 

Enumerations

enum  {
  BPLIST_NULL = 0x00, BPLIST_FALSE = 0x08, BPLIST_TRUE = 0x09, BPLIST_FILL = 0x0F,
  BPLIST_UINT = 0x10, BPLIST_REAL = 0x20, BPLIST_DATE = 0x30, BPLIST_DATA = 0x40,
  BPLIST_STRING = 0x50, BPLIST_UNICODE = 0x60, BPLIST_UID = 0x70, BPLIST_ARRAY = 0xA0,
  BPLIST_SET = 0xC0, BPLIST_DICT = 0xD0
}
 

Functions

template<typename T >
static T convert_float (const uint8_t *p)
 
template<typename T >
static T convert_int (const uint8_t *p)
 

Variables

static constexpr uint64_t CORE_DATA_EPOCH { 978307200 }
 

Macro Definition Documentation

◆ LOC

#define LOC   QString("PList: ")

Definition at line 56 of file mythbinaryplist.cpp.

◆ MAGIC

#define MAGIC   QByteArray("bplist")

Definition at line 58 of file mythbinaryplist.cpp.

◆ VERSION

#define VERSION   QByteArray("00")

Definition at line 59 of file mythbinaryplist.cpp.

◆ MAGIC_SIZE

#define MAGIC_SIZE   6

Definition at line 60 of file mythbinaryplist.cpp.

◆ VERSION_SIZE

#define VERSION_SIZE   2

Definition at line 61 of file mythbinaryplist.cpp.

◆ TRAILER_SIZE

#define TRAILER_SIZE   26

Definition at line 62 of file mythbinaryplist.cpp.

◆ MIN_SIZE

#define MIN_SIZE   (MAGIC_SIZE + VERSION_SIZE + TRAILER_SIZE)

Definition at line 63 of file mythbinaryplist.cpp.

◆ TRAILER_OFFSIZE_INDEX

#define TRAILER_OFFSIZE_INDEX   0

Definition at line 64 of file mythbinaryplist.cpp.

◆ TRAILER_PARMSIZE_INDEX

#define TRAILER_PARMSIZE_INDEX   1

Definition at line 65 of file mythbinaryplist.cpp.

◆ TRAILER_NUMOBJ_INDEX

#define TRAILER_NUMOBJ_INDEX   2

Definition at line 66 of file mythbinaryplist.cpp.

◆ TRAILER_ROOTOBJ_INDEX

#define TRAILER_ROOTOBJ_INDEX   10

Definition at line 67 of file mythbinaryplist.cpp.

◆ TRAILER_OFFTAB_INDEX

#define TRAILER_OFFTAB_INDEX   18

Definition at line 68 of file mythbinaryplist.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BPLIST_NULL 
BPLIST_FALSE 
BPLIST_TRUE 
BPLIST_FILL 
BPLIST_UINT 
BPLIST_REAL 
BPLIST_DATE 
BPLIST_DATA 
BPLIST_STRING 
BPLIST_UNICODE 
BPLIST_UID 
BPLIST_ARRAY 
BPLIST_SET 
BPLIST_DICT 

Definition at line 73 of file mythbinaryplist.cpp.

Function Documentation

◆ convert_float()

template<typename T >
static T convert_float ( const uint8_t *  p)
static

Definition at line 92 of file mythbinaryplist.cpp.

◆ convert_int()

template<typename T >
static T convert_int ( const uint8_t *  p)
static

Definition at line 109 of file mythbinaryplist.cpp.

Variable Documentation

◆ CORE_DATA_EPOCH

constexpr uint64_t CORE_DATA_EPOCH { 978307200 }
staticconstexpr

Definition at line 71 of file mythbinaryplist.cpp.

Referenced by MythBinaryPList::ParseBinaryDate().