Re: Getting the network Machine Icon

2009-01-16 Thread Sandro Noel

sorry I typed it to quickly.

[computer bonjour name].[_device-info._tcp].[domain]


but I get error -72004 when i try it. :(
witch is an invalid parameter.

I've searched the internet for _device-info.
and apparently i'm not the only one asking about this feature, but no  
one seems to be getting an answer :|


Oh well... Discovery time :)

Sandro Noel.

On 16-Jan-09, at 2:21 AM, Sandro Noel wrote:


Guy's I think I found it.

Using a packet analyzer on my laptop, and using my iphone with  
DataCase (AFP server for iphone)
when the service is resolved, finder sends a special bonjour query.  
called device-info.

Packet: 5, Packetlength: 252 bytes, Packet follows:

00030   00 05 00 00 00 00 16 53  61 6e 64 72 6f 20 4e  
6f...Sandro No
00040   65 6c e2 80 99 73 20 69  50 68 6f 6e 65 0b 5f 61el...s  
iPhone._a
00050   66 70 6f 76 65 72 74 63  70 04 5f 74 63 70 05 6c 
fpovertcp._tcp.l
00060   6f 63 61 6c 00 00 21 80  01 00 00 00 78 00 11 00 
ocal..!.x...
00070   00 00 00 15 38 08 69 50  68 6f 6e 65 2d 37 c0 34 
8.iPhone-7.4
00080   c0 0c 00 10 80 01 00 00  11 94 00 01 00 09 5f  
73.._s
00090   65 72 76 69 63 65 73 07  5f 64 6e 73 2d 73 64 04 
ervices._dns-sd.
000a0   5f 75 64 70 c0 34 00 0c  00 01 00 00 11 94 00 02_udp. 
4..
000b0   c0 23 c0 23 00 0c 00 01  00 00 11 94 00 02 c0  
0c.#.#
000c0   16 53 61 6e 64 72 6f 20  4e 6f 65 6c e2 80 99 73.Sandro  
Noel...s
000d0   20 69 50 68 6f 6e 65 0c  5f 64 65 76 69 63 65 2d  
iPhone._device-
000e0   69 6e 66 6f c0 2f 00 10  00 01 00 00 11 94 00 0c 
info./..
000f0   0b 6d 6f 64 65 6c 3d 4d  36 38 41  
50.model=M68AP


can you see the model=M68AP ?

the service reference here :http://www.dns-sd.org/ServiceTypes.html  
says

device-info
Device Info Stuart Cheshire , Marc Krochmal  Not a service type.  
Special name reserved for DNS-SD device info.


So the query would be .

[computer bonjour name].[service-info.tcp].[domain]
resolve that, and you get your model info.

This is just speculation for now but i'll try it tomorrow and let  
you guy's know ! :)


I. Savant thank you for being curious as I am :)


Sandro Noel.

On 13-Jan-09, at 2:51 PM, Sandro Noel wrote:


Well it's not that bad of a place to put it...
there is not way to know beforehand if the servers are going to be  
present
So it makes sense to ask the server what it is. when Bonjour  
declares it's presence.

or when the SMB server broadcasts.

The icons for every possible mac model are local to the computer,  
if you have a Mac.

/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/

I suspect that the icon in the reply from the FPGetSrvrInfo is  
useful for other platforms.
because with the model number, there is pretty much no more  
information needed to

associate an icon from the local resource.

The only problem I find it VERY complicated for such a simple  
feature.
to have to implement sockets UDP or TCP "have not gotten a reply  
yet".

Just to get an image to show up on screen :) is quite an overhead :)

Perhaps it would of been nice to add the model number of the  
machine to a NSNetService(Bonjour) TXT record.

Instead of having to uery the host directly. IMHO

I might be wrong, what do I know :)

Sandro Noel.

On 13-Jan-09, at 12:09 PM, I. Savant wrote:

