void fix_department_details(Json::Value &o) { fix_rename(o, "super_department_id", "topdepartment"); fix_remove(o, "author"); fix_type(o, "id", V_INT); fix_type(o, "topdepartment", V_INT); }
void fix_profile_list(Json::Value &o) { fix_type(o, "id", V_INT); fix_type(o, "role", V_INT); fix_type(o, "update", V_INT); fix_type(o, "delete", V_INT); }
void fix_pictogram_details(Json::Value &o) { fix_type(o, "id", V_INT); fix_type(o, "public", V_BOOL); fix_remove(o, "author"); fix_rename(o, "inline_text", "text"); fix_rename(o, "sound_data", "sound"); fix_rename(o, "image_data", "image"); }
void fix_profile_details(Json::Value &o) { fix_rename(o, "department_id", "department"); fix_rename(o, "user_id", "user"); fix_type(o, "user", V_INT); fix_type(o, "id", V_INT); fix_type(o, "role", V_INT); fix_type(o, "department", V_INT); }
void fix_application_details(Json::Value &o) { fix_type(o, "id", V_INT); fix_remove(o, "user_id"); fix_remove(o, "max"); fix_remove(o, "direct"); }
char * CLIGetWhatisInfo(MICommand *cmd) { MIList * oobs; MIOOBRecord * oob; char * text = NULL; if (!cmd->completed || cmd->output == NULL || cmd->output->oobs == NULL) return NULL; oobs = cmd->output->oobs; for (MIListSet(oobs); (oob = (MIOOBRecord *)MIListGet(oobs)) != NULL; ) { text = oob->cstring; if (*text == '\0') { continue; } while (*text == ' ') { text++; } if (strncmp(text, "type =", 6) == 0) { text += 6; text = fix_type(text); if (strlen(text) == 0) { /* * Look at next line for type */ oob = (MIOOBRecord *)MIListGet(oobs); if (oob != NULL) { free(text); text = fix_type(oob->cstring); } } return text; } } return NULL; }
MIList * CLIGetPtypeFieldList(MICommand *cmd) { MIList * oobs; MIOOBRecord * oob; char * text = NULL; char * field; MIList * result = MIListNew(); if (!cmd->completed || cmd->output == NULL || cmd->output->oobs == NULL) return NULL; oobs = cmd->output->oobs; for (MIListSet(oobs); (oob = (MIOOBRecord *)MIListGet(oobs)) != NULL; ) { text = oob->cstring; if (*text == '\0') { continue; } if (strncmp(text, "type = ", 7) == 0) { continue; } if (strncmp(text, "}", 1) == 0) { continue; } field = fix_type(text); if (field[strlen(field)-1] == ';') { field[strlen(field)-1] = '\0'; MIListAdd(result, (void *)field); } else { free(field); } } return result; }
void fix_category_list(Json::Value &o) { fix_rename(o, "super_category_id", "topcategory"); fix_type(o, "topcategory", V_INT); fix_type(o, "id", V_INT); }
void fix_app_picto_list(Json::Value &o) { fix_type(o, "id", V_INT); fix_type(o, "author", V_INT); }
void fix_user_details(Json::Value &o) { fix_type(o, "id", V_INT); }
void fix_user_list(Json::Value &o) { fix_type(o, "id", V_INT); fix_type(o, "delete", V_INT); }
void fix_generic_list(Json::Value &o) { fix_type(o, "id", V_INT); fix_type(o, "update", V_INT); fix_type(o, "delete", V_INT); }