[39222] branches/gsoc08-framework/MacPorts_Framework_Release

armahg at macports.org armahg at macports.org
Tue Aug 12 12:37:53 PDT 2008


Revision: 39222
          http://trac.macosforge.org/projects/macports/changeset/39222
Author:   armahg at macports.org
Date:     2008-08-12 12:37:52 -0700 (Tue, 12 Aug 2008)
Log Message:
-----------
Removd MPInterPreterProtocol.h file. Removed commented out code from MPRegistry

Modified Paths:
--------------
    branches/gsoc08-framework/MacPorts_Framework_Release/MPRegistry.m
    branches/gsoc08-framework/MacPorts_Framework_Release/MacPorts.Framework.xcodeproj/project.pbxproj

Removed Paths:
-------------
    branches/gsoc08-framework/MacPorts_Framework_Release/MPInterpreterProtocol.h

Deleted: branches/gsoc08-framework/MacPorts_Framework_Release/MPInterpreterProtocol.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MPInterpreterProtocol.h	2008-08-12 19:31:09 UTC (rev 39221)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MPInterpreterProtocol.h	2008-08-12 19:37:52 UTC (rev 39222)
@@ -1,84 +0,0 @@
-/*
- *	$Id$
- *	MacPorts.Framework
- *
- *	Authors:
- *	George Armah <armahg at macports.org>
- *
- *	Copyright (c) 2008 George Armah <armahg at macports.org>
- *	All rights reserved.
- *
- *	Redistribution and use in source and binary forms, with or without
- *	modification, are permitted provided that the following conditions
- *	are met:
- *	1.	Redistributions of source code must retain the above copyright
- *		notice, this list of conditions and the following disclaimer.
- *	2.	Redistributions in binary form must reproduce the above copyright
- *		notice, this list of conditions and the following disclaimer in the
- *		documentation and/or other materials provided with the distribution.
- *	3.	Neither the name of the copyright owner nor the names of contributors
- *		may be used to endorse or promote products derived from this software
- *		without specific prior written permission.
- * 
- *	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *	AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *	IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *	ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- *	LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *	CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *	POSSIBILITY OF SUCH DAMAGE.
- */
-
-//MPInterpreter needs to be exposed (in a controlled manner)
-//to MPHelperTool. There are various reasons for doing this.
-
-//- The first is that, there is no way (that I know so far) to access
-//	the created Tcl interpreter from the Helper Tool. Even if we could
-//	access it, I doubt that the Notifications mechanism will still be
-//	able to work on a local level since MPHelperTool is a completely 
-//	different process. For this reason I am adopting the following
-//	strategy
-
-//	I'll illustrate with a port sync example. Note that all the necessary
-//	Distributed Objects stuff is assumed to have already been set up.
-//	1)	There is a [[MPMacPorts sharedInstance] sync] call
-//	2)	This calls an internal [interp evaluateStringWithMPHelperTool@"mportsync"]
-//		which then invokes MPHelperTool using BAS protocol. Passing the argument
-//		@"mportsync" within the request dictionary.
-//	3)	So now we are within MPHelperTool. We first obtain the vended of instance
-//		MPInterpreter (which invoked this all in the first place ... ha) and then
-//		call an this protocol's method [interp evaluateTclStringFromMPHelperTool: ]  
-//		This takes us back to
-//		MacPorts.Framework space where everything happens as expected and then
-//		(hopefully without any hiccups) returns the string result and error object.
-//	4)	Now we can put the string returned into the response dictionary and pass
-//		it back as the return value for the message passed in 2)
-//
-//	You can probably tell that the above solution is kind of clunky. But its a
-//	start. I'm not too worried about security being compromised since I am sure
-//	of what happens in MPInterpreter space. In any event, using this method is
-//	no more dangerous than running "sudo port -dv sync" from Terminal.
-//
-//	I am still thinking of a way to implement error handling within the new set up.
-//	One possiblity would be to have MPInterpreter's evaluateStringWithMPHelperTool:
-//	message do an internal NSError creation depending on whether or not the
-//	response dictionary contians a value for kNSError. This is going to be a 
-//	CFDictionaryRef object from which I'll have enough information to create
-//	a reasonably informative NSError object. Thats for later though .... for 
-//	now lets get basic functionally going first.
-
-#define MP_DOSERVER				@"MacPortsDistributedObjectServer"
-
- at protocol MPInterpreterProtocol
-
-- (bycopy NSString *)evaluateStringFromMPHelperTool:(in bycopy NSString *)statement;
-- (void) setTclCommand:(in bycopy NSString *)tclCmd;
-- (bycopy NSString *) getTclCommand;
-- (void) setTclCommandResult:(in bycopy NSString *)tclCmdResult;
-- (bycopy NSString *) getTclCommandResult;
-- (void) log:(in bycopy id)logOutput;
- at end

