[39220] branches/gsoc08-framework/MacPorts_Framework_Release

armahg at macports.org armahg at macports.org
Tue Aug 12 12:24:28 PDT 2008


Revision: 39220
          http://trac.macosforge.org/projects/macports/changeset/39220
Author:   armahg at macports.org
Date:     2008-08-12 12:24:28 -0700 (Tue, 12 Aug 2008)
Log Message:
-----------
Renamed the rest of MPPort exec methods (activate, deactivate and uninstall) based on suggestion from blbmp

Modified Paths:
--------------
    branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.m
    branches/gsoc08-framework/MacPorts_Framework_Release/MPPort.h
    branches/gsoc08-framework/MacPorts_Framework_Release/MPPort.m

Modified: branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.m	2008-08-12 19:23:12 UTC (rev 39219)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.m	2008-08-12 19:24:28 UTC (rev 39220)
@@ -107,26 +107,26 @@
 	NSString * result = nil;
 	
 	// This needs to throw an exception if things don't go well
-	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPortsSyncStarted" object:nil];
+	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPorts_sync_Started" object:nil];
 	[[MPNotifications sharedListener] setPerformingTclCommand:@"YES_sync"];
 	
 	result = [interpreter evaluateStringAsString:@"mportsync" error:sError];
 	
 	[[MPNotifications sharedListener] setPerformingTclCommand:@""];
-	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPortsSyncFinished" object:nil];
+	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPorts_sync_Finished" object:nil];
 
 	return result;
 }
 
 - (void)selfUpdate:(NSError**)sError {
 	//Also needs to throw an exception if things don't go well
-	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPortsSelfupdateStarted" object:nil];
+	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPorts_selfupdate_Started" object:nil];
 	[[MPNotifications sharedListener] setPerformingTclCommand:@"YES_selfUpdate"];
 	
 	[interpreter evaluateStringAsString:@"macports::selfupdate" error:sError];
 	
 	[[MPNotifications sharedListener] setPerformingTclCommand:@""];
-	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPortsSelfupdateFinished" object:nil];
+	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPorts_selfupdate_Finished" object:nil];
 }
 
 

Modified: branches/gsoc08-framework/MacPorts_Framework_Release/MPPort.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MPPort.h	2008-08-12 19:23:12 UTC (rev 39219)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MPPort.h	2008-08-12 19:24:28 UTC (rev 39220)
@@ -110,19 +110,14 @@
  */
 - (NSArray *)depends;
 
-//Wrapper method for the 3 functions below
-- (void)execPortProc:(NSString *)procedure withOptions:(NSArray *)options withVersion:(NSString *)version error:(NSError **)execError;
-//Even more generic method to execute a Tcl command with any given number of args
-- (void)execPortProc:(NSString *)procedure withParams:(NSArray *)params error:(NSError **)execError;
 
-
 /*!
  @brief Deactivates and uninstalls this MPPort from the MacPorts system
  @param options An NSArray of NSStrings of options for this uninstallation execution
  @param version An NSString indicating which version of this port to uninstall
  @discussion version should NOT be nil
  */
-- (void)uninstallWithOptions:(NSArray *)options withVersion:(NSString *)version error:(NSError**)mpError;
+- (void)uninstallWithOptions:(NSArray *)options version:(NSString *)version error:(NSError**)mpError;
 /*!
  @brief Activates an installed MPPort.
  @param options An NSArray of NSStrings of options for port activation
@@ -132,7 +127,7 @@
  of a port. This means activation of a port should occur only if the port
  had been previously deactivated after a default installation.
  */
-- (void)activateWithOptions:(NSArray *)options withVersion:(NSString *)version error:(NSError**)mpError;
+- (void)activateWithOptions:(NSArray *)options version:(NSString *)version error:(NSError**)mpError;
 /*!
  @brief Deactivates an installed  MPPort.
  @param options An NSArray of NSStrings of options for port deactivation
@@ -140,7 +135,7 @@
  @discussion version should NOT be nil. Only installed and active ports
  should be deactivated
 */
-- (void)deactivateWithOptions:(NSArray *)options withVersion:(NSString *)version error:(NSError**)mpError;
+- (void)deactivateWithOptions:(NSArray *)options version:(NSString *)version error:(NSError**)mpError;
 
 
 /*!
@@ -287,4 +282,9 @@
 + (Class)classForKeyedUnarchiver;
 - (Class)classForKeyedArchiver;
 
+
+//Wrapper method for activate, deactivate and uninstall operations
+- (void)execPortProc:(NSString *)procedure withOptions:(NSArray *)options version:(NSString *)version error:(NSError **)execError;
+//Even more generic method to execute a Tcl command with any given number of args
+- (void)execPortProc:(NSString *)procedure withParams:(NSArray *)params error:(NSError **)execError;
 @end

Modified: branches/gsoc08-framework/MacPorts_Framework_Release/MPPort.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MPPort.m	2008-08-12 19:23:12 UTC (rev 39219)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MPPort.m	2008-08-12 19:24:28 UTC (rev 39220)
@@ -190,7 +190,7 @@
 //Used for mportactivate, mportdeactivate and mportuninstall
 -(void)execPortProc:(NSString *)procedure 
 		withOptions:(NSArray *)options 
-		withVersion:(NSString *)version
+			version:(NSString *)version
 			  error:(NSError **)execError {
 	
 	NSString *opts, *v;
@@ -265,16 +265,16 @@
 
 #pragma mark -
 # pragma mark Exec methods 
-- (void)uninstallWithOptions:(NSArray *)options withVersion:(NSString *)version error:(NSError **)mError {
-	[self execPortProc:@"mportuninstall" withOptions:options withVersion:version error:mError];
+- (void)uninstallWithOptions:(NSArray *)options version:(NSString *)version error:(NSError **)mError {
+	[self execPortProc:@"mportuninstall" withOptions:options version:version error:mError];
 }
 
-- (void)activateWithOptions:(NSArray *)options withVersion:(NSString *)version error:(NSError **)mError {
-	[self execPortProc:@"mportactivate" withOptions:options withVersion:version error:mError];
+- (void)activateWithOptions:(NSArray *)options version:(NSString *)version error:(NSError **)mError {
+	[self execPortProc:@"mportactivate" withOptions:options version:version error:mError];
 }
 
-- (void)deactivateWithOptions:(NSArray *)options withVersion:(NSString *)version error:(NSError **)mError {
-	[self execPortProc:@"mportdeactivate" withOptions:options withVersion:version error:mError];
+- (void)deactivateWithOptions:(NSArray *)options version:(NSString *)version error:(NSError **)mError {
+	[self execPortProc:@"mportdeactivate" withOptions:options version:version error:mError];
 }
 
 -(void)configureWithOptions:(NSArray *)options variants:(NSArray *)variants error:(NSError **)mError {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080812/8e9e1451/attachment.html 


More information about the macports-changes mailing list