public static void superq_delete(string name, string host) { // build request object SuperQNodeRequest request = new SuperQNodeRequest(); request.cmd = "superq_delete"; request.args = name; SuperQNetworkClientMgr mgr = new SuperQNetworkClientMgr(); mgr.send_msg(host, request.ToString()); }
public static void superqelem_delete(superq sq, string name) { // build request object SuperQNodeRequest request = new SuperQNodeRequest(); request.cmd = "superqelem_delete"; request.args = sq.publicName; request.body = name; SuperQNetworkClientMgr mgr = new SuperQNetworkClientMgr(); mgr.send_msg(sq.host, request.ToString()); }
public static void superqelem_create(superq sq, superqelem sqe, int idx = -1) { // build request object SuperQNodeRequest request = new SuperQNodeRequest(); request.cmd = "superqelem_create"; request.args = sq.publicName + "," + idx.ToString(); request.body = sqe.ToString(); SuperQNetworkClientMgr mgr = new SuperQNetworkClientMgr(); mgr.send_msg(sq.host, request.ToString()); }
public static void superq_create(superq sq) { // build request object from string SuperQNodeRequest request = new SuperQNodeRequest(); request.cmd = "superq_create"; request.args = sq.publicName; request.body = sq.ToString(); SuperQNetworkClientMgr mgr = new SuperQNetworkClientMgr(); mgr.send_msg(sq.host, request.ToString()); }
public static bool superq_exists(string name, string host) { // build request object from string SuperQNodeRequest request = new SuperQNodeRequest(); request.cmd = "superq_exists"; request.args = name; SuperQNetworkClientMgr mgr = new SuperQNetworkClientMgr(); SuperQNodeResponse response = mgr.send_msg(host, request.ToString()); return(bool.Parse(response.result)); }
public static superq superq_query(superq sq, string query) { // build request object from string SuperQNodeRequest request = new SuperQNodeRequest(); request.cmd = "superq_query"; request.args = sq.publicName; request.body = query; SuperQNetworkClientMgr mgr = new SuperQNetworkClientMgr(); SuperQNodeResponse response = mgr.send_msg(sq.host, request.ToString()); if (bool.Parse(response.result) == false) { throw new Exception("Not sure what to raise here yet."); } return(new superq(response.body, "", "", "", false, true)); }
public static superq superq_read(string name, string host) { // build request object from string SuperQNodeRequest request = new SuperQNodeRequest(); request.cmd = "superq_read"; request.args = name; SuperQNetworkClientMgr mgr = new SuperQNetworkClientMgr(); SuperQNodeResponse response = mgr.send_msg(host, request.ToString()); if (bool.Parse(response.result) == false) { throw new Exception(name + " does not exist."); } // deserialize response body into a detached superq and return return(new superq(response.body, "", "", "", false, true)); }