On Tue, Jan 13, 2009 at 11:32 AM, Sandro Noel  
 wrote:


The AFP client sends the FPGetSrvrInfo command to obtain server  
information.
The FPGetSrvrInfo command returns server information including  
the following
server parameters: server name, machine type, AFP version  
strings, UAM
strings, volume icon and mask, a bitmap of flags, and optionally,  
a list of
available Open Directory names. For descriptions of server  
parameters, see

FPGetSrvrInfo in the Reference section.



Neat! That seems an odd place to put that functionality, but
hopefully it'll be better-placed when all that stuff is eventually
cocoa-ized. Thanks for the follow-up. Very informative.

--
I.S.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/sandro.noel 
%40mac.com


This email sent to sandro.n...@mac.com




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting the network Machine Icon

2009-01-15 Thread Sandro Noel

Guy's I think I found it.

Using a packet analyzer on my laptop, and using my iphone with  
DataCase (AFP server for iphone)
when the service is resolved, finder sends a special bonjour query.  
called device-info.

Packet: 5, Packetlength: 252 bytes, Packet follows:

00030   00 05 00 00 00 00 16 53  61 6e 64 72 6f 20 4e  
6f...Sandro No
00040   65 6c e2 80 99 73 20 69  50 68 6f 6e 65 0b 5f 61el...s  
iPhone._a
00050   66 70 6f 76 65 72 74 63  70 04 5f 74 63 70 05 6c 
fpovertcp._tcp.l
00060   6f 63 61 6c 00 00 21 80  01 00 00 00 78 00 11 00 
ocal..!.x...
00070   00 00 00 15 38 08 69 50  68 6f 6e 65 2d 37 c0 34 
8.iPhone-7.4
00080   c0 0c 00 10 80 01 00 00  11 94 00 01 00 09 5f  
73.._s
00090   65 72 76 69 63 65 73 07  5f 64 6e 73 2d 73 64 04 
ervices._dns-sd.
000a0   5f 75 64 70 c0 34 00 0c  00 01 00 00 11 94 00 02_udp. 
4..
000b0   c0 23 c0 23 00 0c 00 01  00 00 11 94 00 02 c0  
0c.#.#
000c0   16 53 61 6e 64 72 6f 20  4e 6f 65 6c e2 80 99 73.Sandro  
Noel...s
000d0   20 69 50 68 6f 6e 65 0c  5f 64 65 76 69 63 65 2d  
iPhone._device-
000e0   69 6e 66 6f c0 2f 00 10  00 01 00 00 11 94 00 0c 
info./..

000f0   0b 6d 6f 64 65 6c 3d 4d  36 38 41 50.model=M68AP

can you see the model=M68AP ?

the service reference here :http://www.dns-sd.org/ServiceTypes.html says
device-info
Device Info Stuart Cheshire , Marc Krochmal  Not a service type.  
Special name reserved for DNS-SD device info.


So the query would be .

[computer bonjour name].[service-info.tcp].[domain]
resolve that, and you get your model info.

This is just speculation for now but i'll try it tomorrow and let you  
guy's know ! :)


I. Savant thank you for being curious as I am :)


Sandro Noel.

On 13-Jan-09, at 2:51 PM, Sandro Noel wrote:


Well it's not that bad of a place to put it...
there is not way to know beforehand if the servers are going to be  
present
So it makes sense to ask the server what it is. when Bonjour  
declares it's presence.

or when the SMB server broadcasts.

The icons for every possible mac model are local to the computer, if  
you have a Mac.

/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/

I suspect that the icon in the reply from the FPGetSrvrInfo is  
useful for other platforms.
because with the model number, there is pretty much no more  
information needed to

associate an icon from the local resource.

The only problem I find it VERY complicated for such a simple feature.
to have to implement sockets UDP or TCP "have not gotten a reply yet".
Just to get an image to show up on screen :) is quite an overhead :)

Perhaps it would of been nice to add the model number of the machine  
to a NSNetService(Bonjour) TXT record.

