24 #include <VCardSourceParam.h>
26 #include <VCardParam.h>
28 using namespace VCARD;
30 SourceParam::SourceParam()
32 type_(SourceParam::TypeUnknown)
36 SourceParam::SourceParam(
const SourceParam & x)
44 SourceParam::SourceParam(
const TQCString & s)
46 type_(SourceParam::TypeUnknown)
51 SourceParam::operator = (SourceParam & x)
53 if (*
this == x)
return *
this;
58 Param::operator = (x);
63 SourceParam::operator = (
const TQCString & s)
65 Param::operator = (s);
70 SourceParam::operator == (SourceParam & x)
76 SourceParam::~SourceParam()
83 int i = strRep_.find(
'=');
87 par_ = strRep_.left(i);
88 val_ = strRep_.right(strRep_.length() - i - 1);
90 if (tqstricmp(par_,
"VALUE") == 0 && tqstricmp(val_,
"uri") == 0)
92 else if (tqstricmp(par_,
"CONTEXT") == 0 && tqstricmp(val_,
"word") == 0)
94 else if (tqstrnicmp(par_,
"X-", 2) == 0) {
97 else type_ = TypeUnknown;
102 SourceParam::_assemble()
104 if (type_ == TypeValue)
105 strRep_ =
"VALUE=uri";
106 else if (type_ == TypeContext)
107 strRep_ =
"CONTEXT=word";
108 else if (type_ == TypeX)
109 strRep_ = par_ +
"=" + val_;