Modified: branches/gsoc08-framework/MacPorts_Framework_Release/MPRegistry.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MPRegistry.m	2008-08-12 19:31:09 UTC (rev 39221)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MPRegistry.m	2008-08-12 19:37:52 UTC (rev 39222)
@@ -117,21 +117,6 @@
 }
 
 - (NSArray *)installedAsArray:(NSString *)name withVersion:(NSString *)version {
-	/*
-	 return [interpreter arrayFromTclListAsString:[[interpreter evaluateArrayAsString:[NSArray arrayWithObjects:
-	 @"return [registry::installed",
-	 name,
-	 version,
-	 @"]",
-	 nil
-	 ]] objectForKey:TCL_RETURN_STRING]];
-	
-	return [interpreter arrayFromTclListAsString:
-			[[interpreter evaluateStringAsString:
-			  [NSString stringWithFormat:@"return [registry::installed %@ %@]", name, version]] 
-			 objectForKey:TCL_RETURN_STRING]];
-	*/
-	
 	NSError *anError;
 	NSString * result = [interpreter evaluateStringAsString:
 						 [NSString stringWithFormat:@"return [registry::installed %@ %@]", name, version]
@@ -148,20 +133,6 @@
 }
 
 - (NSArray *)filesForPort:(NSString *)name {
-	/*
-	return [interpreter arrayFromTclListAsString:
-			[[interpreter evaluateArrayAsString:[NSArray arrayWithObjects:
-												 @"return [registry::port_registered",
-												 name,
-												 @"]",
-												 nil]] 
-			 objectForKey:TCL_RETURN_STRING] ];
-	 
-	return [interpreter arrayFromTclListAsString:
-			[[interpreter evaluateStringAsString:
-			   [NSString stringWithFormat:@"return [registry::port_registered %@]", name]] 
-			 objectForKey:TCL_RETURN_STRING]];
-	*/
 	
 	NSError * anError;
 	NSString * result = [interpreter evaluateStringAsString:

Modified: branches/gsoc08-framework/MacPorts_Framework_Release/MacPorts.Framework.xcodeproj/project.pbxproj
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MacPorts.Framework.xcodeproj/project.pbxproj	2008-08-12 19:31:09 UTC (rev 39221)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MacPorts.Framework.xcodeproj/project.pbxproj	2008-08-12 19:37:52 UTC (rev 39222)
@@ -46,8 +46,6 @@
 		6EA294590E080DEB00902D12 /* MPMacPortsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E88D1CB0DF4B90B00684E9F /* MPMacPortsTest.m */; };
 		6EB6FA420E43ECCE0057962C /* MPHelperTool in Resources */ = {isa = PBXBuildFile; fileRef = 6ED12A4A0E3E552F0026773D /* MPHelperTool */; };
 		6EB6FA460E43ECD60057962C /* MPHelperInstallTool in Resources */ = {isa = PBXBuildFile; fileRef = 6EC260870E426FF10013BC48 /* MPHelperInstallTool */; };
-		6EB6FC6A0E45AC610057962C /* MPInterpreterProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EB6FC690E45AC610057962C /* MPInterpreterProtocol.h */; };
-		6EB6FC6B0E45AC610057962C /* MPInterpreterProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EB6FC690E45AC610057962C /* MPInterpreterProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		6EB6FC910E45DEA80057962C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EB6FC900E45DEA80057962C /* Foundation.framework */; };
 		6EC260730E426FC80013BC48 /* BetterAuthorizationSampleLib.c in Sources */ = {isa = PBXBuildFile; fileRef = 6EC260700E426FC80013BC48 /* BetterAuthorizationSampleLib.c */; };
 		6EC260740E426FC80013BC48 /* BetterAuthorizationSampleLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EC260710E426FC80013BC48 /* BetterAuthorizationSampleLib.h */; };
@@ -131,7 +129,6 @@
 		6E88D1CB0DF4B90B00684E9F /* MPMacPortsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMacPortsTest.m; sourceTree = "<group>"; };
 		6EA0F56E0DFEB55E00C15082 /* Tcl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tcl.framework; path = System/Library/Frameworks/Tcl.framework; sourceTree = SDKROOT; };
 		6EAFD8B70DEC614E00E97270 /* dummycommit.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dummycommit.test; sourceTree = "<group>"; };
-		6EB6FC690E45AC610057962C /* MPInterpreterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterpreterProtocol.h; sourceTree = "<group>"; };
 		6EB6FC900E45DEA80057962C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
 		6EC260700E426FC80013BC48 /* BetterAuthorizationSampleLib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BetterAuthorizationSampleLib.c; sourceTree = "<group>"; };
 		6EC260710E426FC80013BC48 /* BetterAuthorizationSampleLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BetterAuthorizationSampleLib.h; sourceTree = "<group>"; };
@@ -269,7 +266,6 @@
 				487679680C98C55E00577C59 /* MPPort.m */,
 				48F811BE0CE4636A009630DE /* MPRegistry.h */,
 				48F811BF0CE4638C009630DE /* MPRegistry.m */,
-				6EB6FC690E45AC610057962C /* MPInterpreterProtocol.h */,
 			);
 			name = Classes;
 			sourceTree = "<group>";
@@ -355,7 +351,6 @@
 			files = (
 				6EC260740E426FC80013BC48 /* BetterAuthorizationSampleLib.h in Headers */,
 				6EC260970E4272D20013BC48 /* MPHelperCommon.h in Headers */,
-				6EB6FC6A0E45AC610057962C /* MPInterpreterProtocol.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -374,7 +369,6 @@
 				6E270D090E158CED00BAE687 /* MPNotifications.h in Headers */,
 				6EC260770E426FC80013BC48 /* BetterAuthorizationSampleLib.h in Headers */,
 				6EC260990E4272D20013BC48 /* MPHelperCommon.h in Headers */,
-				6EB6FC6B0E45AC610057962C /* MPInterpreterProtocol.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080812/12c08661/attachment.html 


More information about the macports-changes mailing list