Imported Upstream version 0.8~alpha1
[platform/upstream/syncevolution.git] / src / client-api / src / c++ / common / syncml / core / Search.cpp
index 8edf088..736e17a 100644 (file)
 
 
 #include "syncml/core/Search.h"
+#include "base/globalsdef.h"
+
+USE_NAMESPACE
 
 Search::Search() {
 
     COMMAND_NAME = new char[strlen(SEARCH_COMMAND_NAME) + 1];
     sprintf(COMMAND_NAME, SEARCH_COMMAND_NAME);
 
-    noResults = FALSE;
+    noResults = false;
     target    = NULL;
     sources   = new ArrayList();
     lang      = NULL;
@@ -71,8 +74,8 @@ Search::~Search() {
 *
 */
 Search::Search(CmdID*      cmdID    ,
-               BOOL        noResp   ,
-               BOOL        noResults,
+               bool        noResp   ,
+               bool        noResults,
                Cred*       cred     ,
                Target*     target   ,
                ArrayList*  sources  ,
@@ -84,7 +87,7 @@ Search::Search(CmdID*      cmdID    ,
     COMMAND_NAME = new char[strlen(SEARCH_COMMAND_NAME) + 1];
     sprintf(COMMAND_NAME, SEARCH_COMMAND_NAME);
 
-    this->noResults = FALSE;
+    this->noResults = false;
     this->target    = NULL;
     this->sources   = new ArrayList();
     this->lang      = NULL;
@@ -107,7 +110,7 @@ Search::Search(CmdID*      cmdID    ,
 * @return noResults
 *
 */
-BOOL Search::isNoResults() {
+bool Search::isNoResults() {
     return (noResults != NULL);
 }
 
@@ -116,12 +119,8 @@ BOOL Search::isNoResults() {
 *
 * @param noResults the noResults value
 */
-void Search::setNoResults(BOOL noResults) {
-     if ((noResults == NULL) || (noResults != TRUE && noResults != FALSE)) {
-        this->noResults = NULL;
-    } else {
-        this->noResults = noResults;
-    }
+void Search::setNoResults(bool noResults) {
+    this->noResults = noResults;
 }
 
 /**
@@ -129,7 +128,7 @@ void Search::setNoResults(BOOL noResults) {
 *
 * @return noResults if boolean value is true, otherwise null
 */
-BOOL Search::getNoResults() {
+bool Search::getNoResults() {
     return noResults;
 }