lib/src/main/java/edu/berkeley/boinc/rpc/RpcClient.java
public synchronized boolean projectOp(int operation, String projectUrl) {
		try {
			String opTag;
			switch (operation) {
			case PROJECT_UPDATE:
				opTag = "project_update";
				break;
			case PROJECT_SUSPEND:
				opTag = "project_suspend";
				break;
			case PROJECT_RESUME:
				opTag = "project_resume";
				break;
			case PROJECT_NNW:
				opTag = "project_nomorework";
				break;
			case PROJECT_ANW:
				opTag = "project_allowmorework";
				break;
			case PROJECT_DETACH:
				opTag = "project_detach";
				break;
			case PROJECT_RESET:
				opTag = "project_reset";
				break;
			default:
				if(edu.berkeley.boinc.utils.Logging.LOGLEVEL <= 4) Log.e(Logging.TAG, "projectOp() - unsupported operation: " + operation);
				return false;
			}
			String request =
				"<" + opTag + ">\n" +
				"<project_url>" + projectUrl + "</project_url>\n" +
				"</" + opTag + ">\n";

			sendRequest(request);
			SimpleReplyParser parser = SimpleReplyParser.parse(receiveReply());
			if (parser == null)
				return false;
			mLastErrorMessage = parser.getErrorMessage();
			return parser.result();
		}
		catch (IOException e) {
			if(Logging.WARNING) Log.w(Logging.TAG, "error in projectOp()", e);
			return false;
		}
	}
/**
	 * Triggers change of state of project in BOINC core client
	 * @param operation operation to be triggered
	 * @param projectUrl master URL of project
	 * @return true for success, false for failure
	 */
Triggers change of state of project in BOINC core client
@param operation operation to be triggered
@param projectUrl master URL of project
@return true for success, false for failure
Triggers change of state of project in BOINC core client @param operation operation to be triggered @param projectUrl master URL of project @return true for success false for failure
public synchronized boolean projectOp(int operation, String projectUrl) {
		try {
			String opTag;
			switch (operation) {
			case PROJECT_UPDATE:
				opTag = "project_update";
				break;
			case PROJECT_SUSPEND:
				opTag = "project_suspend";
				break;
			case PROJECT_RESUME:
				opTag = "project_resume";
				break;
			case PROJECT_NNW:
				opTag = "project_nomorework";
				break;
			case PROJECT_ANW:
				opTag = "project_allowmorework";
				break;
			case PROJECT_DETACH:
				opTag = "project_detach";
				break;
			case PROJECT_RESET:
				opTag = "project_reset";
				break;
			default:
				if(edu.berkeley.boinc.utils.Logging.LOGLEVEL <= 4) Log.e(Logging.TAG, "projectOp() - unsupported operation: " + operation);
				return false;
			}
			String request =
				"<" + opTag + ">\n" +
				"<project_url>" + projectUrl + "</project_url>\n" +
				"</" + opTag + ">\n";
			sendRequest(request);
			SimpleReplyParser parser = SimpleReplyParser.parse(receiveReply());
			if (parser == null)
				return false;
			mLastErrorMessage = parser.getErrorMessage();
			return parser.result();
		}
		catch (IOException e) {
			if(Logging.WARNING) Log.w(Logging.TAG, "error in projectOp()", e);
			return false;
		}
	}
public synchronized boolean projectOp ( int operation , String projectUrl ) { try { String opTag ; switch ( operation ) { case PROJECT_UPDATE : opTag = "project_update" ; break ; case PROJECT_SUSPEND : opTag = "project_suspend" ; break ; case PROJECT_RESUME : opTag = "project_resume" ; break ; case PROJECT_NNW : opTag = "project_nomorework" ; break ; case PROJECT_ANW : opTag = "project_allowmorework" ; break ; case PROJECT_DETACH : opTag = "project_detach" ; break ; case PROJECT_RESET : opTag = "project_reset" ; break ; default : if ( edu . berkeley . boinc . utils . Logging . LOGLEVEL <= 4 ) Log . e ( Logging . TAG , "projectOp() - unsupported operation: " + operation ) ; return false ; } String request = "<" + opTag + ">\n" + "<project_url>" + projectUrl + "</project_url>\n" + "</" + opTag + ">\n" ; sendRequest ( request ) ; SimpleReplyParser parser = SimpleReplyParser . parse ( receiveReply ( ) ) ; if ( parser == null ) return false ; mLastErrorMessage = parser . getErrorMessage ( ) ; return parser . result ( ) ; } catch ( IOException e ) { if ( Logging . WARNING ) Log . w ( Logging . TAG , "error in projectOp()" , e ) ; return false ; } }
Triggers change of state of project in BOINC core client
 @param operation operation to be triggered
 @param projectUrl master URL of project
 @return true for success, false for failure
Triggers change of state of project in BOINC core client @param operation operation to be triggered @param projectUrl master URL of project @return true for success false for failure