???& ??? in ICARegisterForEventNotification Apple Code Sample
???& ??? in ICARegisterForEventNotification Apple Code Sample
- Subject: ???& ??? in ICARegisterForEventNotification Apple Code Sample
- From: M Pulis <email@hidden>
- Date: Mon, 1 Dec 2008 22:34:55 -0700
Folks,
In the code below, from
http://developer.apple.com/documentation/Carbon/Conceptual/
ImageCaptureServicesProgrammingGuide/
03HowtoWriteanImageCaptureApplication/chapter_3_section_1.html#//
apple_ref/doc/uid/TP40005196-CH4-SW1
In the calls CFArrayCreate and ICARegisterForEventNotification, the
code uses a variable called "amp". What is "amp"? As it sits, the
snippet does not compile, stumbling as I have, on "amp".
Thanks,
Gary
/* Sample code snippet to illustrate the use of
ICARegisterForEventNotification() */
OSErr registerForNotifications()
{
OSErr err = noErr;
ICARegisterForEventNotificationPB pb = {};
CFStringRef notificationsOfInterest[] = {
k
ICANotificationTypeDeviceRemoved,
k
ICANotificationTypeDeviceInfoChanged,
k
ICANotificationTypeDeviceWasReset,
k
ICANotificationTypeCaptureComplete,
k
ICANotificationTypeTransactionCanceled,
k
ICANotificationTypeStoreAdded,
k
ICANotificationTypeStoreRemoved,
k
ICANotificationTypeStoreFull,
k
ICANotificationTypeStoreInfoChanged,
k
ICANotificationTypeObjectAdded,
k
ICANotificationTypeObjectRemoved,
k
ICANotificationTypeObjectInfoChanged
};
CFMutableArrayRef array = CFArrayCreate( kCFAllocatorDefault,
(const void**)&notificationsOfInterest, 12,
&kCFTypeArrayCallBacks );
pb.header.refcon = (long)self;
pb.objectOfInterest = <#ICAObject object#>
/* valid values are 0, device list object, or device object. 0 gets
notifications related to any object. */
pb.eventsOfInterest = (CFArrayRef)array;
pb.notificationProc = notificationCallback;
pb.options = NULL;
err = ICARegisterForEventNotification( &pb,
registerForEventNotificationCallback );
CFRelease( array );
return err;
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden