Can somebody suggest the best means of dispatching a Growl
notification (and registration) from an Adobe AIR app?
I am assuming possible incorrectly that the only means I have is via a
TCP socket - in which case the user would have to manually enable
remote connections (via prefs) and set password on both ends, etc. A
tad tedious for the end user.
That said, if my assumptions are correct, is there any other mechanism
that could be enabled in a future build given the limitations of AIR?
Regards,
Corey L.
> Can somebody suggest the best means of dispatching a Growl
> notification (and registration) from an Adobe AIR app?
What is AIR, what is/are its platform(s), what is its programming
language, what are its plugin capabilities, and what are its
limitations?
-Evan
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Example apps:
http://labs.adobe.com/showcase/air/
Essentially Adobe AIR (Apollo) is a desktop runtime allow folks to
create cross platform desktop apps with Webkit + Flash. The apps are
essentially running in a desktop sandbox, tied down to a common set of
APIs (no direct access to system calls and system apis). Developers
can access the file system, save files, manage windows, open local and
remote TCP sockets, etc... but no ability to execute tasks, or invoke
things like Applescript. Locked down to abstraction layer only.
-Corey
>Quoting CoreyDotCom <corey....@gmail.com>:
>
>
>
>>Can somebody suggest the best means of dispatching a Growl
>>notification (and registration) from an Adobe AIR app?
>>
>>
>
>What is AIR, what is/are its platform(s), what is its programming
>language, what are its plugin capabilities, and what are its
>limitations?
>
>
It's a cross platform runtime:
http://labs.adobe.com/technologies/air/
Apparently it's pretty fancy, lightroom was written in it if I remember
right.
Chris
>I am assuming possible incorrectly that the only means I have is via a
>TCP socket - in which case the user would have to manually enable
>remote connections (via prefs) and set password on both ends, etc. A
>tad tedious for the end user.
>
>
Will this help you?
http://growl.info/documentation/developer/protocol.php
svn co http://src.growl.info/growl/trunk/Bindings/network/
growl-network-bindings
Chris
-C
Chris
If you can interface to cocoa, that'd be easier, but since, based on
what you said, I don't think that'll work, I don't know what to tell you
to try.
I do not agree that going into network prefs is a hassle for the end
user, which is why I said what I did about networking. Since I believe
you may end up coming back to networking as the only way to do this, I
wanted to address that up front.
Chris
You are welcome to help us work on 1.2 or later to get TCP support in,
if that'll help you with AIR bindings.
Chris
Corey Lucier wrote:
> Thanks for the insight. My assertion though was correct (given the
> fact that AIR does not support UDP sockets - leaving me with TCP).
> And alas, no NSDistributedNotificationCenter.
>
> Being a UI guy only - curious... Would there be a way for Growl to
> somehow support only local (same machine) connections to a TCP socket?
> Without need for user to enable remote connections? Or by creating a
> socket/port listener there really is no "localhost" only mode?
>
> -C
>
>
> On 9/7/07, *Chris Forsythe* <ch...@growl.info
Guess I meant something like this.
What if Growl was always listening to a particular TCP port - and *by
default* would allow connections if and only if, the connection was
made locally. Otherwise it would require (as it does today), the user
to enable remote connections manually in the preferences.
I don't speak Cocoa but, in cookbook terms:
SOCKET s = accept(wParam,NULL, NULL);
//PRINT("FD_ACCEPT on response server (%d)\n", s);
if(s)
{
// ignore requests not from localhost
struct sockaddr name;
int namelen = sizeof(name);
if(0 == getpeername(s, &name, &namelen))
{
char hostName[NI_MAXHOST];
char servInfo[NI_MAXSERV];
if (0 == getnameinfo((SOCKADDR *)&name,
sizeof(name), hostName, NI_MAXHOST, servInfo, NI_MAXSERV,
NI_NUMERICSERV))
{
if("localhost" == string(hostName) ||
string(hostName) == string(gethostbyname("")->h_name))
{
CComPtr<Response> response(new
CComObject<Response>);
response->SetSocket(s);
mResponses.push_back(response);
return 0;
}
}
}
}
closesocket(s);
One of the devs pointed out to me via im that perhaps Adobe could add
Growl support into AIR. Think that's worth investigating?
Chris