• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
???&amp ??? in ICARegisterForEventNotification Apple Code Sample
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

???&amp ??? in ICARegisterForEventNotification Apple Code Sample


  • Subject: ???&amp ??? 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**)&amp;notificationsOfInterest, 12, &amp;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( &amp;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


  • Follow-Ups:
    • Re: ???&amp ??? in ICARegisterForEventNotification Apple Code Sample
      • From: Steve Bird <email@hidden>
    • Re: ???&amp ??? in ICARegisterForEventNotification Apple Code Sample
      • From: Ron Fleckner <email@hidden>
  • Prev by Date: Re: Textual representation of an NSData?
  • Next by Date: Re: ???&amp ??? in ICARegisterForEventNotification Apple Code Sample
  • Previous by thread: Re: Create command from string
  • Next by thread: Re: ???&amp ??? in ICARegisterForEventNotification Apple Code Sample
  • Index(es):
    • Date
    • Thread