Instead of having to uery the host directly. IMHO

I might be wrong, what do I know :)

Sandro Noel.

On 13-Jan-09, at 12:09 PM, I. Savant wrote:

On Tue, Jan 13, 2009 at 11:32 AM, Sandro Noel   
wrote:


The AFP client sends the FPGetSrvrInfo command to obtain server  
information.
The FPGetSrvrInfo command returns server information including the  
following
server parameters: server name, machine type, AFP version strings,  
UAM
strings, volume icon and mask, a bitmap of flags, and optionally,  
a list of
available Open Directory names. For descriptions of server  
parameters, see

FPGetSrvrInfo in the Reference section.



Neat! That seems an odd place to put that functionality, but
hopefully it'll be better-placed when all that stuff is eventually
cocoa-ized. Thanks for the follow-up. Very informative.

--
I.S.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/sandro.noel%40mac.com

This email sent to sandro.n...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting the network Machine Icon

2009-01-13 Thread Sandro Noel

Well it's not that bad of a place to put it...
there is not way to know beforehand if the servers are going to be  
present
So it makes sense to ask the server what it is. when Bonjour declares  
it's presence.

or when the SMB server broadcasts.

The icons for every possible mac model are local to the computer, if  
you have a Mac.

/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/

I suspect that the icon in the reply from the FPGetSrvrInfo is useful  
for other platforms.
because with the model number, there is pretty much no more  
information needed to

associate an icon from the local resource.

The only problem I find it VERY complicated for such a simple feature.
to have to implement sockets UDP or TCP "have not gotten a reply yet".
Just to get an image to show up on screen :) is quite an overhead :)

Perhaps it would of been nice to add the model number of the machine  
to a NSNetService(Bonjour) TXT record.

Instead of having to uery the host directly. IMHO

I might be wrong, what do I know :)

Sandro Noel.

On 13-Jan-09, at 12:09 PM, I. Savant wrote:

On Tue, Jan 13, 2009 at 11:32 AM, Sandro Noel   
wrote:


The AFP client sends the FPGetSrvrInfo command to obtain server  
information.
The FPGetSrvrInfo command returns server information including the  
following
server parameters: server name, machine type, AFP version strings,  
UAM
strings, volume icon and mask, a bitmap of flags, and optionally, a  
list of
available Open Directory names. For descriptions of server  
parameters, see

FPGetSrvrInfo in the Reference section.



 Neat! That seems an odd place to put that functionality, but
hopefully it'll be better-placed when all that stuff is eventually
cocoa-ized. Thanks for the follow-up. Very informative.

--
I.S.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting the network Machine Icon

2009-01-13 Thread I. Savant
On Tue, Jan 13, 2009 at 11:32 AM, Sandro Noel  wrote:

> The AFP client sends the FPGetSrvrInfo command to obtain server information.
> The FPGetSrvrInfo command returns server information including the following
> server parameters: server name, machine type, AFP version strings, UAM
> strings, volume icon and mask, a bitmap of flags, and optionally, a list of
> available Open Directory names. For descriptions of server parameters, see
> FPGetSrvrInfo in the Reference section.


  Neat! That seems an odd place to put that functionality, but
hopefully it'll be better-placed when all that stuff is eventually
cocoa-ized. Thanks for the follow-up. Very informative.

--
I.S.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting the network Machine Icon

2009-01-13 Thread Sandro Noel

Follow UP.

Here is what i got from the Carbon-dev list


I'd guess it just uses AFP to ask the server:

From :


The AFP client sends the FPGetSrvrInfo command to obtain server  
information. The FPGetSrvrInfo command returns server information  
including the following server parameters: server name, machine type,  
AFP version strings, UAM strings, volume icon and mask, a bitmap of  
flags, and optionally, a list of available Open Directory names. For  
descriptions of server parameters, see FPGetSrvrInfo in the Reference  
section.


