Ticket #4280: 0003-Allow-defining-different-versions-of-the-XML-without.2.patch

File 0003-Allow-defining-different-versions-of-the-XML-without.2.patch, 1.7 KB (added by Andrew Ruthven <andrew@…>, 12 years ago)

Updated patch that also adds a comment block about the new constant.

  • mythtv/programs/mythbackend/httpstatus.cpp

    From 82f1c145ffffd0c0f01e14618c788e84a1ac1281 Mon Sep 17 00:00:00 2001
    From: Andrew Ruthven <puck@catalyst.net.nz>
    Date: Fri, 7 Dec 2007 11:15:45 +1300
    Subject: [PATCH] Allow defining different versions of the XML without having to increment the protocol version.
    
    Without this it will make telling the differing versions of the XML feed apart
    rather difficult.
    ---
     mythtv/programs/mythbackend/httpstatus.cpp |    1 +
     mythtv/programs/mythbackend/httpstatus.h   |    6 ++++++
     2 files changed, 7 insertions(+), 0 deletions(-)
    
    diff --git a/mythtv/programs/mythbackend/httpstatus.cpp b/mythtv/programs/mythbackend/httpstatus.cpp
    index aec4304..9ba0c04 100644
    a b void HttpStatus::FillStatusXML( QDomDocument *pDoc ) 
    155155    root.setAttribute("ISODate" , qdtNow.toString(Qt::ISODate)  );
    156156    root.setAttribute("version" , MYTH_BINARY_VERSION           );
    157157    root.setAttribute("protoVer", MYTH_PROTO_VERSION            );
     158    root.setAttribute("xmlVer"  , MYTH_XML_VERSION              );
    158159
    159160    // Add all encoders, if any
    160161
  • mythtv/programs/mythbackend/httpstatus.h

    diff --git a/mythtv/programs/mythbackend/httpstatus.h b/mythtv/programs/mythbackend/httpstatus.h
    index f472a05..66a6198 100644
    a b  
    2121#include "jobqueue.h"
    2222#include "programinfo.h"
    2323
     24/** \brief Increment this whenever the MythTV XML protocol changes.
     25 *
     26 * This allows showing changes to the XML format of the status page
     27 * without needing to increment the MythTV Protocol Version.
     28 */
     29#define MYTH_XML_VERSION "1"
    2430
    2531typedef enum
    2632{