More socket work
[ITFoundation.git] / ITAppleEventCenter.m
index 54987cc..5f485e0 100755 (executable)
@@ -1,12 +1,6 @@
 #import "ITAppleEventCenter.h"
 
-Boolean MyAEIdleCallback (
-                                        EventRecord * theEvent,
-                                        SInt32 * sleepTime,
-                                        RgnHandle * mouseRgn
-                                        );
-
-Boolean MyAEIdleCallback (
+static Boolean MyAEIdleCallback (
                                         EventRecord * theEvent,
                                         SInt32 * sleepTime,
                                         RgnHandle * mouseRgn
@@ -70,7 +64,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, 0, &sendEvent, &buildError, sendString);
 
-    [self printCarbonDesc:&sendEvent];
+    //[self printCarbonDesc:&sendEvent];
 
     if (err) {
         //NSLog(@"%d:%d at \"%@\"",(int)buildError.fError,buildError.fErrorPos,[nssendString substringToIndex:buildError.fErrorPos]);
@@ -78,7 +72,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AESend(&sendEvent, &replyEvent, kAEWaitReply, kAENormalPriority, kNoTimeOut, idleUPP, NULL);
 
-    [self printCarbonDesc:&replyEvent];
+    //[self printCarbonDesc:&replyEvent];
 
     if (err) {
         //NSLog(@"Send Error: %i",err);
@@ -135,7 +129,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, 0, &sendEvent, &buildError, sendString);
 
-    [self printCarbonDesc:&sendEvent];
+    //[self printCarbonDesc:&sendEvent];
 
     if (err) {
         //NSLog(@"%d:%d at \"%@\"",(int)buildError.fError,buildError.fErrorPos,[nssendString substringToIndex:buildError.fErrorPos]);
@@ -143,7 +137,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AESend(&sendEvent, &replyEvent, kAEWaitReply, kAENormalPriority, kNoTimeOut, idleUPP, NULL);
 
-    [self printCarbonDesc:&replyEvent];
+    //[self printCarbonDesc:&replyEvent];
 
     if (err) {
         //NSLog(@"Send Error: %i",err);
@@ -201,7 +195,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, 0, &sendEvent, &buildError, sendString);
 
-    [self printCarbonDesc:&sendEvent];
+    //[self printCarbonDesc:&sendEvent];
 
     if (err) {
         //NSLog(@"%d:%d at \"%@\"",(int)buildError.fError,buildError.fErrorPos,[nssendString substringToIndex:buildError.fErrorPos]);
@@ -209,7 +203,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AESend(&sendEvent, &replyEvent, kAEWaitReply, kAENormalPriority, kNoTimeOut, idleUPP, NULL);
 
-    [self printCarbonDesc:&replyEvent];
+    //[self printCarbonDesc:&replyEvent];
 
     if (err) {
         //NSLog(@"Send Error: %i",err);
@@ -261,7 +255,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, 0, &sendEvent, &buildError, sendString);
 
-    [self printCarbonDesc:&sendEvent];
+    //[self printCarbonDesc:&sendEvent];
 
     if (err) {
         //NSLog(@"%d:%d at \"%@\"",(int)buildError.fError,buildError.fErrorPos,[nssendString substringToIndex:buildError.fErrorPos]);
@@ -269,7 +263,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AESend(&sendEvent, &replyEvent, kAEWaitReply, kAENormalPriority, kNoTimeOut, idleUPP, NULL);
 
-    [self printCarbonDesc:&replyEvent];
+    //[self printCarbonDesc:&replyEvent];
 
     if (err) {
         //NSLog(@"Send Error: %i",err);
@@ -327,7 +321,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, 0, &sendEvent, &buildError, sendString);
 
-    [self printCarbonDesc:&sendEvent];
+    //[self printCarbonDesc:&sendEvent];
 
     if (err) {
         //NSLog(@"%d:%d at \"%@\"",(int)buildError.fError,buildError.fErrorPos,[nssendString substringToIndex:buildError.fErrorPos]);
@@ -335,7 +329,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AESend(&sendEvent, &replyEvent, kAEWaitReply, kAENormalPriority, kNoTimeOut, idleUPP, NULL);
 
-    [self printCarbonDesc:&replyEvent];
+    //[self printCarbonDesc:&replyEvent];
 
     if (err) {
         //NSLog(@"Send Error: %i",err);
@@ -395,7 +389,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, 0, &sendEvent, &buildError, sendString);
 
-    [self printCarbonDesc:&sendEvent];
+    //[self printCarbonDesc:&sendEvent];
 
     if (err) {
         //NSLog(@"%d:%d at \"%@\"",(int)buildError.fError,buildError.fErrorPos,[buildString substringToIndex:buildError.fErrorPos]);
@@ -403,7 +397,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AESend(&sendEvent, &replyEvent, kAEWaitReply, kAENormalPriority, kNoTimeOut, idleUPP, NULL);
 
-    [self printCarbonDesc:&replyEvent];
+    //[self printCarbonDesc:&replyEvent];
 
     if (err) {
         //NSLog(@"Send Error: %i",err);
@@ -439,9 +433,9 @@ static ITAppleEventCenter *_sharedAECenter = nil;
     //AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, kAnyTransactionID, &event, nil, "");
     AECreateDesc(typeProcessSerialNumber,(ProcessSerialNumber*)&psn,sizeof(ProcessSerialNumber),&dest);
     AECreateAppleEvent(eClass,eID,&dest,kAutoGenerateReturnID,kAnyTransactionID,&event);
-[self printCarbonDesc:&event];
+//[self printCarbonDesc:&event];
     AESend(&event, &reply, kAENoReply, kAENormalPriority, kAEDefaultTimeout, idleUPP, nil);
-[self printCarbonDesc:&reply];
+//[self printCarbonDesc:&reply];
     AEDisposeDesc(&dest);
     AEDisposeDesc(&event);
     AEDisposeDesc(&reply);
@@ -450,7 +444,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 - (void)printCarbonDesc:(AEDesc*)desc {
     Handle xx;
     AEPrintDescToHandle(desc,&xx);
-    //NSLog(@"Handle: %s", *xx);
+    NSLog(@"Handle: %s", *xx);
     DisposeHandle(xx);
 }
 
@@ -475,7 +469,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, 0, &sendEvent, &buildError, sendString);
 
-    [self printCarbonDesc:&sendEvent];
+    //[self printCarbonDesc:&sendEvent];
 
     if (err) {
         //NSLog(@"%d:%d at \"%@\"",(int)buildError.fError,buildError.fErrorPos,[nssendString substringToIndex:buildError.fErrorPos]);
@@ -483,7 +477,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AESend(&sendEvent, &replyEvent, kAEWaitReply, kAENormalPriority, kNoTimeOut, idleUPP, NULL);
 
-    [self printCarbonDesc:&replyEvent];
+    //[self printCarbonDesc:&replyEvent];
 
     if (err) {
         //NSLog(@"Send Error: %i",err);
@@ -530,7 +524,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, 0, &sendEvent, &buildError, sendString);
 
-    [self printCarbonDesc:&sendEvent];
+    //[self printCarbonDesc:&sendEvent];
 
     if (err) {
         //NSLog(@"%d:%d at \"%@\"",(int)buildError.fError,buildError.fErrorPos,[string substringToIndex:buildError.fErrorPos]);
@@ -538,7 +532,7 @@ static ITAppleEventCenter *_sharedAECenter = nil;
 
     err = AESend(&sendEvent, &replyEvent, kAEWaitReply, kAENormalPriority, kNoTimeOut, idleUPP, NULL);
 
-    [self printCarbonDesc:&replyEvent];
+    //[self printCarbonDesc:&replyEvent];
 
     if (err) {
         //NSLog(@"Send Error: %i",err);
@@ -586,7 +580,7 @@ return result;
 
     err = AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, 0, &sendEvent, &buildError, sendString);
 
-    [self printCarbonDesc:&sendEvent];
+    //[self printCarbonDesc:&sendEvent];
 
     if (err) {
         //NSLog(@"%d:%d at \"%@\"",(int)buildError.fError,buildError.fErrorPos,[string substringToIndex:buildError.fErrorPos]);
@@ -594,7 +588,7 @@ return result;
 
     err = AESend(&sendEvent, &replyEvent, kAEWaitReply, kAENormalPriority, kNoTimeOut, idleUPP, NULL);
 
-    [self printCarbonDesc:&replyEvent];
+    //[self printCarbonDesc:&replyEvent];
 
     if (err) {
         //NSLog(@"Send Error: %i",err);