#include "syncml/core/Authentication.h"
#include "syncml/core/Constants.h"
#include "syncml/core/Cred.h"
+#include "base/globalsdef.h"
+
+USE_NAMESPACE
Authentication::Authentication() {
if (principalId) {delete [] principalId; principalId = NULL; }
if (meta) {delete meta; meta = NULL; }
- encode = FALSE;
+ encode = false;
}
this->data = NULL;
this->username = NULL;
this->password = NULL;
- this->encode = FALSE;
+ this->encode = false;
this->deviceId = NULL ;
this->syncMLVerProto = NULL ;
this->principalId = NULL;
*/
Authentication::Authentication(const char* type,
const char* data,
- BOOL encode) {
+ bool encode) {
initialize();
// tbd
}
- encode = TRUE;
+ encode = true;
char auth[DIM_512];
sprintf(auth, "%s:%s", username, password);
createAuthentication(type, auth);
unsigned int len = strlen(clearData);
char* p1 = clearData;
- BOOL charFound = FALSE;
+ bool charFound = false;
for (unsigned int k = 0; k < len; k++) {
if (*p1 == 0) {
break;
}
else if (*p1 == ':') {
- charFound = TRUE;
+ charFound = true;
p1 = p1 + 1;
break;
}
p1 = p1 + 1;
}
- if (charFound == FALSE) {
+ if (charFound == false) {
this->setUsername(clearData);
this->setPassword(NULL);
} else {