* the words "Powered by Funambol".
*/
-
+#include "syncml/core/Mem.h"
#include "syncml/core/MetInf.h"
+#include "base/globalsdef.h"
+
+BEGIN_NAMESPACE
MetInf::MetInf() {
set(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
MetInf::~MetInf() {
- if (this->format) { delete [] this->format; this->format = NULL; }
+ if (this->format) { delete [] this->format; this->format = NULL; }
if (this->type) { delete [] this->type; this->type = NULL; }
if (this->mark) { delete [] this->mark; this->mark = NULL; }
if (this->anchor) { delete this->anchor; this->anchor = NULL; }
if (this->version) { delete [] this->version; this->version = NULL; }
if (this->nextNonce) { delete this->nextNonce; this->nextNonce = NULL; }
- if (this->mem) { delete this->mem; this->mem = NULL; }
+ if (this->mem) { delete this->mem; this->mem = NULL; }
- if (this->emi) { this->emi->clear(); } //delete this->emi; this->emi = NULL;}
+ if (this->emi) { /*this->emi->clear(); }*/ delete this->emi; this->emi = NULL;}
- this->maxMsgSize = 0;
+ this->maxMsgSize = 0;
this->maxObjSize = 0;
- this->size = 0;
+ this->size = 0;
}
this->nextNonce = nonce->clone();
setMaxMsgSize(maxMsgSize);
setMaxObjSize(maxObjSize);
- this->mem = mem->clone();
+ this->mem = mem->clone();
if (emi == NULL) {
*/
void MetInf::setEMI(ArrayList* emi) {
if (this->emi) {
- this->emi->clear();
+ this->emi->clear();
}
if (emi) {
- this->emi = emi->clone();
+ this->emi = emi->clone();
}
}
* @param size the new size value
*/
void MetInf::setSize(long size) {
- if (size)
- this->size = size;
- else
- this->size = 0;
+ if (size)
+ this->size = size;
+ else
+ this->size = 0;
}
if (this->type) {
delete [] this->type; this->type = NULL;
}
- this->type = stringdup(type);
+ this->type = stringdup(type);
}
/**
* @param anchor the new anchor value
*/
void MetInf::setAnchor(Anchor* anchor) {
- if (this->anchor) {
- delete this->anchor; this->anchor = NULL;
- }
+ if (this->anchor) {
+ delete this->anchor; this->anchor = NULL;
+ }
this->anchor = anchor->clone();
}
* @param nextNonce the new nextNonce value
*/
void MetInf::setNextNonce(NextNonce* nextNonce) {
- if (this->nextNonce) {
- delete this->nextNonce; this->nextNonce = NULL;
- }
+ if (this->nextNonce) {
+ delete this->nextNonce; this->nextNonce = NULL;
+ }
this->nextNonce = nextNonce->clone();
}
* @return mem
*/
Mem* MetInf::getMem() {
- return mem;
+ return mem;
}
/**
* @param mem the new mem value
*/
void MetInf::setMem(Mem* mem) {
- if (this->mem) {
- delete this->mem; this->mem = NULL;
- }
+ if (this->mem) {
+ delete this->mem; this->mem = NULL;
+ }
this->mem = mem->clone();
}
* @param maxMsgSize the new maxMsgSize value
*/
void MetInf::setMaxMsgSize(long maxMsgSize) {
- if (maxMsgSize)
- this->maxMsgSize = maxMsgSize;
- else
- this->maxMsgSize = 0;
+ if (maxMsgSize)
+ this->maxMsgSize = maxMsgSize;
+ else
+ this->maxMsgSize = 0;
}
*/
void MetInf::setMaxObjSize(long maxObjSize) {
if (maxObjSize)
- this->maxObjSize = maxObjSize;
- else
- this->maxObjSize = 0;
+ this->maxObjSize = maxObjSize;
+ else
+ this->maxObjSize = 0;
}
/**
MetInf* MetInf::clone() {
- MetInf* ret = new MetInf();
- ret->set(format, type, mark, size, anchor, version, nextNonce, maxMsgSize,
+ MetInf* ret = new MetInf();
+ ret->set(format, type, mark, size, anchor, version, nextNonce, maxMsgSize,
maxObjSize, emi, mem);
- return ret;
+ return ret;
}
+END_NAMESPACE