[39766] branches/gsoc08-framework/MacPorts_Framework_Release
armahg at macports.org
armahg at macports.org
Wed Sep 3 20:34:13 PDT 2008
Revision: 39766
http://trac.macports.org/changeset/39766
Author: armahg at macports.org
Date: 2008-09-03 20:34:12 -0700 (Wed, 03 Sep 2008)
Log Message:
-----------
More Code clean up
Modified Paths:
--------------
branches/gsoc08-framework/MacPorts_Framework_Release/BetterAuthorizationSampleLib.h
branches/gsoc08-framework/MacPorts_Framework_Release/MPHelperTool.m
branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.h
branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.m
branches/gsoc08-framework/MacPorts_Framework_Release/MacPorts.Framework.xcodeproj/project.pbxproj
Modified: branches/gsoc08-framework/MacPorts_Framework_Release/BetterAuthorizationSampleLib.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/BetterAuthorizationSampleLib.h 2008-09-04 01:45:00 UTC (rev 39765)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/BetterAuthorizationSampleLib.h 2008-09-04 03:34:12 UTC (rev 39766)
@@ -588,7 +588,7 @@
CFStringRef bundleID
);
-/*!
+/*
@function BASFixFailure
@abstract Installs, or reinstalls, the privileged helper tool.
Modified: branches/gsoc08-framework/MacPorts_Framework_Release/MPHelperTool.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MPHelperTool.m 2008-09-04 01:45:00 UTC (rev 39765)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MPHelperTool.m 2008-09-04 03:34:12 UTC (rev 39766)
@@ -182,78 +182,8 @@
return err;
}
-static int ConnectionOpen2(ConnectionRef *connPtr, const char * sockPath)
-// Opens a connection to the server.
-//
-// On entry, connPtr must not be NULL
-// On entry, *connPtr must be NULL
-// Returns an errno-style error code
-// On success, *connPtr will not be NULL
-// On error, *connPtr will be NULL
-{
- int err;
- ConnectionRef conn;
- Boolean sayGoodbye;
-
- assert( connPtr != NULL);
- assert(*connPtr == NULL);
-
- sayGoodbye = false;
-
- // Allocate a ConnectionState structure and fill out some basic fields.
-
- err = 0;
- conn = (ConnectionRef) calloc(1, sizeof(*conn));
- if (conn == NULL) {
- err = ENOMEM;
- }
- if (err == 0) {
- conn->fMagic = kConnectionStateMagic;
-
- // For clean up to work properly, we must make sure that, if
- // the connection record is allocated successfully, we always
- // set fSockFD to -1. So, while the following line is redundant
- // in the current code, it's present to press home this point.
-
- conn->fSockFD = -1;
- }
-
- // Create a UNIX domain socket and connect to the server.
-
- if (err == 0) {
- conn->fSockFD = socket(AF_UNIX, SOCK_STREAM, 0);
- err = MoreUNIXErrno(conn->fSockFD);
- }
- if (err == 0) {
- struct sockaddr_un connReq;
-
- connReq.sun_len = sizeof(connReq);
- connReq.sun_family = AF_UNIX;
- //strcpy(connReq.sun_path, kServerSocketPath);
- strcpy(connReq.sun_path, sockPath);
-
- err = connect(conn->fSockFD, (struct sockaddr *) &connReq, SUN_LEN(&connReq));
- err = MoreUNIXErrno(err);
-
- sayGoodbye = (err == 0);
- }
-
- // Clean up.
-
- if (err != 0) {
- ConnectionCloseInternal(conn, sayGoodbye);
- conn = NULL;
- }
- *connPtr = conn;
-
- assert( (err == 0) == (*connPtr != NULL) );
-
- return err;
-}
-
-
static int ConnectionOpen(ConnectionRef *connPtr)
// Opens a connection to the server.
//
Modified: branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.h 2008-09-04 01:45:00 UTC (rev 39765)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.h 2008-09-04 03:34:12 UTC (rev 39766)
@@ -193,11 +193,11 @@
/*!
@brief Sets the delegate for this MPMacPorts object
- @param mpDelegate The object to be set as the delegate
+ @param aDelegate The object to be set as the delegate
@Discussion Delegates of MPMacPorts may opt to implement -setAuthoriztionRef: .
See (add link here to class discussion section) for more details.
*/
-- (void)setDelegate:(id)delegate;
+- (void)setDelegate:(id)aDelegate;
/*!
@brief Determines whether certain port operations require privileges before exection
Modified: branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.m 2008-09-04 01:45:00 UTC (rev 39765)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MPMacPorts.m 2008-09-04 03:34:12 UTC (rev 39766)
@@ -48,7 +48,7 @@
- (id) initWithPkgPath:(NSString *)path {
if (self = [super init]) {
interpreter = [MPInterpreter sharedInterpreterWithPkgPath:path];
- [self registerForLocalNotifications];
+ //[self registerForLocalNotifications];
}
return self;
}
@@ -251,10 +251,10 @@
return macportsDelegate;
}
--(void) setDelegate:(id)delegate {
- [delegate retain];
+-(void) setDelegate:(id)aDelegate {
+ [aDelegate retain];
[macportsDelegate release];
- macportsDelegate = delegate;
+ macportsDelegate = aDelegate;
}
//Internal Method for setting our Authorization Reference
@@ -264,10 +264,6 @@
AuthorizationRef clientRef = (AuthorizationRef) [[self delegate] performSelector:@selector(getAuthorizationRef)];
[interpreter setAuthorizationRef:clientRef];
}
- //else { //I think i'll iniitalizeAuthorization lazily .. i.e. right
- //before using helper tool
-// [interpreter initializeAuthorization];
-// }
}
#pragma mark -
Modified: branches/gsoc08-framework/MacPorts_Framework_Release/MacPorts.Framework.xcodeproj/project.pbxproj
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MacPorts.Framework.xcodeproj/project.pbxproj 2008-09-04 01:45:00 UTC (rev 39765)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MacPorts.Framework.xcodeproj/project.pbxproj 2008-09-04 03:34:12 UTC (rev 39766)
@@ -88,6 +88,13 @@
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
remoteInfo = MacPorts;
};
+ 6E31A2890E6F7910002804D0 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = DFE353650CFB8F0C003BACFC;
+ remoteInfo = Docs;
+ };
6EC2608B0E4270110013BC48 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -514,6 +521,7 @@
dependencies = (
6ED12A530E3E55A50026773D /* PBXTargetDependency */,
6EC2608C0E4270110013BC48 /* PBXTargetDependency */,
+ 6E31A28A0E6F7910002804D0 /* PBXTargetDependency */,
);
name = MacPorts;
productInstallPath = "$(HOME)/Library/Frameworks";
@@ -686,6 +694,11 @@
target = 8DC2EF4F0486A6940098B216 /* MacPorts */;
targetProxy = 6E1AE8460E232D0700F6D7BC /* PBXContainerItemProxy */;
};
+ 6E31A28A0E6F7910002804D0 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = DFE353650CFB8F0C003BACFC /* Docs */;
+ targetProxy = 6E31A2890E6F7910002804D0 /* PBXContainerItemProxy */;
+ };
6EC2608C0E4270110013BC48 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 6EC260860E426FF10013BC48 /* MPHelperInstallTool */;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080903/58ce5a49/attachment-0001.html
More information about the macports-changes
mailing list