I will post my code here as soon as i'm done, if this is the proper  
solution, it does makes sense.


regards

Sandro Noel.

On 12-Jan-09, at 2:01 PM, I. Savant wrote:

On Mon, Jan 12, 2009 at 1:52 PM, Sandro Noel   
wrote:



Thanks guy's i'll ask in the Carbon-dev list.


 Sorry - I didn't see the "remote" part of the requirement at first.
After spending some time searching the docs, tech notes, and even some
headers for this myself (because it's an intriguing question), I
couldn't find any good leads either. I'll second the suspicion that
Carbon will likely be needed, but there doesn't appear to be a
well-documented way to do so.

 If you wouldn't mind following up on this thread with any references
you might get on carbon-dev (for those who aren't subscribed), it
would be greatly appreciated.

--
I.S.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting the network Machine Icon

2009-01-12 Thread I. Savant
On Mon, Jan 12, 2009 at 1:52 PM, Sandro Noel  wrote:

> Thanks guy's i'll ask in the Carbon-dev list.

  Sorry - I didn't see the "remote" part of the requirement at first.
After spending some time searching the docs, tech notes, and even some
headers for this myself (because it's an intriguing question), I
couldn't find any good leads either. I'll second the suspicion that
Carbon will likely be needed, but there doesn't appear to be a
well-documented way to do so.

  If you wouldn't mind following up on this thread with any references
you might get on carbon-dev (for those who aren't subscribed), it
would be greatly appreciated.

--
I.S.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting the network Machine Icon

2009-01-12 Thread Sandro Noel

Thanks guy's i'll ask in the Carbon-dev list.

Sandro Noel.

On 11-Jan-09, at 2:31 PM, Sandro Noel wrote:


Greetings

I'm looking for a way to programatically get the machine icon from  
my servers, just like finder does in the finder.
for every type of mac it has a different icon, and for windows  
computers, it;s the nice crash screen icon.


I would like my application to represent the network hosts as finder  
does.


I looked over the internet but could not find how finder does it.
I did however find the icons in /System/Library/CoreServices/ 
CoreTypes.bundle/Contents/Resources/


Any suggestions on where to look??

Thank you in advance.
Sandro Noel.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/sandro.noel%40mac.com

This email sent to sandro.n...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting the network Machine Icon

2009-01-12 Thread matt . gough


On 12 Jan 2009, at 18:19, Jean-Daniel Dupas wrote:




NSImage.  I think it's NSImageNameComputer.


Fine to get the current machine icon, but not to get a remote  
machine icon, just like the Finder does when it display the list of  
machine on the local network.




I don't know, but you could ask the same question on Carbon-Dev. At  
least one Finder engineer hangs out there.


Matt Gough
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting the network Machine Icon

2009-01-12 Thread Jean-Daniel Dupas


Le 12 janv. 09 à 17:56, Sean McBride a écrit :


On 1/11/09 2:31 PM, Sandro Noel said:


I'm looking for a way to programatically get the machine icon from my
servers, just like finder does in the finder.

*SNIP*.

Any suggestions on where to look??


NSImage.  I think it's NSImageNameComputer.


Fine to get the current machine icon, but not to get a remote machine  
icon, just like the Finder does when it display the list of machine on  
the local network.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting the network Machine Icon

2009-01-12 Thread I. Savant
On Mon, Jan 12, 2009 at 11:56 AM, Sean McBride  wrote:

> NSImage.  I think it's NSImageNameComputer.

  Yep:

  
http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGIcons/chapter_15_section_10.html#

--
I.S.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting the network Machine Icon

2009-01-12 Thread Sean McBride
On 1/11/09 2:31 PM, Sandro Noel said:

>I'm looking for a way to programatically get the machine icon from my
>servers, just like finder does in the finder.
>
> *SNIP*.
>
>Any suggestions on where to look??

NSImage.  I think it's NSImageNameComputer.

--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com