/* **************************************************************************** * * ContextElementResponse::clone - */ ContextElementResponse* ContextElementResponse::clone(void) { ContextElementResponse* cerP = new ContextElementResponse(); cerP->fill(this); return cerP; }
/* **************************************************************************** * * QueryContextResponse::fill - */ void QueryContextResponse::fill(QueryContextResponse* qcrsP) { errorCode.fill(qcrsP->errorCode); for (unsigned int cerIx = 0; cerIx < qcrsP->contextElementResponseVector.size(); ++cerIx) { ContextElementResponse* cerP = new ContextElementResponse(); cerP->fill(qcrsP->contextElementResponseVector[cerIx]); contextElementResponseVector.push_back(cerP); } }
/* **************************************************************************** * * getIndividualContextEntityAttributes - */ std::string getIndividualContextEntityAttributes(ConnectionInfo* ciP, int components, std::vector<std::string> compV, ParseData* parseDataP) { std::string answer; std::string entityId = compV[2]; ContextElementResponse response; LM_T(LmtConvenience, ("CONVENIENCE: got 'GET' request with %d components", components)); ciP->httpStatusCode = mapGetIndividualContextEntityAttributes(entityId, &response); answer = response.render(IndividualContextEntityAttributes, ciP->outFormat, ""); response.release(); return answer; }
/* **************************************************************************** * * getAllEntitiesWithTypeAndId - */ extern std::string getAllEntitiesWithTypeAndId ( ConnectionInfo* ciP, int components, std::vector<std::string>& compV, ParseData* parseDataP ) { std::string answer; std::string enType = compV[3]; std::string enId = compV[5]; ContextElementResponse response; LM_T(LmtConvenience, ("CONVENIENCE: got 'GET' request with type='%s', and id='%s'", enType.c_str(), enId.c_str())); ciP->httpStatusCode = mapGetIndividualContextEntity(enId, enType, EntityTypeEmptyOrNotEmpty, &response, ciP); answer = response.render(ciP, IndividualContextEntity, ""); response.release(); return answer; }