Skip to content

Commit

Permalink
Merge pull request #44 from Rechi/cleanupStdString
Browse files Browse the repository at this point in the history
[cleanup] remove StdString usage
  • Loading branch information
ksooo committed Nov 12, 2017
2 parents cc1cb56 + 7e2bb79 commit 4a5efef
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pvr.njoy/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.njoy"
version="3.2.0"
version="3.2.1"
name="Njoy N7 PVR Client"
provider-name="Team Kodi">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.njoy/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v3.2.1
- Remove StdString usage

v3.2.0
- Updated to PVR addon API v5.7.0

Expand Down
10 changes: 6 additions & 4 deletions src/N7Xml.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@


#include "N7Xml.h"

#include <p8-platform/util/StringUtils.h>
#include "tinyxml.h"
#include "util/XMLUtils.h"

Expand Down Expand Up @@ -38,9 +40,9 @@ int N7Xml::getChannelsAmount()

void N7Xml::list_channels()
{
CStdString strUrl;
strUrl.Format("http://%s:%i/n7channel_nt.xml", g_strHostname.c_str(), g_iPort);
CStdString strXML;
std::string strUrl;
strUrl = StringUtils::Format("http://%s:%i/n7channel_nt.xml", g_strHostname.c_str(), g_iPort);
std::string strXML;

CCurlFile http;
if(!http.Get(strUrl, strXML))
Expand All @@ -63,7 +65,7 @@ void N7Xml::list_channels()
TiXmlNode *pChannelNode = NULL;
while ((pChannelNode = channelsNode->IterateChildren(pChannelNode)) != NULL)
{
CStdString strTmp;
std::string strTmp;
PVRChannel channel;

/* unique ID */
Expand Down
6 changes: 3 additions & 3 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ using namespace ADDON;
* Default values are defined inside client.h
* and exported to the other source files.
*/
CStdString g_strHostname = DEFAULT_HOST;
std::string g_strHostname = DEFAULT_HOST;
int g_iPort = DEFAULT_PORT;

///* Client member variables */

int m_iCurrentChannel = 1;
ADDON_STATUS m_CurStatus = ADDON_STATUS_UNKNOWN;
bool g_bCreated = false;
CStdString g_szUserPath = "";
CStdString g_szClientPath = "";
std::string g_szUserPath = "";
std::string g_szClientPath = "";
N7Xml* m_data = NULL;
CHelper_libXBMC_addon *XBMC = NULL;
CHelper_libXBMC_pvr *PVR = NULL;
Expand Down
7 changes: 3 additions & 4 deletions src/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@
*
*/

#include "p8-platform/util/StdString.h"
#include "libXBMC_addon.h"
#include "libXBMC_pvr.h"

#define DEFAULT_HOST "127.0.0.1"
#define DEFAULT_PORT 80

extern bool g_bCreated; ///< Shows that the Create function was successfully called
extern CStdString g_szUserPath; ///< The Path to the user directory inside user profile
extern CStdString g_szClientPath; ///< The Path where this driver is located
extern std::string g_szUserPath; ///< The Path to the user directory inside user profile
extern std::string g_szClientPath; ///< The Path where this driver is located

/* Client Settings */
extern CStdString g_strHostname;
extern std::string g_strHostname;
extern int g_iPort;

extern ADDON::CHelper_libXBMC_addon *XBMC;
Expand Down

0 comments on commit 4a5efef

Please sign in to comment.