[tuxdroid-svn] r5265 - software_suite_v3/smart-core/smart-api/cpp/API
Status: Beta
Brought to you by:
ks156
|
From: JDM <c2m...@c2...> - 2009-08-01 12:00:21
|
Author: JDM
Date: 2009-08-01 13:59:59 +0200 (Sat, 01 Aug 2009)
New Revision: 5265
Modified:
software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.c
software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.h
Log:
* Moved getStatus for getStatusStr (for status in string)
* Added getStatusInt for get the status directly in integer
* Added getStatusDbl for get the status directly in double
Modified: software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.c
===================================================================
--- software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.c 2009-08-01 11:58:11 UTC (rev 5264)
+++ software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.c 2009-08-01 11:59:59 UTC (rev 5265)
@@ -644,11 +644,21 @@
WavControl(CLIENT_LEVEL_FREE, WAV_STOP, "");
}
- string TuxAPI::getStatus(TuxAPI_STATUS_REQUESTED status)
+ string TuxAPI::getStatusStr(TuxAPI_STATUS_REQUESTED status)
{
return getRawStatus(CLIENT_LEVEL_FREE, status);
}
+ int TuxAPI::getStatusInt(TuxAPI_STATUS_REQUESTED status)
+ {
+ return atoi(getRawStatus(CLIENT_LEVEL_FREE, status).c_str());
+ }
+
+ double TuxAPI::getStatusDbl(TuxAPI_STATUS_REQUESTED status)
+ {
+ return strtodbl(getRawStatus(CLIENT_LEVEL_FREE, status));
+ }
+
double strtodbl( const std::string& s )
{
std::istringstream i(s);
Modified: software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.h
===================================================================
--- software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.h 2009-08-01 11:58:11 UTC (rev 5264)
+++ software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.h 2009-08-01 11:59:59 UTC (rev 5265)
@@ -246,6 +246,8 @@
void PlayWav(char *sound);
void StopWav(void);
- string getStatus(TuxAPI_STATUS_REQUESTED status);
+ string getStatusStr(TuxAPI_STATUS_REQUESTED status);
+ int getStatusInt(TuxAPI_STATUS_REQUESTED status);
+ double getStatusDbl(TuxAPI_STATUS_REQUESTED status);
};
}
|