Best JavaScript code snippet using wpt
_metadata.py
Source:_metadata.py
1# This file is generated by objective.metadata2#3# Last update: Sat Oct 29 22:10:39 20164import objc, sys5if sys.maxsize > 2 ** 32:6 def sel32or64(a, b): return b7else:8 def sel32or64(a, b): return a9if sys.byteorder == 'little':10 def littleOrBig(a, b): return a11else:12 def littleOrBig(a, b): return b13misc = {14}15constants = '''$CKAccountChangedNotification$CKCurrentUserDefaultName$CKErrorDomain$CKErrorRetryAfterKey$CKOwnerDefaultName$CKPartialErrorsByItemIDKey$CKQueryOperationMaximumResults@Q$CKRecordChangedErrorAncestorRecordKey$CKRecordChangedErrorClientRecordKey$CKRecordChangedErrorServerRecordKey$CKRecordParentKey$CKRecordShareKey$CKRecordTypeShare$CKRecordTypeUserRecord$CKRecordZoneDefaultName$CKShareThumbnailImageDataKey$CKShareTitleKey$CKShareTypeKey$'''16enums = '''$CKAccountStatusAvailable@1$CKAccountStatusCouldNotDetermine@0$CKAccountStatusNoAccount@3$CKAccountStatusRestricted@2$CKApplicationPermissionStatusCouldNotComplete@1$CKApplicationPermissionStatusDenied@2$CKApplicationPermissionStatusGranted@3$CKApplicationPermissionStatusInitialState@0$CKApplicationPermissionUserDiscoverability@1$CKDatabaseScopePrivate@2$CKDatabaseScopePublic@1$CKDatabaseScopeShared@3$CKErrorAlreadyShared@30$CKErrorAssetFileModified@17$CKErrorAssetFileNotFound@16$CKErrorBadContainer@5$CKErrorBadDatabase@24$CKErrorBatchRequestFailed@22$CKErrorChangeTokenExpired@21$CKErrorConstraintViolation@19$CKErrorIncompatibleVersion@18$CKErrorInternalError@1$CKErrorInvalidArguments@12$CKErrorLimitExceeded@27$CKErrorManagedAccountRestricted@32$CKErrorMissingEntitlement@8$CKErrorNetworkFailure@4$CKErrorNetworkUnavailable@3$CKErrorNotAuthenticated@9$CKErrorOperationCancelled@20$CKErrorPartialFailure@2$CKErrorParticipantMayNeedVerification@33$CKErrorPermissionFailure@10$CKErrorQuotaExceeded@25$CKErrorReferenceViolation@31$CKErrorRequestRateLimited@7$CKErrorResultsTruncated@13$CKErrorServerRecordChanged@14$CKErrorServerRejectedRequest@15$CKErrorServiceUnavailable@6$CKErrorTooManyParticipants@29$CKErrorUnknownItem@11$CKErrorUserDeletedZone@28$CKErrorZoneBusy@23$CKErrorZoneNotFound@26$CKNotificationTypeDatabase@4$CKNotificationTypeQuery@1$CKNotificationTypeReadNotification@3$CKNotificationTypeRecordZone@2$CKQueryNotificationReasonRecordCreated@1$CKQueryNotificationReasonRecordDeleted@3$CKQueryNotificationReasonRecordUpdated@2$CKQuerySubscriptionOptionsFiresOnRecordCreation@1$CKQuerySubscriptionOptionsFiresOnRecordDeletion@4$CKQuerySubscriptionOptionsFiresOnRecordUpdate@2$CKQuerySubscriptionOptionsFiresOnce@8$CKRecordSaveAllKeys@2$CKRecordSaveChangedKeys@1$CKRecordSaveIfServerRecordUnchanged@0$CKRecordZoneCapabilityAtomic@2$CKRecordZoneCapabilityFetchChanges@1$CKRecordZoneCapabilitySharing@4$CKReferenceActionDeleteSelf@1$CKReferenceActionNone@0$CKShareParticipantAcceptanceStatusAccepted@2$CKShareParticipantAcceptanceStatusPending@1$CKShareParticipantAcceptanceStatusRemoved@3$CKShareParticipantAcceptanceStatusUnknown@0$CKShareParticipantPermissionNone@1$CKShareParticipantPermissionReadOnly@2$CKShareParticipantPermissionReadWrite@3$CKShareParticipantPermissionUnknown@0$CKShareParticipantTypeOwner@1$CKShareParticipantTypePrivateUser@3$CKShareParticipantTypePublicUser@4$CKShareParticipantTypeUnknown@0$CKSubscriptionOptionsFiresOnRecordCreation@1$CKSubscriptionOptionsFiresOnRecordDeletion@4$CKSubscriptionOptionsFiresOnRecordUpdate@2$CKSubscriptionOptionsFiresOnce@8$CKSubscriptionTypeDatabase@3$CKSubscriptionTypeQuery@1$CKSubscriptionTypeRecordZone@2$'''17misc.update({})18aliases = {'CK_UNIT_TESTS_EXTERN': 'CK_EXTERN'}19r = objc.registerMetaDataForSelector20objc._updatingMetadata(True)21try:22 r(b'CKAcceptSharesOperation', b'acceptSharesCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})23 r(b'CKAcceptSharesOperation', b'perShareCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}})24 r(b'CKAcceptSharesOperation', b'setAcceptSharesCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})25 r(b'CKAcceptSharesOperation', b'setPerShareCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}}})26 r(b'CKContainer', b'acceptShareMetadata:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})27 r(b'CKContainer', b'accountStatusWithCompletionHandler:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'q'}, 2: {'type': b'@'}}}}}})28 r(b'CKContainer', b'discoverAllContactUserInfosWithCompletionHandler:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})29 r(b'CKContainer', b'discoverUserInfoWithEmailAddress:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})30 r(b'CKContainer', b'discoverUserInfoWithUserRecordID:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})31 r(b'CKContainer', b'fetchAllLongLivedOperationIDsWithCompletionHandler:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}}})32 r(b'CKContainer', b'fetchLongLivedOperationWithID:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})33 r(b'CKContainer', b'fetchShareMetadataWithURL:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})34 r(b'CKContainer', b'fetchShareParticipantWithEmailAddress:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})35 r(b'CKContainer', b'fetchShareParticipantWithPhoneNumber:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})36 r(b'CKContainer', b'fetchShareParticipantWithUserRecordID:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})37 r(b'CKContainer', b'fetchUserRecordIDWithCompletionHandler:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})38 r(b'CKContainer', b'requestApplicationPermission:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'q'}, 2: {'type': b'@'}}}}}})39 r(b'CKContainer', b'statusForApplicationPermission:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'q'}, 2: {'type': b'@'}}}}}})40 r(b'CKDatabase', b'deleteRecordWithID:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})41 r(b'CKDatabase', b'deleteRecordZoneWithID:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})42 r(b'CKDatabase', b'deleteSubscriptionWithID:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})43 r(b'CKDatabase', b'fetchAllRecordZonesWithCompletionHandler:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})44 r(b'CKDatabase', b'fetchAllSubscriptionsWithCompletionHandler:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})45 r(b'CKDatabase', b'fetchRecordWithID:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})46 r(b'CKDatabase', b'fetchRecordZoneWithID:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})47 r(b'CKDatabase', b'fetchSubscriptionWithID:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})48 r(b'CKDatabase', b'performQuery:inZoneWithID:completionHandler:', {'arguments': {4: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})49 r(b'CKDatabase', b'saveRecord:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})50 r(b'CKDatabase', b'saveRecordZone:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})51 r(b'CKDatabase', b'saveSubscription:completionHandler:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})52 r(b'CKDiscoverAllContactsOperation', b'discoverAllContactsCompletionBlock', {'retval': {'callable': {'retval': {'type': b'@'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})53 r(b'CKDiscoverAllContactsOperation', b'setDiscoverAllContactsCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'@'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})54 r(b'CKDiscoverAllUserIdentitiesOperation', b'discoverAllUserIdentitiesCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})55 r(b'CKDiscoverAllUserIdentitiesOperation', b'setDiscoverAllUserIdentitiesCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})56 r(b'CKDiscoverAllUserIdentitiesOperation', b'setUserIdentityDiscoveredBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})57 r(b'CKDiscoverAllUserIdentitiesOperation', b'userIdentityDiscoveredBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})58 r(b'CKDiscoverUserIdentitiesOperation', b'discoverUserIdentitiesCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})59 r(b'CKDiscoverUserIdentitiesOperation', b'setDiscoverUserIdentitiesCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})60 r(b'CKDiscoverUserIdentitiesOperation', b'setUserIdentityDiscoveredBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})61 r(b'CKDiscoverUserIdentitiesOperation', b'userIdentityDiscoveredBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}})62 r(b'CKDiscoverUserInfosOperation', b'discoverUserInfosCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}})63 r(b'CKDiscoverUserInfosOperation', b'setDiscoverUserInfosCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}}})64 r(b'CKFetchDatabaseChangesOperation', b'changeTokenUpdatedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})65 r(b'CKFetchDatabaseChangesOperation', b'fetchAllChanges', {'retval': {'type': 'Z'}})66 r(b'CKFetchDatabaseChangesOperation', b'fetchDatabaseChangesCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'Z'}, 3: {'type': b'@'}}}}})67 r(b'CKFetchDatabaseChangesOperation', b'recordZoneWithIDChangedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})68 r(b'CKFetchDatabaseChangesOperation', b'recordZoneWithIDWasDeletedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})69 r(b'CKFetchDatabaseChangesOperation', b'setChangeTokenUpdatedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})70 r(b'CKFetchDatabaseChangesOperation', b'setFetchAllChanges:', {'arguments': {2: {'type': 'Z'}}})71 r(b'CKFetchDatabaseChangesOperation', b'setFetchDatabaseChangesCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'Z'}, 3: {'type': b'@'}}}}}})72 r(b'CKFetchDatabaseChangesOperation', b'setRecordZoneWithIDChangedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})73 r(b'CKFetchDatabaseChangesOperation', b'setRecordZoneWithIDWasDeletedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})74 r(b'CKFetchNotificationChangesOperation', b'fetchNotificationChangesCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}})75 r(b'CKFetchNotificationChangesOperation', b'moreComing', {'retval': {'type': b'Z'}})76 r(b'CKFetchNotificationChangesOperation', b'notificationChangedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})77 r(b'CKFetchNotificationChangesOperation', b'setFetchNotificationChangesCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})78 r(b'CKFetchNotificationChangesOperation', b'setNotificationChangedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})79 r(b'CKFetchRecordChangesOperation', b'fetchAllChanges', {'retval': {'type': 'Z'}})80 r(b'CKFetchRecordChangesOperation', b'fetchRecordChangesCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}})81 r(b'CKFetchRecordChangesOperation', b'moreComing', {'retval': {'type': b'Z'}})82 r(b'CKFetchRecordChangesOperation', b'perRecordProgressBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'd'}}}}})83 r(b'CKFetchRecordChangesOperation', b'recordChangedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})84 r(b'CKFetchRecordChangesOperation', b'recordWithIDWasDeletedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})85 r(b'CKFetchRecordChangesOperation', b'serverChangeTokenFetchedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})86 r(b'CKFetchRecordChangesOperation', b'setFetchAllChanges:', {'arguments': {2: {'type': 'Z'}}})87 r(b'CKFetchRecordChangesOperation', b'setFetchRecordChangesCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}}})88 r(b'CKFetchRecordChangesOperation', b'setPerRecordProgressBlock:', {'arguments': {4: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'd'}}}}}})89 r(b'CKFetchRecordChangesOperation', b'setRecordChangedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})90 r(b'CKFetchRecordChangesOperation', b'setRecordWithIDWasDeletedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})91 r(b'CKFetchRecordChangesOperation', b'setServerChangeTokenFetchedBlock:', {'arguments': {4: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})92 r(b'CKFetchRecordZoneChangesOperation', b'fetchAllChanges', {'retval': {'type': 'Z'}})93 r(b'CKFetchRecordZoneChangesOperation', b'fetchRecordZoneChangesCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})94 r(b'CKFetchRecordZoneChangesOperation', b'recordChangedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})95 r(b'CKFetchRecordZoneChangesOperation', b'recordWithIDWasDeletedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}})96 r(b'CKFetchRecordZoneChangesOperation', b'recordZoneChangeTokensUpdatedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}})97 r(b'CKFetchRecordZoneChangesOperation', b'recordZoneFetchCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}, 4: {'type': b'Z'}, 5: {'type': b'@'}}}}})98 r(b'CKFetchRecordZoneChangesOperation', b'setFetchAllChanges:', {'arguments': {2: {'type': 'Z'}}})99 r(b'CKFetchRecordZoneChangesOperation', b'setFetchRecordZoneChangesCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})100 r(b'CKFetchRecordZoneChangesOperation', b'setRecordChangedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})101 r(b'CKFetchRecordZoneChangesOperation', b'setRecordWithIDWasDeletedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})102 r(b'CKFetchRecordZoneChangesOperation', b'setRecordZoneChangeTokensUpdatedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}}})103 r(b'CKFetchRecordZoneChangesOperation', b'setRecordZoneFetchCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}, 4: {'type': b'Z'}, 5: {'type': b'@'}}}}}})104 r(b'CKFetchRecordZonesOperation', b'fetchRecordZonesCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}})105 r(b'CKFetchRecordZonesOperation', b'setFetchRecordZonesCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})106 r(b'CKFetchRecordsOperation', b'fetchRecordsCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}})107 r(b'CKFetchRecordsOperation', b'perRecordCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}})108 r(b'CKFetchRecordsOperation', b'perRecordProgressBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'd'}}}}})109 r(b'CKFetchRecordsOperation', b'setFetchRecordsCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})110 r(b'CKFetchRecordsOperation', b'setPerRecordCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}}})111 r(b'CKFetchRecordsOperation', b'setPerRecordProgressBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'd'}}}}}})112 r(b'CKFetchShareMetadataOperation', b'fetchShareMetadataCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})113 r(b'CKFetchShareMetadataOperation', b'perShareMetadataBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}})114 r(b'CKFetchShareMetadataOperation', b'setFetchShareMetadataCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})115 r(b'CKFetchShareMetadataOperation', b'setPerShareMetadataBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}}})116 r(b'CKFetchShareMetadataOperation', b'setShouldFetchRootRecord:', {'arguments': {2: {'type': 'Z'}}})117 r(b'CKFetchShareMetadataOperation', b'shouldFetchRootRecord', {'retval': {'type': 'Z'}})118 r(b'CKFetchShareParticipantsOperation', b'fetchShareParticipantsCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})119 r(b'CKFetchShareParticipantsOperation', b'setFetchShareParticipantsCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})120 r(b'CKFetchShareParticipantsOperation', b'setShareParticipantFetchedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})121 r(b'CKFetchShareParticipantsOperation', b'shareParticipantFetchedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})122 r(b'CKFetchSubscriptionsOperation', b'fetchSubscriptionCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}})123 r(b'CKFetchSubscriptionsOperation', b'setFetchSubscriptionCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})124 r(b'CKFetchWebAuthTokenOperation', b'fetchWebAuthTokenCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}})125 r(b'CKFetchWebAuthTokenOperation', b'setFetchWebAuthTokenCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})126 r(b'CKMarkNotificationsReadOperation', b'markNotificationsReadCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}})127 r(b'CKMarkNotificationsReadOperation', b'setMarkNotificationsReadCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})128 r(b'CKModifyBadgeOperation', b'modifyBadgeCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})129 r(b'CKModifyBadgeOperation', b'setModifyBadgeCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})130 r(b'CKModifyRecordZonesOperation', b'modifyRecordZonesCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}})131 r(b'CKModifyRecordZonesOperation', b'setModifyRecordZonesCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}}})132 r(b'CKModifyRecordsOperation', b'atomic', {'retval': {'type': b'Z'}})133 r(b'CKModifyRecordsOperation', b'modifyRecordsCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}})134 r(b'CKModifyRecordsOperation', b'perRecordCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})135 r(b'CKModifyRecordsOperation', b'perRecordProgressBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'd'}}}}})136 r(b'CKModifyRecordsOperation', b'setAtomic:', {'arguments': {2: {'type': b'Z'}}})137 r(b'CKModifyRecordsOperation', b'setModifyRecordsCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}}})138 r(b'CKModifyRecordsOperation', b'setPerRecordCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})139 r(b'CKModifyRecordsOperation', b'setPerRecordProgressBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'd'}}}}}})140 r(b'CKModifySubscriptionsOperation', b'modifySubscriptionsCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}})141 r(b'CKModifySubscriptionsOperation', b'setModifySubscriptionsCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}, 3: {'type': b'@'}}}}}})142 r(b'CKNotification', b'isPruned', {'retval': {'type': b'Z'}})143 r(b'CKNotificationInfo', b'setShouldBadge:', {'arguments': {2: {'type': b'Z'}}})144 r(b'CKNotificationInfo', b'setShouldSendContentAvailable:', {'arguments': {2: {'type': b'Z'}}})145 r(b'CKNotificationInfo', b'shouldBadge', {'retval': {'type': b'Z'}})146 r(b'CKNotificationInfo', b'shouldSendContentAvailable', {'retval': {'type': b'Z'}})147 r(b'CKOperation', b'allowsCellularAccess', {'retval': {'type': b'Z'}})148 r(b'CKOperation', b'isLongLived', {'retval': {'type': 'Z'}})149 r(b'CKOperation', b'longLivedOperationWasPersistedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}}}}})150 r(b'CKOperation', b'setAllowsCellularAccess:', {'arguments': {2: {'type': b'Z'}}})151 r(b'CKOperation', b'setLongLived:', {'arguments': {2: {'type': 'Z'}}})152 r(b'CKOperation', b'setLongLivedOperationWasPersistedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}}}}}})153 r(b'CKOperation', b'setUsesBackgroundSession:', {'arguments': {2: {'type': b'Z'}}})154 r(b'CKOperation', b'usesBackgroundSession', {'retval': {'type': b'Z'}})155 r(b'CKQueryNotification', b'isPublicDatabase', {'retval': {'type': b'Z'}})156 r(b'CKQueryOperation', b'queryCompletionBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}})157 r(b'CKQueryOperation', b'recordFetchedBlock', {'retval': {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}})158 r(b'CKQueryOperation', b'setQueryCompletionBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'@'}}}}}})159 r(b'CKQueryOperation', b'setRecordFetchedBlock:', {'arguments': {2: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})160 r(b'CKUserIdentity', b'hasiCloudAccount', {'retval': {'type': 'Z'}})161finally:162 objc._updatingMetadata(False)163expressions = {}...
WorldWideWeb_suite.py
Source:WorldWideWeb_suite.py
1"""Suite WorldWideWeb suite, as defined in Spyglass spec.:2Level 1, version 13Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa24AETE/AEUT resource version 1/0, language 0, script 05"""6import aetools7import MacOS8_code = 'WWW!'9class WorldWideWeb_suite_Events:10 _argmap_OpenURL = {11 'to' : 'INTO',12 'toWindow' : 'WIND',13 'flags' : 'FLGS',14 'post_data' : 'POST',15 'post_type' : 'MIME',16 'progressApp' : 'PROG',17 }18 def OpenURL(self, _object, _attributes={}, **_arguments):19 """OpenURL: Opens a URL. Allows for more options than GetURL event20 Required argument: URL21 Keyword argument to: file destination22 Keyword argument toWindow: window iD23 Keyword argument flags: Binary: any combination of 1, 2 and 4 is allowed: 1 and 2 mean force reload the document. 4 is ignored24 Keyword argument post_data: Form posting data25 Keyword argument post_type: MIME type of the posting data. Defaults to application/x-www-form-urlencoded26 Keyword argument progressApp: Application that will display progress27 Keyword argument _attributes: AppleEvent attribute dictionary28 Returns: ID of the loading window29 """30 _code = 'WWW!'31 _subcode = 'OURL'32 aetools.keysubst(_arguments, self._argmap_OpenURL)33 _arguments['----'] = _object34 _reply, _arguments, _attributes = self.send(_code, _subcode,35 _arguments, _attributes)36 if _arguments.get('errn', 0):37 raise aetools.Error, aetools.decodeerror(_arguments)38 # XXXX Optionally decode result39 if _arguments.has_key('----'):40 return _arguments['----']41 _argmap_ShowFile = {42 'MIME_type' : 'MIME',43 'Window_ID' : 'WIND',44 'URL' : 'URL ',45 }46 def ShowFile(self, _object, _attributes={}, **_arguments):47 """ShowFile: Similar to OpenDocuments, except that it specifies the parent URL, and MIME type of the file48 Required argument: File to open49 Keyword argument MIME_type: MIME type50 Keyword argument Window_ID: Window to open the file in51 Keyword argument URL: Use this as a base URL52 Keyword argument _attributes: AppleEvent attribute dictionary53 Returns: Window ID of the loaded window. 0 means ShowFile failed, FFFFFFF means that data was not appropriate type to display in the browser.54 """55 _code = 'WWW!'56 _subcode = 'SHWF'57 aetools.keysubst(_arguments, self._argmap_ShowFile)58 _arguments['----'] = _object59 _reply, _arguments, _attributes = self.send(_code, _subcode,60 _arguments, _attributes)61 if _arguments.get('errn', 0):62 raise aetools.Error, aetools.decodeerror(_arguments)63 # XXXX Optionally decode result64 if _arguments.has_key('----'):65 return _arguments['----']66 _argmap_cancel_progress = {67 'in_window' : 'WIND',68 }69 def cancel_progress(self, _object=None, _attributes={}, **_arguments):70 """cancel progress: Interrupts the download of the document in the given window71 Required argument: progress ID, obtained from the progress app72 Keyword argument in_window: window ID of the progress to cancel73 Keyword argument _attributes: AppleEvent attribute dictionary74 """75 _code = 'WWW!'76 _subcode = 'CNCL'77 aetools.keysubst(_arguments, self._argmap_cancel_progress)78 _arguments['----'] = _object79 _reply, _arguments, _attributes = self.send(_code, _subcode,80 _arguments, _attributes)81 if _arguments.get('errn', 0):82 raise aetools.Error, aetools.decodeerror(_arguments)83 # XXXX Optionally decode result84 if _arguments.has_key('----'):85 return _arguments['----']86 def find_URL(self, _object, _attributes={}, **_arguments):87 """find URL: If the file was downloaded by Netscape, you can call FindURL to find out the URL used to download the file.88 Required argument: File spec89 Keyword argument _attributes: AppleEvent attribute dictionary90 Returns: The URL91 """92 _code = 'WWW!'93 _subcode = 'FURL'94 if _arguments: raise TypeError, 'No optional args expected'95 _arguments['----'] = _object96 _reply, _arguments, _attributes = self.send(_code, _subcode,97 _arguments, _attributes)98 if _arguments.get('errn', 0):99 raise aetools.Error, aetools.decodeerror(_arguments)100 # XXXX Optionally decode result101 if _arguments.has_key('----'):102 return _arguments['----']103 def get_window_info(self, _object=None, _attributes={}, **_arguments):104 """get window info: Returns the information about the window as a list. Currently the list contains the window title and the URL. You can get the same information using standard Apple Event GetProperty.105 Required argument: window ID106 Keyword argument _attributes: AppleEvent attribute dictionary107 Returns: undocumented, typecode 'list'108 """109 _code = 'WWW!'110 _subcode = 'WNFO'111 if _arguments: raise TypeError, 'No optional args expected'112 _arguments['----'] = _object113 _reply, _arguments, _attributes = self.send(_code, _subcode,114 _arguments, _attributes)115 if _arguments.get('errn', 0):116 raise aetools.Error, aetools.decodeerror(_arguments)117 # XXXX Optionally decode result118 if _arguments.has_key('----'):119 return _arguments['----']120 def list_windows(self, _no_object=None, _attributes={}, **_arguments):121 """list windows: Lists the IDs of all the hypertext windows122 Keyword argument _attributes: AppleEvent attribute dictionary123 Returns: List of unique IDs of all the hypertext windows124 """125 _code = 'WWW!'126 _subcode = 'LSTW'127 if _arguments: raise TypeError, 'No optional args expected'128 if _no_object is not None: raise TypeError, 'No direct arg expected'129 _reply, _arguments, _attributes = self.send(_code, _subcode,130 _arguments, _attributes)131 if _arguments.get('errn', 0):132 raise aetools.Error, aetools.decodeerror(_arguments)133 # XXXX Optionally decode result134 if _arguments.has_key('----'):135 return _arguments['----']136 _argmap_parse_anchor = {137 'relative_to' : 'RELA',138 }139 def parse_anchor(self, _object, _attributes={}, **_arguments):140 """parse anchor: Resolves the relative URL141 Required argument: Main URL142 Keyword argument relative_to: Relative URL143 Keyword argument _attributes: AppleEvent attribute dictionary144 Returns: Parsed URL145 """146 _code = 'WWW!'147 _subcode = 'PRSA'148 aetools.keysubst(_arguments, self._argmap_parse_anchor)149 _arguments['----'] = _object150 _reply, _arguments, _attributes = self.send(_code, _subcode,151 _arguments, _attributes)152 if _arguments.get('errn', 0):153 raise aetools.Error, aetools.decodeerror(_arguments)154 # XXXX Optionally decode result155 if _arguments.has_key('----'):156 return _arguments['----']157 def register_URL_echo(self, _object=None, _attributes={}, **_arguments):158 """register URL echo: Registers the \xd2echo\xd3 application. Each download from now on will be echoed to this application.159 Required argument: Application signature160 Keyword argument _attributes: AppleEvent attribute dictionary161 """162 _code = 'WWW!'163 _subcode = 'RGUE'164 if _arguments: raise TypeError, 'No optional args expected'165 _arguments['----'] = _object166 _reply, _arguments, _attributes = self.send(_code, _subcode,167 _arguments, _attributes)168 if _arguments.get('errn', 0):169 raise aetools.Error, aetools.decodeerror(_arguments)170 # XXXX Optionally decode result171 if _arguments.has_key('----'):172 return _arguments['----']173 _argmap_register_protocol = {174 'for_protocol' : 'PROT',175 }176 def register_protocol(self, _object=None, _attributes={}, **_arguments):177 """register protocol: Registers application as a \xd2handler\xd3 for this protocol with a given prefix. The handler will receive \xd2OpenURL\xd3, or if that fails, \xd2GetURL\xd3 event.178 Required argument: Application sig179 Keyword argument for_protocol: protocol prefix: \xd2finger:\xd3, \xd2file\xd3,180 Keyword argument _attributes: AppleEvent attribute dictionary181 Returns: TRUE if registration has been successful182 """183 _code = 'WWW!'184 _subcode = 'RGPR'185 aetools.keysubst(_arguments, self._argmap_register_protocol)186 _arguments['----'] = _object187 _reply, _arguments, _attributes = self.send(_code, _subcode,188 _arguments, _attributes)189 if _arguments.get('errn', 0):190 raise aetools.Error, aetools.decodeerror(_arguments)191 # XXXX Optionally decode result192 if _arguments.has_key('----'):193 return _arguments['----']194 _argmap_register_viewer = {195 'MIME_type' : 'MIME',196 'with_file_type' : 'FTYP',197 }198 def register_viewer(self, _object, _attributes={}, **_arguments):199 """register viewer: Registers an application as a \xd4special\xd5 viewer for this MIME type. The application will be launched with ViewDoc events200 Required argument: Application sig201 Keyword argument MIME_type: MIME type viewer is registering for202 Keyword argument with_file_type: Mac file type for the downloaded files203 Keyword argument _attributes: AppleEvent attribute dictionary204 Returns: TRUE if registration has been successful205 """206 _code = 'WWW!'207 _subcode = 'RGVW'208 aetools.keysubst(_arguments, self._argmap_register_viewer)209 _arguments['----'] = _object210 _reply, _arguments, _attributes = self.send(_code, _subcode,211 _arguments, _attributes)212 if _arguments.get('errn', 0):213 raise aetools.Error, aetools.decodeerror(_arguments)214 # XXXX Optionally decode result215 if _arguments.has_key('----'):216 return _arguments['----']217 _argmap_register_window_close = {218 'for_window' : 'WIND',219 }220 def register_window_close(self, _object=None, _attributes={}, **_arguments):221 """register window close: Netscape will notify registered application when this window closes222 Required argument: Application signature223 Keyword argument for_window: window ID224 Keyword argument _attributes: AppleEvent attribute dictionary225 Returns: true if successful226 """227 _code = 'WWW!'228 _subcode = 'RGWC'229 aetools.keysubst(_arguments, self._argmap_register_window_close)230 _arguments['----'] = _object231 _reply, _arguments, _attributes = self.send(_code, _subcode,232 _arguments, _attributes)233 if _arguments.get('errn', 0):234 raise aetools.Error, aetools.decodeerror(_arguments)235 # XXXX Optionally decode result236 if _arguments.has_key('----'):237 return _arguments['----']238 def unregister_URL_echo(self, _object, _attributes={}, **_arguments):239 """unregister URL echo: cancels URL echo240 Required argument: application signature241 Keyword argument _attributes: AppleEvent attribute dictionary242 """243 _code = 'WWW!'244 _subcode = 'UNRU'245 if _arguments: raise TypeError, 'No optional args expected'246 _arguments['----'] = _object247 _reply, _arguments, _attributes = self.send(_code, _subcode,248 _arguments, _attributes)249 if _arguments.get('errn', 0):250 raise aetools.Error, aetools.decodeerror(_arguments)251 # XXXX Optionally decode result252 if _arguments.has_key('----'):253 return _arguments['----']254 _argmap_unregister_protocol = {255 'for_protocol' : 'PROT',256 }257 def unregister_protocol(self, _object=None, _attributes={}, **_arguments):258 """unregister protocol: reverses the effects of \xd2register protocol\xd3259 Required argument: Application sig.260 Keyword argument for_protocol: protocol prefix. If none, unregister for all protocols261 Keyword argument _attributes: AppleEvent attribute dictionary262 Returns: TRUE if successful263 """264 _code = 'WWW!'265 _subcode = 'UNRP'266 aetools.keysubst(_arguments, self._argmap_unregister_protocol)267 _arguments['----'] = _object268 _reply, _arguments, _attributes = self.send(_code, _subcode,269 _arguments, _attributes)270 if _arguments.get('errn', 0):271 raise aetools.Error, aetools.decodeerror(_arguments)272 # XXXX Optionally decode result273 if _arguments.has_key('----'):274 return _arguments['----']275 _argmap_unregister_viewer = {276 'MIME_type' : 'MIME',277 }278 def unregister_viewer(self, _object, _attributes={}, **_arguments):279 """unregister viewer: Revert to the old way of handling this MIME type280 Required argument: Application sig281 Keyword argument MIME_type: MIME type to be unregistered282 Keyword argument _attributes: AppleEvent attribute dictionary283 Returns: TRUE if the event was successful284 """285 _code = 'WWW!'286 _subcode = 'UNRV'287 aetools.keysubst(_arguments, self._argmap_unregister_viewer)288 _arguments['----'] = _object289 _reply, _arguments, _attributes = self.send(_code, _subcode,290 _arguments, _attributes)291 if _arguments.get('errn', 0):292 raise aetools.Error, aetools.decodeerror(_arguments)293 # XXXX Optionally decode result294 if _arguments.has_key('----'):295 return _arguments['----']296 _argmap_unregister_window_close = {297 'for_window' : 'WIND',298 }299 def unregister_window_close(self, _object=None, _attributes={}, **_arguments):300 """unregister window close: Undo for register window close301 Required argument: Application signature302 Keyword argument for_window: window ID303 Keyword argument _attributes: AppleEvent attribute dictionary304 Returns: true if successful305 """306 _code = 'WWW!'307 _subcode = 'UNRC'308 aetools.keysubst(_arguments, self._argmap_unregister_window_close)309 _arguments['----'] = _object310 _reply, _arguments, _attributes = self.send(_code, _subcode,311 _arguments, _attributes)312 if _arguments.get('errn', 0):313 raise aetools.Error, aetools.decodeerror(_arguments)314 # XXXX Optionally decode result315 if _arguments.has_key('----'):316 return _arguments['----']317 def webActivate(self, _object=None, _attributes={}, **_arguments):318 """webActivate: Makes Netscape the frontmost application, and selects a given window. This event is here for suite completeness/ cross-platform compatibility only, you should use standard AppleEvents instead.319 Required argument: window to bring to front320 Keyword argument _attributes: AppleEvent attribute dictionary321 """322 _code = 'WWW!'323 _subcode = 'ACTV'324 if _arguments: raise TypeError, 'No optional args expected'325 _arguments['----'] = _object326 _reply, _arguments, _attributes = self.send(_code, _subcode,327 _arguments, _attributes)328 if _arguments.get('errn', 0):329 raise aetools.Error, aetools.decodeerror(_arguments)330 # XXXX Optionally decode result331 if _arguments.has_key('----'):332 return _arguments['----']333#334# Indices of types declared in this module335#336_classdeclarations = {337}338_propdeclarations = {339}340_compdeclarations = {341}342_enumdeclarations = {...
Standard_Suite.py
Source:Standard_Suite.py
1"""Suite Standard Suite: Common terms that most applications should support2Level 1, version 13Generated from /System/Library/CoreServices/Finder.app4AETE/AEUT resource version 0/144, language 0, script 05"""6import aetools7import MacOS8_code = 'CoRe'9from StdSuites.Standard_Suite import *10class Standard_Suite_Events(Standard_Suite_Events):11 def close(self, _object, _attributes={}, **_arguments):12 """close: Close an object13 Required argument: the object to close14 Keyword argument _attributes: AppleEvent attribute dictionary15 """16 _code = 'core'17 _subcode = 'clos'18 if _arguments: raise TypeError, 'No optional args expected'19 _arguments['----'] = _object20 _reply, _arguments, _attributes = self.send(_code, _subcode,21 _arguments, _attributes)22 if _arguments.get('errn', 0):23 raise aetools.Error, aetools.decodeerror(_arguments)24 # XXXX Optionally decode result25 if _arguments.has_key('----'):26 return _arguments['----']27 _argmap_count = {28 'each' : 'kocl',29 }30 def count(self, _object, _attributes={}, **_arguments):31 """count: Return the number of elements of a particular class within an object32 Required argument: the object whose elements are to be counted33 Keyword argument each: the class of the elements to be counted34 Keyword argument _attributes: AppleEvent attribute dictionary35 Returns: the number of elements36 """37 _code = 'core'38 _subcode = 'cnte'39 aetools.keysubst(_arguments, self._argmap_count)40 _arguments['----'] = _object41 _reply, _arguments, _attributes = self.send(_code, _subcode,42 _arguments, _attributes)43 if _arguments.get('errn', 0):44 raise aetools.Error, aetools.decodeerror(_arguments)45 # XXXX Optionally decode result46 if _arguments.has_key('----'):47 return _arguments['----']48 _argmap_data_size = {49 'as' : 'rtyp',50 }51 def data_size(self, _object, _attributes={}, **_arguments):52 """data size: Return the size in bytes of an object53 Required argument: the object whose data size is to be returned54 Keyword argument as: the data type for which the size is calculated55 Keyword argument _attributes: AppleEvent attribute dictionary56 Returns: the size of the object in bytes57 """58 _code = 'core'59 _subcode = 'dsiz'60 aetools.keysubst(_arguments, self._argmap_data_size)61 _arguments['----'] = _object62 _reply, _arguments, _attributes = self.send(_code, _subcode,63 _arguments, _attributes)64 if _arguments.get('errn', 0):65 raise aetools.Error, aetools.decodeerror(_arguments)66 # XXXX Optionally decode result67 if _arguments.has_key('----'):68 return _arguments['----']69 def delete(self, _object, _attributes={}, **_arguments):70 """delete: Move an item from its container to the trash71 Required argument: the item to delete72 Keyword argument _attributes: AppleEvent attribute dictionary73 Returns: to the item that was just deleted74 """75 _code = 'core'76 _subcode = 'delo'77 if _arguments: raise TypeError, 'No optional args expected'78 _arguments['----'] = _object79 _reply, _arguments, _attributes = self.send(_code, _subcode,80 _arguments, _attributes)81 if _arguments.get('errn', 0):82 raise aetools.Error, aetools.decodeerror(_arguments)83 # XXXX Optionally decode result84 if _arguments.has_key('----'):85 return _arguments['----']86 _argmap_duplicate = {87 'to' : 'insh',88 'replacing' : 'alrp',89 'routing_suppressed' : 'rout',90 }91 def duplicate(self, _object, _attributes={}, **_arguments):92 """duplicate: Duplicate one or more object(s)93 Required argument: the object(s) to duplicate94 Keyword argument to: the new location for the object(s)95 Keyword argument replacing: Specifies whether or not to replace items in the destination that have the same name as items being duplicated96 Keyword argument routing_suppressed: Specifies whether or not to autoroute items (default is false). Only applies when copying to the system folder.97 Keyword argument _attributes: AppleEvent attribute dictionary98 Returns: to the duplicated object(s)99 """100 _code = 'core'101 _subcode = 'clon'102 aetools.keysubst(_arguments, self._argmap_duplicate)103 _arguments['----'] = _object104 aetools.enumsubst(_arguments, 'alrp', _Enum_bool)105 aetools.enumsubst(_arguments, 'rout', _Enum_bool)106 _reply, _arguments, _attributes = self.send(_code, _subcode,107 _arguments, _attributes)108 if _arguments.get('errn', 0):109 raise aetools.Error, aetools.decodeerror(_arguments)110 # XXXX Optionally decode result111 if _arguments.has_key('----'):112 return _arguments['----']113 def exists(self, _object, _attributes={}, **_arguments):114 """exists: Verify if an object exists115 Required argument: the object in question116 Keyword argument _attributes: AppleEvent attribute dictionary117 Returns: true if it exists, false if not118 """119 _code = 'core'120 _subcode = 'doex'121 if _arguments: raise TypeError, 'No optional args expected'122 _arguments['----'] = _object123 _reply, _arguments, _attributes = self.send(_code, _subcode,124 _arguments, _attributes)125 if _arguments.get('errn', 0):126 raise aetools.Error, aetools.decodeerror(_arguments)127 # XXXX Optionally decode result128 if _arguments.has_key('----'):129 return _arguments['----']130 _argmap_make = {131 'new' : 'kocl',132 'at' : 'insh',133 'to' : 'to ',134 'with_properties' : 'prdt',135 }136 def make(self, _no_object=None, _attributes={}, **_arguments):137 """make: Make a new element138 Keyword argument new: the class of the new element139 Keyword argument at: the location at which to insert the element140 Keyword argument to: when creating an alias file, the original item to create an alias to or when creating a file viewer window, the target of the window141 Keyword argument with_properties: the initial values for the properties of the element142 Keyword argument _attributes: AppleEvent attribute dictionary143 Returns: to the new object(s)144 """145 _code = 'core'146 _subcode = 'crel'147 aetools.keysubst(_arguments, self._argmap_make)148 if _no_object is not None: raise TypeError, 'No direct arg expected'149 _reply, _arguments, _attributes = self.send(_code, _subcode,150 _arguments, _attributes)151 if _arguments.get('errn', 0):152 raise aetools.Error, aetools.decodeerror(_arguments)153 # XXXX Optionally decode result154 if _arguments.has_key('----'):155 return _arguments['----']156 _argmap_move = {157 'to' : 'insh',158 'replacing' : 'alrp',159 'positioned_at' : 'mvpl',160 'routing_suppressed' : 'rout',161 }162 def move(self, _object, _attributes={}, **_arguments):163 """move: Move object(s) to a new location164 Required argument: the object(s) to move165 Keyword argument to: the new location for the object(s)166 Keyword argument replacing: Specifies whether or not to replace items in the destination that have the same name as items being moved167 Keyword argument positioned_at: Gives a list (in local window coordinates) of positions for the destination items168 Keyword argument routing_suppressed: Specifies whether or not to autoroute items (default is false). Only applies when moving to the system folder.169 Keyword argument _attributes: AppleEvent attribute dictionary170 Returns: to the object(s) after they have been moved171 """172 _code = 'core'173 _subcode = 'move'174 aetools.keysubst(_arguments, self._argmap_move)175 _arguments['----'] = _object176 aetools.enumsubst(_arguments, 'alrp', _Enum_bool)177 aetools.enumsubst(_arguments, 'mvpl', _Enum_list)178 aetools.enumsubst(_arguments, 'rout', _Enum_bool)179 _reply, _arguments, _attributes = self.send(_code, _subcode,180 _arguments, _attributes)181 if _arguments.get('errn', 0):182 raise aetools.Error, aetools.decodeerror(_arguments)183 # XXXX Optionally decode result184 if _arguments.has_key('----'):185 return _arguments['----']186 _argmap_open = {187 'using' : 'usin',188 'with_properties' : 'prdt',189 }190 def open(self, _object, _attributes={}, **_arguments):191 """open: Open the specified object(s)192 Required argument: list of objects to open193 Keyword argument using: the application file to open the object with194 Keyword argument with_properties: the initial values for the properties, to be included with the open command sent to the application that opens the direct object195 Keyword argument _attributes: AppleEvent attribute dictionary196 """197 _code = 'aevt'198 _subcode = 'odoc'199 aetools.keysubst(_arguments, self._argmap_open)200 _arguments['----'] = _object201 _reply, _arguments, _attributes = self.send(_code, _subcode,202 _arguments, _attributes)203 if _arguments.get('errn', 0):204 raise aetools.Error, aetools.decodeerror(_arguments)205 # XXXX Optionally decode result206 if _arguments.has_key('----'):207 return _arguments['----']208 _argmap_print_ = {209 'with_properties' : 'prdt',210 }211 def print_(self, _object, _attributes={}, **_arguments):212 """print: Print the specified object(s)213 Required argument: list of objects to print214 Keyword argument with_properties: optional properties to be included with the print command sent to the application that prints the direct object215 Keyword argument _attributes: AppleEvent attribute dictionary216 """217 _code = 'aevt'218 _subcode = 'pdoc'219 aetools.keysubst(_arguments, self._argmap_print_)220 _arguments['----'] = _object221 _reply, _arguments, _attributes = self.send(_code, _subcode,222 _arguments, _attributes)223 if _arguments.get('errn', 0):224 raise aetools.Error, aetools.decodeerror(_arguments)225 # XXXX Optionally decode result226 if _arguments.has_key('----'):227 return _arguments['----']228 def quit(self, _no_object=None, _attributes={}, **_arguments):229 """quit: Quit the Finder230 Keyword argument _attributes: AppleEvent attribute dictionary231 """232 _code = 'aevt'233 _subcode = 'quit'234 if _arguments: raise TypeError, 'No optional args expected'235 if _no_object is not None: raise TypeError, 'No direct arg expected'236 _reply, _arguments, _attributes = self.send(_code, _subcode,237 _arguments, _attributes)238 if _arguments.get('errn', 0):239 raise aetools.Error, aetools.decodeerror(_arguments)240 # XXXX Optionally decode result241 if _arguments.has_key('----'):242 return _arguments['----']243 def select(self, _object, _attributes={}, **_arguments):244 """select: Select the specified object(s)245 Required argument: the object to select246 Keyword argument _attributes: AppleEvent attribute dictionary247 """248 _code = 'misc'249 _subcode = 'slct'250 if _arguments: raise TypeError, 'No optional args expected'251 _arguments['----'] = _object252 _reply, _arguments, _attributes = self.send(_code, _subcode,253 _arguments, _attributes)254 if _arguments.get('errn', 0):255 raise aetools.Error, aetools.decodeerror(_arguments)256 # XXXX Optionally decode result257 if _arguments.has_key('----'):258 return _arguments['----']259_Enum_list = None # XXXX enum list not found!!260_Enum_bool = None # XXXX enum bool not found!!261#262# Indices of types declared in this module263#264_classdeclarations = {265}266_propdeclarations = {267}268_compdeclarations = {269}270_enumdeclarations = {...
Mozilla_suite.py
Source:Mozilla_suite.py
1"""Suite Mozilla suite: Experimental Mozilla suite2Level 1, version 13Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa24AETE/AEUT resource version 1/0, language 0, script 05"""6import aetools7import MacOS8_code = 'MOSS'9class Mozilla_suite_Events:10 def Get_Import_Data(self, _no_object=None, _attributes={}, **_arguments):11 """Get Import Data: Returns a structure containing information that is of use to an external module in importing data from an external mail application into Communicator.12 Keyword argument _attributes: AppleEvent attribute dictionary13 Returns: vRefNum and dirID of profile folder (2+4 bytes), vRefNum and DirID of the local mail folder (2+4 bytes), window type of front window (0 if none, \xd4Brwz\xd5 browser, \xd4Addr\xd5 addressbook, \xd4Mesg\xd5 messenger, etc., 4 bytes)14 """15 _code = 'MOSS'16 _subcode = 'Impt'17 if _arguments: raise TypeError, 'No optional args expected'18 if _no_object is not None: raise TypeError, 'No direct arg expected'19 _reply, _arguments, _attributes = self.send(_code, _subcode,20 _arguments, _attributes)21 if _arguments.get('errn', 0):22 raise aetools.Error, aetools.decodeerror(_arguments)23 # XXXX Optionally decode result24 if _arguments.has_key('----'):25 return _arguments['----']26 def Get_Profile_Name(self, _no_object=None, _attributes={}, **_arguments):27 """Get Profile Name: Get the current User Profile28 Keyword argument _attributes: AppleEvent attribute dictionary29 Returns: Name of the current profile, like \xd2Joe Bloggs\xd3. This is the name of the profile folder in the Netscape Users folder.30 """31 _code = 'MOSS'32 _subcode = 'upro'33 if _arguments: raise TypeError, 'No optional args expected'34 if _no_object is not None: raise TypeError, 'No direct arg expected'35 _reply, _arguments, _attributes = self.send(_code, _subcode,36 _arguments, _attributes)37 if _arguments.get('errn', 0):38 raise aetools.Error, aetools.decodeerror(_arguments)39 # XXXX Optionally decode result40 if _arguments.has_key('----'):41 return _arguments['----']42 def Get_workingURL(self, _no_object=None, _attributes={}, **_arguments):43 """Get workingURL: Get the path to the running application in URL format. This will allow a script to construct a relative URL44 Keyword argument _attributes: AppleEvent attribute dictionary45 Returns: Will return text of the from \xd2FILE://foo/applicationname\xd346 """47 _code = 'MOSS'48 _subcode = 'wurl'49 if _arguments: raise TypeError, 'No optional args expected'50 if _no_object is not None: raise TypeError, 'No direct arg expected'51 _reply, _arguments, _attributes = self.send(_code, _subcode,52 _arguments, _attributes)53 if _arguments.get('errn', 0):54 raise aetools.Error, aetools.decodeerror(_arguments)55 # XXXX Optionally decode result56 if _arguments.has_key('----'):57 return _arguments['----']58 _argmap_Go = {59 'direction' : 'dire',60 }61 def Go(self, _object, _attributes={}, **_arguments):62 """Go: navigate a window: back, forward, again(reload), home)63 Required argument: window64 Keyword argument direction: undocumented, typecode 'dire'65 Keyword argument _attributes: AppleEvent attribute dictionary66 """67 _code = 'MOSS'68 _subcode = 'gogo'69 aetools.keysubst(_arguments, self._argmap_Go)70 _arguments['----'] = _object71 aetools.enumsubst(_arguments, 'dire', _Enum_dire)72 _reply, _arguments, _attributes = self.send(_code, _subcode,73 _arguments, _attributes)74 if _arguments.get('errn', 0):75 raise aetools.Error, aetools.decodeerror(_arguments)76 # XXXX Optionally decode result77 if _arguments.has_key('----'):78 return _arguments['----']79 def Handle_command(self, _object, _attributes={}, **_arguments):80 """Handle command: Handle a command81 Required argument: The command to handle82 Keyword argument _attributes: AppleEvent attribute dictionary83 """84 _code = 'MOSS'85 _subcode = 'hcmd'86 if _arguments: raise TypeError, 'No optional args expected'87 _arguments['----'] = _object88 _reply, _arguments, _attributes = self.send(_code, _subcode,89 _arguments, _attributes)90 if _arguments.get('errn', 0):91 raise aetools.Error, aetools.decodeerror(_arguments)92 # XXXX Optionally decode result93 if _arguments.has_key('----'):94 return _arguments['----']95 def Open_Address_Book(self, _no_object=None, _attributes={}, **_arguments):96 """Open Address Book: Opens the address book97 Keyword argument _attributes: AppleEvent attribute dictionary98 """99 _code = 'MOSS'100 _subcode = 'addr'101 if _arguments: raise TypeError, 'No optional args expected'102 if _no_object is not None: raise TypeError, 'No direct arg expected'103 _reply, _arguments, _attributes = self.send(_code, _subcode,104 _arguments, _attributes)105 if _arguments.get('errn', 0):106 raise aetools.Error, aetools.decodeerror(_arguments)107 # XXXX Optionally decode result108 if _arguments.has_key('----'):109 return _arguments['----']110 def Open_Component(self, _object, _attributes={}, **_arguments):111 """Open Component: Open a Communicator component112 Required argument: The component to open113 Keyword argument _attributes: AppleEvent attribute dictionary114 """115 _code = 'MOSS'116 _subcode = 'cpnt'117 if _arguments: raise TypeError, 'No optional args expected'118 _arguments['----'] = _object119 _reply, _arguments, _attributes = self.send(_code, _subcode,120 _arguments, _attributes)121 if _arguments.get('errn', 0):122 raise aetools.Error, aetools.decodeerror(_arguments)123 # XXXX Optionally decode result124 if _arguments.has_key('----'):125 return _arguments['----']126 def Open_Profile_Manager(self, _no_object=None, _attributes={}, **_arguments):127 """Open Profile Manager: Open the user profile manager (obsolete)128 Keyword argument _attributes: AppleEvent attribute dictionary129 """130 _code = 'MOSS'131 _subcode = 'prfl'132 if _arguments: raise TypeError, 'No optional args expected'133 if _no_object is not None: raise TypeError, 'No direct arg expected'134 _reply, _arguments, _attributes = self.send(_code, _subcode,135 _arguments, _attributes)136 if _arguments.get('errn', 0):137 raise aetools.Error, aetools.decodeerror(_arguments)138 # XXXX Optionally decode result139 if _arguments.has_key('----'):140 return _arguments['----']141 def Open_bookmark(self, _object=None, _attributes={}, **_arguments):142 """Open bookmark: Reads in a bookmark file143 Required argument: If not available, reloads the current bookmark file144 Keyword argument _attributes: AppleEvent attribute dictionary145 """146 _code = 'MOSS'147 _subcode = 'book'148 if _arguments: raise TypeError, 'No optional args expected'149 _arguments['----'] = _object150 _reply, _arguments, _attributes = self.send(_code, _subcode,151 _arguments, _attributes)152 if _arguments.get('errn', 0):153 raise aetools.Error, aetools.decodeerror(_arguments)154 # XXXX Optionally decode result155 if _arguments.has_key('----'):156 return _arguments['----']157 _argmap_Read_help_file = {158 'with_index' : 'idid',159 'search_text' : 'sear',160 }161 def Read_help_file(self, _object, _attributes={}, **_arguments):162 """Read help file: Reads in the help file (file should be in the help file format)163 Required argument: undocumented, typecode 'alis'164 Keyword argument with_index: Index to the help file. Defaults to \xd4DEFAULT\xd5)165 Keyword argument search_text: Optional text to search for166 Keyword argument _attributes: AppleEvent attribute dictionary167 """168 _code = 'MOSS'169 _subcode = 'help'170 aetools.keysubst(_arguments, self._argmap_Read_help_file)171 _arguments['----'] = _object172 _reply, _arguments, _attributes = self.send(_code, _subcode,173 _arguments, _attributes)174 if _arguments.get('errn', 0):175 raise aetools.Error, aetools.decodeerror(_arguments)176 # XXXX Optionally decode result177 if _arguments.has_key('----'):178 return _arguments['----']179_Enum_comp = {180 'Navigator' : 'navg', # The Navigator component181 'InBox' : 'inbx', # The InBox component182 'Newsgroups' : 'colb', # The Newsgroups component183 'Composer' : 'cpsr', # The Page Composer component184 'Conference' : 'conf', # The Conference Component185 'Calendar' : 'cald', # The Calendar Component186}187_Enum_dire = {188 'again' : 'agai', # Again (reload)189 'home' : 'home', # Home190 'backward' : 'prev', # Previous page191 'forward' : 'next', # Next page192}193_Enum_ncmd = {194 'Get_new_mail' : '\x00\x00\x04W', #195 'Send_queued_messages' : '\x00\x00\x04X', #196 'Read_newsgroups' : '\x00\x00\x04\x04', #197 'Show_Inbox' : '\x00\x00\x04\x05', #198 'Show_Bookmarks_window' : '\x00\x00\x04\x06', #199 'Show_History_window' : '\x00\x00\x04\x07', #200 'Show_Address_Book_window' : '\x00\x00\x04\t', #201}202#203# Indices of types declared in this module204#205_classdeclarations = {206}207_propdeclarations = {208}209_compdeclarations = {210}211_enumdeclarations = {212 'comp' : _Enum_comp,213 'dire' : _Enum_dire,214 'ncmd' : _Enum_ncmd,...
Utility_Events.py
Source:Utility_Events.py
1"""Suite Utility Events: Commands that allow the user to select Disk Copy files2Level 1, version 13Generated from Macintosh HD:Hulpprogramma's:Disk Copy4AETE/AEUT resource version 1/0, language 0, script 05"""6import aetools7import MacOS8_code = 'ddsk'9class Utility_Events_Events:10 _argmap_select_disk_image = {11 'with_prompt' : 'SELp',12 }13 def select_disk_image(self, _no_object=None, _attributes={}, **_arguments):14 """select disk image: Prompt the user to select a disk image15 Keyword argument with_prompt: the prompt string to be displayed16 Keyword argument _attributes: AppleEvent attribute dictionary17 Returns: a reference to a disk image18 """19 _code = 'UTIL'20 _subcode = 'SEL1'21 aetools.keysubst(_arguments, self._argmap_select_disk_image)22 if _no_object is not None: raise TypeError, 'No direct arg expected'23 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)24 _reply, _arguments, _attributes = self.send(_code, _subcode,25 _arguments, _attributes)26 if _arguments.has_key('errn'):27 raise aetools.Error, aetools.decodeerror(_arguments)28 # XXXX Optionally decode result29 if _arguments.has_key('----'):30 return _arguments['----']31 _argmap_select_DiskScript = {32 'with_prompt' : 'SELp',33 }34 def select_DiskScript(self, _no_object=None, _attributes={}, **_arguments):35 """select DiskScript: Prompt the user to select a DiskScript36 Keyword argument with_prompt: the prompt string to be displayed37 Keyword argument _attributes: AppleEvent attribute dictionary38 Returns: a reference to a DiskScript39 """40 _code = 'UTIL'41 _subcode = 'SEL2'42 aetools.keysubst(_arguments, self._argmap_select_DiskScript)43 if _no_object is not None: raise TypeError, 'No direct arg expected'44 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)45 _reply, _arguments, _attributes = self.send(_code, _subcode,46 _arguments, _attributes)47 if _arguments.has_key('errn'):48 raise aetools.Error, aetools.decodeerror(_arguments)49 # XXXX Optionally decode result50 if _arguments.has_key('----'):51 return _arguments['----']52 _argmap_select_disk_image_or_DiskScript = {53 'with_prompt' : 'SELp',54 }55 def select_disk_image_or_DiskScript(self, _no_object=None, _attributes={}, **_arguments):56 """select disk image or DiskScript: Prompt the user to select a disk image or DiskScript57 Keyword argument with_prompt: the prompt string to be displayed58 Keyword argument _attributes: AppleEvent attribute dictionary59 Returns: a reference to disk image or a DiskScript60 """61 _code = 'UTIL'62 _subcode = 'SEL3'63 aetools.keysubst(_arguments, self._argmap_select_disk_image_or_DiskScript)64 if _no_object is not None: raise TypeError, 'No direct arg expected'65 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)66 _reply, _arguments, _attributes = self.send(_code, _subcode,67 _arguments, _attributes)68 if _arguments.has_key('errn'):69 raise aetools.Error, aetools.decodeerror(_arguments)70 # XXXX Optionally decode result71 if _arguments.has_key('----'):72 return _arguments['----']73 _argmap_select_floppy_disk_image = {74 'with_prompt' : 'SELp',75 }76 def select_floppy_disk_image(self, _no_object=None, _attributes={}, **_arguments):77 """select floppy disk image: Prompt the user to select a floppy disk image78 Keyword argument with_prompt: the prompt string to be displayed79 Keyword argument _attributes: AppleEvent attribute dictionary80 Returns: a reference to a floppy disk image81 """82 _code = 'UTIL'83 _subcode = 'SEL4'84 aetools.keysubst(_arguments, self._argmap_select_floppy_disk_image)85 if _no_object is not None: raise TypeError, 'No direct arg expected'86 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)87 _reply, _arguments, _attributes = self.send(_code, _subcode,88 _arguments, _attributes)89 if _arguments.has_key('errn'):90 raise aetools.Error, aetools.decodeerror(_arguments)91 # XXXX Optionally decode result92 if _arguments.has_key('----'):93 return _arguments['----']94 _argmap_select_disk = {95 'with_prompt' : 'SELp',96 }97 def select_disk(self, _no_object=None, _attributes={}, **_arguments):98 """select disk: Prompt the user to select a disk volume99 Keyword argument with_prompt: the prompt string to be displayed100 Keyword argument _attributes: AppleEvent attribute dictionary101 Returns: a reference to the disk102 """103 _code = 'UTIL'104 _subcode = 'SEL5'105 aetools.keysubst(_arguments, self._argmap_select_disk)106 if _no_object is not None: raise TypeError, 'No direct arg expected'107 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)108 _reply, _arguments, _attributes = self.send(_code, _subcode,109 _arguments, _attributes)110 if _arguments.has_key('errn'):111 raise aetools.Error, aetools.decodeerror(_arguments)112 # XXXX Optionally decode result113 if _arguments.has_key('----'):114 return _arguments['----']115 _argmap_select_folder = {116 'with_prompt' : 'SELp',117 }118 def select_folder(self, _no_object=None, _attributes={}, **_arguments):119 """select folder: Prompt the user to select a folder120 Keyword argument with_prompt: the prompt string to be displayed121 Keyword argument _attributes: AppleEvent attribute dictionary122 Returns: a reference to the folder123 """124 _code = 'UTIL'125 _subcode = 'SEL6'126 aetools.keysubst(_arguments, self._argmap_select_folder)127 if _no_object is not None: raise TypeError, 'No direct arg expected'128 aetools.enumsubst(_arguments, 'SELp', _Enum_TEXT)129 _reply, _arguments, _attributes = self.send(_code, _subcode,130 _arguments, _attributes)131 if _arguments.has_key('errn'):132 raise aetools.Error, aetools.decodeerror(_arguments)133 # XXXX Optionally decode result134 if _arguments.has_key('----'):135 return _arguments['----']136 _argmap_log = {137 'time_stamp' : 'TSMP',138 }139 def log(self, _object, _attributes={}, **_arguments):140 """log: Add a string to the log window141 Required argument: the string to add to the log window142 Keyword argument time_stamp: Should the log entry be time-stamped? (false if not supplied)143 Keyword argument _attributes: AppleEvent attribute dictionary144 """145 _code = 'UTIL'146 _subcode = 'LOG '147 aetools.keysubst(_arguments, self._argmap_log)148 _arguments['----'] = _object149 aetools.enumsubst(_arguments, 'TSMP', _Enum_bool)150 _reply, _arguments, _attributes = self.send(_code, _subcode,151 _arguments, _attributes)152 if _arguments.has_key('errn'):153 raise aetools.Error, aetools.decodeerror(_arguments)154 # XXXX Optionally decode result155 if _arguments.has_key('----'):156 return _arguments['----']157_Enum_TEXT = None # XXXX enum TEXT not found!!158_Enum_bool = None # XXXX enum bool not found!!159#160# Indices of types declared in this module161#162_classdeclarations = {163}164_propdeclarations = {165}166_compdeclarations = {167}168_enumdeclarations = {...
test_spark_jdbc_script.py
Source:test_spark_jdbc_script.py
...89 'upper_bound': '20',90 'create_table_column_types': 'columnMcColumnFace INTEGER(100), name CHAR(64),'91 'comments VARCHAR(1024)',92 }93 def test_parse_arguments(self):94 # When95 parsed_arguments = _parse_arguments(args=self.jdbc_arguments)96 # Then97 for argument_name, argument_value in self.default_arguments.items():98 assert getattr(parsed_arguments, argument_name) == argument_value99 @mock.patch('airflow.providers.apache.spark.hooks.spark_jdbc_script.spark_write_to_jdbc')100 def test_run_spark_write_to_jdbc(self, mock_spark_write_to_jdbc, mock_spark_session):101 # Given102 arguments = _parse_arguments(['-cmdType', SPARK_WRITE_TO_JDBC] + self.jdbc_arguments[2:])103 spark_session = mock_spark_session.builder.appName(arguments.name).enableHiveSupport().getOrCreate()104 # When105 _run_spark(arguments=arguments)106 # Then107 mock_spark_write_to_jdbc.assert_called_once_with(108 spark_session,109 arguments.url,110 arguments.user,111 arguments.password,112 arguments.metastore_table,113 arguments.jdbc_table,114 arguments.jdbc_driver,115 arguments.truncate,116 arguments.save_mode,117 arguments.batch_size,118 arguments.num_partitions,119 arguments.create_table_column_types,120 )121 @mock.patch('airflow.providers.apache.spark.hooks.spark_jdbc_script.spark_read_from_jdbc')122 def test_run_spark_read_from_jdbc(self, mock_spark_read_from_jdbc, mock_spark_session):123 # Given124 arguments = _parse_arguments(['-cmdType', SPARK_READ_FROM_JDBC] + self.jdbc_arguments[2:])125 spark_session = mock_spark_session.builder.appName(arguments.name).enableHiveSupport().getOrCreate()126 # When127 _run_spark(arguments=arguments)128 # Then129 mock_spark_read_from_jdbc.assert_called_once_with(130 spark_session,131 arguments.url,132 arguments.user,133 arguments.password,134 arguments.metastore_table,135 arguments.jdbc_table,136 arguments.jdbc_driver,137 arguments.save_mode,138 arguments.save_format,139 arguments.fetch_size,140 arguments.num_partitions,141 arguments.partition_column,142 arguments.lower_bound,143 arguments.upper_bound,144 )145 @pytest.mark.system("spark")146 @mock.patch.object(DataFrameWriter, 'save')147 def test_spark_write_to_jdbc(self, mock_writer_save):148 # Given149 arguments = _parse_arguments(self.jdbc_arguments)150 spark_session = _create_spark_session(arguments)151 spark_session.sql("CREATE TABLE IF NOT EXISTS " + arguments.metastore_table + " (key INT)")152 # When153 spark_write_to_jdbc(154 spark_session=spark_session,155 url=arguments.url,156 user=arguments.user,157 password=arguments.password,158 metastore_table=arguments.metastore_table,159 jdbc_table=arguments.jdbc_table,160 driver=arguments.jdbc_driver,161 truncate=arguments.truncate,162 save_mode=arguments.save_mode,163 batch_size=arguments.batch_size,164 num_partitions=arguments.num_partitions,165 create_table_column_types=arguments.create_table_column_types,166 )167 # Then168 mock_writer_save.assert_called_once_with(mode=arguments.save_mode)169 @pytest.mark.system("spark")170 @mock.patch.object(DataFrameReader, 'load')171 def test_spark_read_from_jdbc(self, mock_reader_load):172 # Given173 arguments = _parse_arguments(self.jdbc_arguments)174 spark_session = _create_spark_session(arguments)175 spark_session.sql("CREATE TABLE IF NOT EXISTS " + arguments.metastore_table + " (key INT)")176 # When177 spark_read_from_jdbc(178 spark_session,179 arguments.url,180 arguments.user,181 arguments.password,182 arguments.metastore_table,183 arguments.jdbc_table,184 arguments.jdbc_driver,185 arguments.save_mode,186 arguments.save_format,187 arguments.fetch_size,...
builtin_Suite.py
Source:builtin_Suite.py
1"""Suite builtin_Suite: Every application supports open, reopen, print, run, and quit2Level 1, version 13"""4import aetools5import MacOS6_code = 'aevt'7class builtin_Suite_Events:8 def open(self, _object, _attributes={}, **_arguments):9 """open: Open the specified object(s)10 Required argument: list of objects to open11 Keyword argument _attributes: AppleEvent attribute dictionary12 """13 _code = 'aevt'14 _subcode = 'odoc'15 if _arguments: raise TypeError, 'No optional args expected'16 _arguments['----'] = _object17 _reply, _arguments, _attributes = self.send(_code, _subcode,18 _arguments, _attributes)19 if _arguments.get('errn', 0):20 raise aetools.Error, aetools.decodeerror(_arguments)21 # XXXX Optionally decode result22 if _arguments.has_key('----'):23 return _arguments['----']24 def run(self, _no_object=None, _attributes={}, **_arguments):25 """run: Run an application. Most applications will open an empty, untitled window.26 Keyword argument _attributes: AppleEvent attribute dictionary27 """28 _code = 'aevt'29 _subcode = 'oapp'30 if _arguments: raise TypeError, 'No optional args expected'31 if _no_object is not None: raise TypeError, 'No direct arg expected'32 _reply, _arguments, _attributes = self.send(_code, _subcode,33 _arguments, _attributes)34 if _arguments.get('errn', 0):35 raise aetools.Error, aetools.decodeerror(_arguments)36 # XXXX Optionally decode result37 if _arguments.has_key('----'):38 return _arguments['----']39 def reopen(self, _no_object=None, _attributes={}, **_arguments):40 """reopen: Reactivate a running application. Some applications will open a new untitled window if no window is open.41 Keyword argument _attributes: AppleEvent attribute dictionary42 """43 _code = 'aevt'44 _subcode = 'rapp'45 if _arguments: raise TypeError, 'No optional args expected'46 if _no_object is not None: raise TypeError, 'No direct arg expected'47 _reply, _arguments, _attributes = self.send(_code, _subcode,48 _arguments, _attributes)49 if _arguments.get('errn', 0):50 raise aetools.Error, aetools.decodeerror(_arguments)51 # XXXX Optionally decode result52 if _arguments.has_key('----'):53 return _arguments['----']54 def _print(self, _object, _attributes={}, **_arguments):55 """print: Print the specified object(s)56 Required argument: list of objects to print57 Keyword argument _attributes: AppleEvent attribute dictionary58 """59 _code = 'aevt'60 _subcode = 'pdoc'61 if _arguments: raise TypeError, 'No optional args expected'62 _arguments['----'] = _object63 _reply, _arguments, _attributes = self.send(_code, _subcode,64 _arguments, _attributes)65 if _arguments.get('errn', 0):66 raise aetools.Error, aetools.decodeerror(_arguments)67 # XXXX Optionally decode result68 if _arguments.has_key('----'):69 return _arguments['----']70 _argmap_quit = {71 'saving' : 'savo',72 }73 def quit(self, _no_object=None, _attributes={}, **_arguments):74 """quit: Quit an application75 Keyword argument saving: specifies whether to save currently open documents76 Keyword argument _attributes: AppleEvent attribute dictionary77 """78 _code = 'aevt'79 _subcode = 'quit'80 aetools.keysubst(_arguments, self._argmap_quit)81 if _no_object is not None: raise TypeError, 'No direct arg expected'82 aetools.enumsubst(_arguments, 'savo', _Enum_savo)83 _reply, _arguments, _attributes = self.send(_code, _subcode,84 _arguments, _attributes)85 if _arguments.get('errn', 0):86 raise aetools.Error, aetools.decodeerror(_arguments)87 # XXXX Optionally decode result88 if _arguments.has_key('----'):89 return _arguments['----']90 _argmap_close = {91 'saving' : 'savo',92 'saving_in' : 'kfil',93 }94_Enum_savo = {95 'yes' : 'yes ', # Save objects now96 'no' : 'no ', # Do not save objects97 'ask' : 'ask ', # Ask the user whether to save98}99#100# Indices of types declared in this module101#102_classdeclarations = {103}104_propdeclarations = {105}106_compdeclarations = {107}108_enumdeclarations = {109 'savo' : _Enum_savo,...
Required_Suite.py
Source:Required_Suite.py
1"""Suite Required Suite: Events that every application should support2Level 1, version 13Generated from /Applications/Internet Explorer.app4AETE/AEUT resource version 1/0, language 0, script 05"""6import aetools7import MacOS8_code = 'reqd'9from StdSuites.Required_Suite import *10class Required_Suite_Events(Required_Suite_Events):11 def open(self, _object, _attributes={}, **_arguments):12 """open: Open documents13 Required argument: undocumented, typecode 'alis'14 Keyword argument _attributes: AppleEvent attribute dictionary15 """16 _code = 'aevt'17 _subcode = 'odoc'18 if _arguments: raise TypeError, 'No optional args expected'19 _arguments['----'] = _object20 _reply, _arguments, _attributes = self.send(_code, _subcode,21 _arguments, _attributes)22 if _arguments.get('errn', 0):23 raise aetools.Error, aetools.decodeerror(_arguments)24 # XXXX Optionally decode result25 if _arguments.has_key('----'):26 return _arguments['----']27 def print_(self, _object, _attributes={}, **_arguments):28 """print: Print documents29 Required argument: undocumented, typecode 'alis'30 Keyword argument _attributes: AppleEvent attribute dictionary31 """32 _code = 'aevt'33 _subcode = 'pdoc'34 if _arguments: raise TypeError, 'No optional args expected'35 _arguments['----'] = _object36 _reply, _arguments, _attributes = self.send(_code, _subcode,37 _arguments, _attributes)38 if _arguments.get('errn', 0):39 raise aetools.Error, aetools.decodeerror(_arguments)40 # XXXX Optionally decode result41 if _arguments.has_key('----'):42 return _arguments['----']43 def quit(self, _no_object=None, _attributes={}, **_arguments):44 """quit: Quit application45 Keyword argument _attributes: AppleEvent attribute dictionary46 """47 _code = 'aevt'48 _subcode = 'quit'49 if _arguments: raise TypeError, 'No optional args expected'50 if _no_object is not None: raise TypeError, 'No direct arg expected'51 _reply, _arguments, _attributes = self.send(_code, _subcode,52 _arguments, _attributes)53 if _arguments.get('errn', 0):54 raise aetools.Error, aetools.decodeerror(_arguments)55 # XXXX Optionally decode result56 if _arguments.has_key('----'):57 return _arguments['----']58 def run(self, _no_object=None, _attributes={}, **_arguments):59 """run:60 Keyword argument _attributes: AppleEvent attribute dictionary61 """62 _code = 'aevt'63 _subcode = 'oapp'64 if _arguments: raise TypeError, 'No optional args expected'65 if _no_object is not None: raise TypeError, 'No direct arg expected'66 _reply, _arguments, _attributes = self.send(_code, _subcode,67 _arguments, _attributes)68 if _arguments.get('errn', 0):69 raise aetools.Error, aetools.decodeerror(_arguments)70 # XXXX Optionally decode result71 if _arguments.has_key('----'):72 return _arguments['----']73#74# Indices of types declared in this module75#76_classdeclarations = {77}78_propdeclarations = {79}80_compdeclarations = {81}82_enumdeclarations = {...
Using AI Code Generation
1var args = wpt.arguments();2wpt.log(args);3wpt.log(args[0]);4wpt.log(args[1]);5wpt.log(args[2]);6wpt.log(args[3]);7wpt.log(args[4]);8wpt.log(args[5]);9wpt.log(args[6]);10wpt.log(args[7]);11wpt.log(args[8]);12wpt.log(args[9]);13wpt.log(args[10]);14wpt.log(args[11]);15wpt.log(args[12]);16wpt.log(args[13]);17wpt.log(args[14]);18wpt.log(args[15]);19wpt.log(args[16]);20wpt.log(args[17]);21wpt.log(args[18]);22wpt.log(args[19]);23wpt.log(args[20]);24wpt.log(args[21]);25wpt.log(args[22]);26wpt.log(args[23]);27wpt.log(args[24]);28wpt.log(args[25]);29wpt.log(args[26]);30wpt.log(args[27]);31wpt.log(args[28]);32wpt.log(args[29]);33wpt.log(args[30]);34wpt.log(args[31]);35wpt.log(args[32]);36wpt.log(args[33]);37wpt.log(args[34]);38wpt.log(args[35]);39wpt.log(args[36]);40wpt.log(args[37]);41wpt.log(args[38]);42wpt.log(args[39]);43wpt.log(args[40]);44wpt.log(args[41]);45wpt.log(args[42]);46wpt.log(args[43]);47wpt.log(args[44]);48wpt.log(args[45]);49wpt.log(args[46]);50wpt.log(args[47]);51wpt.log(args[48]);52wpt.log(args[49]);53wpt.log(args[50]);54wpt.log(args[51]);55wpt.log(args[52]);56wpt.log(args[53]);57wpt.log(args[54]);58wpt.log(args[55]);59wpt.log(args[56]);60wpt.log(args[57]);61wpt.log(args[58]);62wpt.log(args[59]);63wpt.log(args[60]);64wpt.log(args[61]);65wpt.log(args[62]);66wpt.log(args[63]);67wpt.log(args[64]);68wpt.log(args[65]);69wpt.log(args[66]);70wpt.log(args[67]);71wpt.log(args[68]);
Using AI Code Generation
1function setup() {2 createCanvas(710, 400);3 background(0);4}5function draw() {6 fill(random(255), 0, random(255));7 ellipse(random(width), random(height), 30, 30);8}
Using AI Code Generation
1var wpt = require('webpagetest');2var test = new wpt('www.webpagetest.org','A.1b6a8a6c0f6d4b3e3b6a8a6c0f6d4b3e');3var testurl = process.argv[2];4var testruns = process.argv[3];5var testwait = process.argv[4];6var testoptions = {7};8test.runTest(testoptions, function(err, data) {9 if (err) return console.error(err);10 console.log('Test status: %s', data.statusText);11 console.log('Test ID: %s', data.data.testId);12 console.log('Test URL: %s', data.data.summary);13 console.log('Test results: %s', data.data.userUrl);14 console.log('Test results: %s', data.data.jsonUrl);15 console.log('Test results: %s', data.data.xmlUrl);16});
Using AI Code Generation
1function wpttest(){2 var wpt = require('webpagetest');3 var options = {4 };5 var wpt = new WebPageTest('www.webpagetest.org', options.key);6 wpt.runTest(testUrl, function(err, data) {7 if (err) return console.error(err);8 console.log('Test submitted successfully. View your test at: %sresult/%s/', wpt.testUrl, data.data.testId);9 });10}11function wpttestpromise(){12 var wpt = require('webpagetest');13 var options = {14 };15 var wpt = new WebPageTest('www.webpagetest.org', options.key);16 wpt.runTest(testUrl)17 .then(function(data) {18 console.log('Test submitted successfully. View your test at: %sresult/%s/', wpt.testUrl, data.data.testId);19 })20 .catch(function(err) {21 console.error(err);22 });23}24function wpttestcallback(){25 var wpt = require('webpagetest');26 var options = {27 };28 var wpt = new WebPageTest('www.webpagetest.org', options.key);29 wpt.runTest(testUrl, function(err, data) {30 if (err) return console.error(err);
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!