bool GSSImportName::loadParameters(JSONObject *params)
{
/* Variables */
+
/* Error checking */
/* Setup */
// Should I zeroOut?
/* Main processing */
// Easy stuff(*params)
- std::string input_name = (*params)["arguments"]["input_name"].string();
- std::string input_name_type = (*params)["arguments"]["input_name_type"].string();
+ if ( params->get("arguments").isNull() )
+ return true;
+
+ if ( !params->get("arguments").get("input_name").isNull() )
+ {
+ if ( params->get("arguments").get("input_name").isString() )
+ {
+ std::string input_name = params->get("arguments").get("input_name").string();
+ this->inputName.setValue( input_name );
+ }
+ }
- this->inputName.setValue( input_name );
- this->inputNameType.setValue( input_name_type );
+ if ( !params->get("arguments").get("input_name_type").isNull() )
+ {
+ if ( params->get("arguments").get("input_name_type").isString() )
+ {
+ std::string input_name_type = params->get("arguments").get("input_name_type").string();
+ this->inputNameType.setValue( input_name_type );
+ }
+ }
/* Cleanup */
/* Return */
}
+// /***********
+// * QOP_REQ *
+// ***********/
+// if ( ! params->get("arguments").get("qop_req").isNull() )
+// {
+// if (params->get("arguments").get("qop_req").isString())
+// {
+// sQopReq = params->get("arguments").get("qop_req").string();
+// if (sQopReq == "GSS_C_QOP_DEFAULT")
+// this->qop_req = GSS_C_QOP_DEFAULT;
+// else
+// throw std::invalid_argument( std::string("Invalid QOP type given: ") + sQopReq );
+// } else if (params->get("arguments").get("qop_req").isInteger())
+// this->qop_req = (gss_cred_usage_t)( params->get("arguments").get("qop_req").integer() );
+// else
+// throw std::invalid_argument( "Unrecognized argument type for qop_req." );
+// }
+//
+// /*****************
+// * input_message *
+// *****************/
+// if ( ! params->get("arguments").get("input_message").isNull() )
+// {
+// sInputMessage = params->get("arguments").get("input_message").string();
+// this->inputMessage.setValue(sInputMessage);
+// }
+
+
/* Variables */
/* Error checking */
/* Setup */