| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
If you want to do it fast, without shell output parsing, and in a way that will work on 10.4 *and* 10.5, use the Directory Services C API. The downside is that it's more complex than many of the Cocoa APIs you're likely used to.
Docs:
<http://developer.apple.com/documentation/Networking/Conceptual/Open_Directory/Introduction/chapter_1_section_1.html
<http://developer.apple.com/documentation/Networking/Reference/Open_Directory_Ref/Reference/reference.html
Lots of source to learn from (the dscl sources are a good place to look for examples):
http://www.opensource.apple.com/darwinsource/Current/DSTools-112/
On 31 Aug, 2008, at 10:43, Jaime Magiera wrote:
On Aug 31, 2008, at 4:57 AM, Kieren Eaton wrote:
Hi,
I am trying to find a way to access the netinfo DB from cocoa. Specifically the sharing (AFP, SMB, etc). Pointers or ideas are much appreciated.
Hello,
Quick question: Are you using Leopard or Tiger machines? On Tiger, you can run the commands "niultil" or "nicl" to query the NetInfo database from your application. Note that in Leopard, Netinfo has been completely deprecated in favor of a local LDAP database. So, if you are using Leopard, run the command "dscl" from your application. In either case, you'll have to parse the command results in your app.
On Tiger, the path you want to query is...
/config/SharePoints/
On Leopard, the path you want to query is...
/Local/Default/SharePoints
hope that helps,
Jaime Magiera
Kieren
_______________________________________________
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: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.