Revision: 13885
http://xbmc.svn.sourceforge.net/xbmc/?rev=13885&view=rev
Author: monkeyman_67156
Date: 2008-07-01 20:20:05 -0700 (Tue, 01 Jul 2008)
Log Message:
-----------
changed: suppressed a few more const char* warnings
Modified Paths:
--------------
branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCConfiguration.cpp
branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMChttp.cpp
branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCweb.cpp
branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCweb.h
Modified: branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCConfiguration.cpp
===================================================================
--- branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCConfiguration.cpp 2008-07-02 03:05:03 UTC (rev 13884)
+++ branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCConfiguration.cpp 2008-07-02 03:20:05 UTC (rev 13885)
@@ -65,9 +65,9 @@
char_t *type = NULL;
// asp function is called within a script, get arguments
- if (ejArgs(argc, argv, T("%s"),&type) < 1)
+ if (ejArgs(argc, argv, T((char*)"%s"),&type) < 1)
{
- if (eid!=-1) websError(wp, 500, T("Insufficient args\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Insufficient args\n"));
else response="<li>Error:Insufficient args";
return -1;
}
@@ -89,7 +89,7 @@
return 0;
}
- if (eid!=-1) websError(wp, 500, T("Bookmark type does not exist\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Bookmark type does not exist\n"));
else response="<li>Error:Bookmark type does not exist";
return -1;
@@ -141,8 +141,8 @@
char_t *parameter, *type, *id = NULL;
// asp function is called within a script, get arguments
- if (ejArgs(argc, argv, T("%s %s %s"), &type, ¶meter, &id) < 3) {
- if (eid!=-1) websError(wp, 500, T("Insufficient args\n"));
+ if (ejArgs(argc, argv, T((char*)"%s %s %s"), &type, ¶meter, &id) < 3) {
+ if (eid!=-1) websError(wp, 500, T((char*)"Insufficient args\n"));
else response="<li>Error:Insufficient args";
return -1;
}
@@ -151,7 +151,7 @@
try { nr = atoi(id); }
catch (...)
{
- if (eid!=-1) websError(wp, 500, T("Id is not a number\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Id is not a number\n"));
else response="<li>Error:Id is not a number";
return -1;
}
@@ -159,7 +159,7 @@
VECSOURCES* pShares = g_settings.GetSourcesFromType(type);
if (!pShares)
{
- if (eid!=-1) websError(wp, 500, T("Bookmark type does not exist\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Bookmark type does not exist\n"));
else response="<li>Error:Bookmark type does not exist";
return -1;
}
@@ -190,13 +190,13 @@
}
else
{
- if (eid!=-1) websError(wp, 500, T("Parameter not known\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Parameter not known\n"));
else response="<li>Error:Parameter not known";
}
return 0;
}
- if (eid!=-1) websError(wp, 500, T("Position not found\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Position not found\n"));
else response="<li>Error:Position not found";
return -1;
@@ -289,11 +289,11 @@
int numParas;
// asp function is called within a script, get arguments
- numParas=ejArgs(argc, argv, T("%s %s %s %s %s"), &type, &name, &path, &thumbnail, &position);
+ numParas=ejArgs(argc, argv, T((char*)"%s %s %s %s %s"), &type, &name, &path, &thumbnail, &position);
if ( numParas< 3)
{
if (eid!=-1)
- websError(wp, 500, T("Insufficient args\n use: function(command, type, name, path, [thumbnail], [position])"));
+ websError(wp, 500, T((char*)"Insufficient args\n use: function(command, type, name, path, [thumbnail], [position])"));
else
response="<li>Error:Insufficient args, use: function(command, type, name, path, [thumbnail], [position])";
return -1;
@@ -392,8 +392,8 @@
char_t *type, *name, *path, *position = NULL;
// asp function is called within a script, get arguments
- if (ejArgs(argc, argv, T("%s %s %s %s"), &type, &name, &path, &position) < 4) {
- if (eid!=-1) websError(wp, 500, T("Insufficient args\n use: function(command, type, name, path, postion)"));
+ if (ejArgs(argc, argv, T((char*)"%s %s %s %s"), &type, &name, &path, &position) < 4) {
+ if (eid!=-1) websError(wp, 500, T((char*)"Insufficient args\n use: function(command, type, name, path, postion)"));
else response="<li>Error:Insufficient args, use: function(command, type, name, path, postion)";
return -1;
}
@@ -402,7 +402,7 @@
try { nr = atoi(position); }
catch (...)
{
- if (eid!=-1) websError(wp, 500, T("Id is not a number\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Id is not a number\n"));
else response="<li>Error:Id is not a number";
return -1;
}
@@ -416,7 +416,7 @@
return 0;
}
- if (eid!=-1) websError(wp, 500, T("Position not found\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Position not found\n"));
else response="<li>Error:Position not found";
return -1;
@@ -472,9 +472,9 @@
char_t *type, *position = NULL;
// asp function is called within a script, get arguments
- if (ejArgs(argc, argv, T("%s %s"), &type, &position) < 2) {
+ if (ejArgs(argc, argv, T((char*)"%s %s"), &type, &position) < 2) {
if(eid!=-1)
- websError(wp, 500, T("Insufficient args\n use: function(type, position)"));
+ websError(wp, 500, T((char*)"Insufficient args\n use: function(type, position)"));
else
response="<li>Error:Insufficient args, use: function(type, position)";
return -1;
@@ -484,7 +484,7 @@
try { nr = atoi(position); }
catch (...)
{
- if (eid!=-1) websError(wp, 500, T("Id is not a number\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Id is not a number\n"));
else response="<li>Error:position is not a number";
return -1;
}
@@ -494,7 +494,7 @@
if (g_settings.DeleteSource(type,share.strName,share.strPath))
return 0;
- if (eid!=-1) websError(wp, 500, T("Position not found\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Position not found\n"));
else response="<li>Error:Position not found";
return -1;
/*
@@ -544,15 +544,15 @@
*/
int CXbmcConfiguration::SaveConfiguration( int eid, webs_t wp, CStdString& response, int argc, char_t **argv)
{
- if (eid!=-1) websError(wp, 500, T("Deprecated\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Deprecated\n"));
else response="<li>Error:Functino is deprecated";
return -1;
char_t *filename = NULL;
// asp function is called within a script, get arguments
- if (ejArgs(argc, argv, T("%s"), &filename) < 1) {
- if (eid!=-1) websError(wp, 500, T("Insufficient args\n use: function(filename)"));
+ if (ejArgs(argc, argv, T((char*)"%s"), &filename) < 1) {
+ if (eid!=-1) websError(wp, 500, T((char*)"Insufficient args\n use: function(filename)"));
else response="<li>Error:Insufficient args, use: function(filename)";
return -1;
}
@@ -560,7 +560,7 @@
// load xboxmediacenter.xml, write a messages if file could not be loaded
if (Load() == -1)
{
- if (eid!=-1) websError(wp, 500, T("Could not load XboxMediaCenter.xml\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Could not load XboxMediaCenter.xml\n"));
else response="<li>Error:Could not load XboxMediaCenter.xml";
return -1;
}
@@ -575,7 +575,7 @@
if (!xbmcCfg.SaveFile(strPath))
{
- if (eid!=-1) websError(wp, 500, T("Could not save to file\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Could not save to file\n"));
else response="<li>Error:Could not save to file";
return -1;
}
@@ -588,7 +588,7 @@
*/
int CXbmcConfiguration::GetOption( int eid, webs_t wp, CStdString& response, int argc, char_t **argv)
{
- if (eid!=-1) websError(wp, 500, T("Deprecated\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Deprecated\n"));
else response="<li>Error:Functino is deprecated";
return -1;
@@ -664,7 +664,7 @@
*/
int CXbmcConfiguration::SetOption( int eid, webs_t wp, CStdString& response, int argc, char_t **argv)
{
- if (eid!=-1) websError(wp, 500, T("Deprecated\n"));
+ if (eid!=-1) websError(wp, 500, T((char*)"Deprecated\n"));
else response="<li>Error:Functino is deprecated";
return -1;
Modified: branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMChttp.cpp
===================================================================
--- branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMChttp.cpp 2008-07-02 03:05:03 UTC (rev 13884)
+++ branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMChttp.cpp 2008-07-02 03:20:05 UTC (rev 13885)
@@ -3146,14 +3146,14 @@
if (m_pXbmcHttp && m_pXbmcHttp->shuttingDown)
return -1;
- int parameters = ejArgs(argc, argv, T("%s %s"), &command, ¶meter);
+ int parameters = ejArgs(argc, argv, T((char*)"%s %s"), &command, ¶meter);
if (parameters < 1)
{
- websError(wp, 500, T("Error:Insufficient args"));
+ websError(wp, 500, T((char*)"Error:Insufficient args"));
return -1;
}
else if (parameters < 2)
- parameter = "";
+ parameter = (char*)"";
xbmcProcessCommand( eid, wp, command, parameter);
return 0;
}
@@ -3166,8 +3166,8 @@
if (m_pXbmcHttp && m_pXbmcHttp->shuttingDown)
return;
- command = websGetVar(wp, WEB_COMMAND, "");
- parameter = websGetVar(wp, WEB_PARAMETER, "");
+ command = websGetVar(wp, (char*)WEB_COMMAND, (char*)"");
+ parameter = websGetVar(wp, (char*)WEB_PARAMETER, (char*)"");
// do the command
Modified: branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCweb.cpp
===================================================================
--- branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCweb.cpp 2008-07-02 03:05:03 UTC (rev 13884)
+++ branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCweb.cpp 2008-07-02 03:20:05 UTC (rev 13885)
@@ -384,9 +384,9 @@
if((DWORD)xbmcNavigator[cmd].xbmcAppStateCode == navigatorState)
{
if( eid != NO_EID) {
- ejSetResult( eid, xbmcNavigator[cmd].xbmcNavigateParameter);
+ ejSetResult( eid, (char*)xbmcNavigator[cmd].xbmcNavigateParameter);
} else {
- cnt = websWrite(wp, xbmcNavigator[cmd].xbmcNavigateParameter);
+ cnt = websWrite(wp, (char*)xbmcNavigator[cmd].xbmcNavigateParameter);
}
}
cmd++;
@@ -415,7 +415,7 @@
// by default the answer to any question is 0
if( eid != NO_EID) {
- ejSetResult( eid, "0");
+ ejSetResult( eid, (char*)"0");
}
// if we are in an interface that supports media catalogs
@@ -428,7 +428,7 @@
(state == WEB_NAV_MUSICPLAYLIST) ||
(state == WEB_NAV_VIDEOPLAYLIST))
{
- CHAR *output = "error";
+ const char* output = "error";
// get total items in current state
if (navigatorState == WEB_NAV_MUSICPLAYLIST)
@@ -469,7 +469,7 @@
}
}
websHeader(wp); wroteHeader = TRUE;
- cnt = websWrite(wp, output);
+ cnt = websWrite(wp, (char*)output);
websFooter(wp); wroteFooter = TRUE;
return cnt;
}
@@ -517,9 +517,9 @@
}
}
if( eid != NO_EID) {
- ejSetResult( eid, output);
+ ejSetResult( eid, (char*)output);
} else {
- cnt = websWrite(wp, output);
+ cnt = websWrite(wp, (char*)output);
}
return cnt;
}
@@ -545,7 +545,7 @@
itoa(items, buffer, 10);
ejSetResult( eid, buffer);
} else {
- cnt = websWrite(wp, "%i", items);
+ cnt = websWrite(wp, (char*)"%i", (char*)items);
}
return cnt;
}
@@ -614,9 +614,9 @@
else
{
if( eid != NO_EID) {
- ejSetResult( eid, XBMC_NONE);
+ ejSetResult( eid, (char*)XBMC_NONE);
} else {
- cnt = websWrite(wp, XBMC_NONE);
+ cnt = websWrite(wp, (char*)XBMC_NONE);
}
}
}
@@ -634,9 +634,9 @@
}
} else {
if( eid != NO_EID) {
- ejSetResult( eid, XBMC_NONE);
+ ejSetResult( eid, (char*)XBMC_NONE);
} else {
- cnt = websWrite(wp, XBMC_NONE);
+ cnt = websWrite(wp, (char*)XBMC_NONE);
}
}
}
@@ -909,12 +909,12 @@
{
char_t *command, *parameter;
- int parameters = ejArgs(argc, argv, T("%s %s"), &command, ¶meter);
+ int parameters = ejArgs(argc, argv, T((char*)"%s %s"), &command, ¶meter);
if (parameters < 1) {
- websError(wp, 500, T("Insufficient args\n"));
+ websError(wp, 500, T((char*)"Insufficient args\n"));
return -1;
}
- else if (parameters < 2) parameter = "";
+ else if (parameters < 2) parameter = (char*)"";
return xbmcProcessCommand( eid, wp, command, parameter);
}
@@ -930,8 +930,8 @@
{
char_t *command, *parameter, *next_page;
- command = websGetVar(wp, WEB_COMMAND, XBMC_NONE);
- parameter = websGetVar(wp, WEB_PARAMETER, XBMC_NONE);
+ command = websGetVar(wp, (char*)WEB_COMMAND, (char*)XBMC_NONE);
+ parameter = websGetVar(wp, (char*)WEB_PARAMETER, (char*)XBMC_NONE);
// do the command
wroteHeader = false;
@@ -939,8 +939,8 @@
xbmcProcessCommand( NO_EID, wp, command, parameter);
// if we do want to redirect
- if( websTestVar(wp, WEB_NEXT_PAGE)) {
- next_page = websGetVar(wp, WEB_NEXT_PAGE, XBMC_NONE);
+ if( websTestVar(wp, (char*)WEB_NEXT_PAGE)) {
+ next_page = websGetVar(wp, (char*)WEB_NEXT_PAGE, (char*)XBMC_NONE);
// redirect to another web page
websRedirect(wp, next_page);
return;
Modified: branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCweb.h
===================================================================
--- branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCweb.h 2008-07-02 03:05:03 UTC (rev 13884)
+++ branches/linuxport/XBMC/xbmc/lib/libGoAhead/XBMCweb.h 2008-07-02 03:20:05 UTC (rev 13885)
@@ -62,7 +62,7 @@
* function to an XBMC ir remote command.
*/
typedef struct {
- char_t *xbmcRemoteParameter;
+ const char_t *xbmcRemoteParameter;
int xbmcIRCode;
} xbmcRemoteControlHandlerType;
@@ -71,7 +71,7 @@
* to an XBMC application state.
*/
typedef struct {
- char_t *xbmcNavigateParameter;
+ const char_t *xbmcNavigateParameter;
int xbmcAppStateCode;
} xbmcNavigationHandlerType;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|