SystemConfiguration.framework
SystemConfiguration.framework
- Subject: SystemConfiguration.framework
- From: William Squires <email@hidden>
- Date: Sat, 28 Nov 2009 19:02:18 -0600
Okay, here's the deal:
Norton Firewall notifies me that configd is attempting to access the
internet, so I block it.
I then pull up Terminal.app and "man configd".
That in turn, leads me to "SystemConfiguration.framework
SCDynamicStore.h"
So, I make a new XCode CoreFoundation Tool project, and import the
SystemConfiguration.framework. I then look under "External Frameworks
and Libraries" (where I dragged the system configuration framework),
and look in the headers.
The comments indicate that I need to begin by calling
SCDynamicStoreCreate, so I scroll down. It says
SCDynamicStoreRef
SCDynamicStoreCreate (
CFAllocatorRef allocator,
CFStringRef name,
SCDynamicStoreCallBack callout,
SCDynamicStoreContext, *context
);
Here's where my confusion begins.
1) Would I declare this as
a) SCDynamicStoreRef myRef;
b) SCDynamicStore *myRef;
c) SCDynamicStore &myRef; // Probably not, I believe only C++
defines the "&" operator this way
d) SCDynamicStoreRef *myRef;
2) Is a CFStringRef replaceable with a literal NSString via toll-free-
bridging? And exactly what does it expect this string to contain? The
name of the compiled executable?
3) Do I need the callback?
4) Is there an ObjC class that encapsulates this functionality?
5) The documentation states that the SCDynamicStoreRef needs to be
released. I assume using the free() function in the C <stdlib.h> header?
_______________________________________________
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