Lines Matching refs:bean
152 PdpProfile bean;
153 bean.profileName = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_OPERATOR_NAME));
154 bean.authUser = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_AUTH_USER));
155 bean.authPwd = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_AUTH_PWD));
157 bean.authType = authTypeStr.empty() ? 0 : atoi(authTypeStr.c_str());
158 bean.mcc = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_MCC));
159 bean.mnc = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_MNC));
160 bean.apn = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_APN));
161 bean.apnTypes = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_APN_TYPES));
162 bean.mmsIpAddress = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_MMS_IP_ADDRESS));
163 bean.proxyIpAddress = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_IP_ADDRESS));
164 bean.homeUrl = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_HOME_URL));
165 bean.mvnoType = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_MVNO_TYPE));
166 bean.mvnoMatchData = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_MVNO_MATCH_DATA));
167 bean.server = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_SERVER));
169 bean.edited = editedStr.empty() ? 0 : atoi(editedStr.c_str());
171 bean.bearingSystemType = bearingStr.empty() ? 0 : atoi(bearingStr.c_str());
173 bean.isRoamingApn = isRoamingApnStr.empty() ? 0 : atoi(isRoamingApnStr.c_str());
175 bean.pdpProtocol = pdpProtocolStr.empty() ? "IP" : pdpProtocolStr;
177 bean.roamPdpProtocol = roamPdpProtocolStr.empty() ? "IP" : roamPdpProtocolStr;
178 vec.push_back(bean);
191 void ParserUtil::ParserPdpProfileToValuesBucket(NativeRdb::ValuesBucket &value, const PdpProfile &bean)
193 value.PutString(PdpProfileData::PROFILE_NAME, bean.profileName);
194 value.PutString(PdpProfileData::MCC, bean.mcc);
195 value.PutString(PdpProfileData::MNC, bean.mnc);
196 std::string mccmnc(bean.mcc);
197 mccmnc.append(bean.mnc);
199 value.PutString(PdpProfileData::APN, bean.apn);
200 value.PutInt(PdpProfileData::AUTH_TYPE, bean.authType);
201 value.PutString(PdpProfileData::AUTH_USER, bean.authUser);
202 value.PutString(PdpProfileData::AUTH_PWD, bean.authPwd);
203 value.PutString(PdpProfileData::APN_TYPES, bean.apnTypes);
204 value.PutBool(PdpProfileData::IS_ROAMING_APN, bean.isRoamingApn);
205 value.PutString(PdpProfileData::HOME_URL, bean.homeUrl);
206 value.PutString(PdpProfileData::PROXY_IP_ADDRESS, bean.proxyIpAddress);
207 value.PutString(PdpProfileData::MMS_IP_ADDRESS, bean.mmsIpAddress);
208 value.PutString(PdpProfileData::APN_PROTOCOL, bean.pdpProtocol);
209 value.PutString(PdpProfileData::APN_ROAM_PROTOCOL, bean.roamPdpProtocol);
210 value.PutString(PdpProfileData::MVNO_TYPE, bean.mvnoType);
211 value.PutString(PdpProfileData::MVNO_MATCH_DATA, bean.mvnoMatchData);
212 value.PutInt(PdpProfileData::EDITED_STATUS, bean.edited);
213 value.PutString(PdpProfileData::SERVER, bean.server);
214 value.PutInt(PdpProfileData::BEARING_SYSTEM_TYPE, bean.bearingSystemType);
274 OpKey bean;
277 bean.mccmnc = ParseString(cJSON_GetObjectItem(ruleRoot, ITEM_MCCMNC));
278 bean.gid1 = ParseString(cJSON_GetObjectItem(ruleRoot, ITEM_GID_ONE));
279 bean.gid2 = ParseString(cJSON_GetObjectItem(ruleRoot, ITEM_GID_TWO));
280 bean.imsi = ParseString(cJSON_GetObjectItem(ruleRoot, ITEM_IMSI));
281 bean.spn = ParseString(cJSON_GetObjectItem(ruleRoot, ITEM_SPN));
282 bean.iccid = ParseString(cJSON_GetObjectItem(ruleRoot, ITEM_ICCID));
284 bean.operatorName = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_OPERATOR_NAME_OPKEY));
285 if (bean.operatorName.empty()) {
286 bean.operatorName = "COMMON";
288 bean.operatorKey = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_OPERATOR_KEY));
289 bean.operatorKeyExt = ParseString(cJSON_GetObjectItem(itemRoot, ITEM_OPERATOR_KEY_EXT));
290 bean.ruleId = GetRuleId(bean);
291 vec.push_back(bean);
297 int ParserUtil::GetRuleId(OpKey &bean)
300 if (!bean.mccmnc.empty()) {
303 if (!bean.iccid.empty()) {
306 if (!bean.imsi.empty()) {
309 if (!bean.spn.empty()) {
312 if (!bean.gid1.empty()) {
315 if (!bean.gid2.empty()) {
321 void ParserUtil::ParserOpKeyToValuesBucket(NativeRdb::ValuesBucket &value, const OpKey &bean)
323 value.PutString(OpKeyData::MCCMNC, bean.mccmnc);
324 value.PutString(OpKeyData::GID1, bean.gid1);
325 value.PutString(OpKeyData::GID2, bean.gid2);
326 value.PutString(OpKeyData::IMSI, bean.imsi);
327 value.PutString(OpKeyData::SPN, bean.spn);
328 value.PutString(OpKeyData::ICCID, bean.iccid);
329 value.PutString(OpKeyData::OPERATOR_NAME, bean.operatorName);
330 value.PutString(OpKeyData::OPERATOR_KEY, bean.operatorKey);
331 value.PutString(OpKeyData::OPERATOR_KEY_EXT, bean.operatorKeyExt);
332 value.PutInt(OpKeyData::RULE_ID, bean.ruleId);
388 NumMatch bean;
389 bean.name = ParseAsString(cJSON_GetObjectItem(itemRoot, ITEM_NAME));
390 bean.mcc = ParseAsString(cJSON_GetObjectItem(itemRoot, ITEM_MCC));
391 bean.mnc = ParseAsString(cJSON_GetObjectItem(itemRoot, ITEM_MNC));
392 bean.numMatch = ParseInt(cJSON_GetObjectItem(itemRoot, ITEM_NUM_MATCH));
393 bean.numMatchShort = ParseInt(cJSON_GetObjectItem(itemRoot, ITEM_NUM_MATCH_SHORT));
394 vec.push_back(bean);
417 void ParserUtil::ParserNumMatchToValuesBucket(NativeRdb::ValuesBucket &value, const NumMatch &bean)
419 value.PutString(NumMatchData::NAME, bean.name);
420 value.PutString(NumMatchData::MCC, bean.mcc);
421 value.PutString(NumMatchData::MNC, bean.mnc);
422 std::string mccmnc(bean.mcc);
423 mccmnc.append(bean.mnc);
425 value.PutInt(NumMatchData::NUM_MATCH, bean.numMatch);
426 value.PutInt(NumMatchData::NUM_MATCH_SHORT, bean.numMatchShort);
482 EccNum bean;
483 bean.name = ParseAsString(cJSON_GetObjectItem(itemRoot, ITEM_NAME));
484 bean.mcc = ParseAsString(cJSON_GetObjectItem(itemRoot, ITEM_MCC));
485 bean.mnc = ParseAsString(cJSON_GetObjectItem(itemRoot, ITEM_MNC));
486 bean.numeric = ParseAsString(cJSON_GetObjectItem(itemRoot, ITEM_NUMERIC));
487 bean.ecc_withcard = ParseAsString(cJSON_GetObjectItem(itemRoot, ITEM_ECC_WITH_CARD));
488 bean.ecc_nocard = ParseAsString(cJSON_GetObjectItem(itemRoot, ITEM_ECC_NO_CARD));
489 bean.ecc_fake = ParseAsString(cJSON_GetObjectItem(itemRoot, ITEM_ECC_FAKE));
490 vec.push_back(bean);
495 void ParserUtil::ParserEccDataToValuesBucket(NativeRdb::ValuesBucket &value, const EccNum &bean)
497 value.PutString(EccData::NAME, bean.name);
498 value.PutString(EccData::MCC, bean.mcc);
499 value.PutString(EccData::MNC, bean.mnc);
500 value.PutString(EccData::NUMERIC, bean.numeric);
501 value.PutString(EccData::ECC_WITH_CARD, bean.ecc_withcard);
502 value.PutString(EccData::ECC_NO_CARD, bean.ecc_nocard);
503 value.PutString(EccData::ECC_FAKE, bean.ecc_fake);