Skip to content
Peter Sinnott edited this page Nov 20, 2013 · 15 revisions

gntp-send

  • a command line binary for sending notifications to growl
  • a library for integrating growl into you c or c++ based applications

Platforms

Sending notifications from Windows / Linux / Mac is supported. Unixes in general should be supported but are untested.
Notifications may be received by Growl on Mac or GrowlForWindows on Windows.

windows
linux /mac

Logging

If the environmental variable GNTP_DEBUG is set the tcp protocol communication is output to STDOUT.

C Functions

int growl( server , appname, notify , title , message , icon , notification_icon , password , url )

Send tcp notification. This is supported by GrowlForWindows , GrowlForAndroid , Snarl and MacGrowl v1.3.

  • server – hostname to send notification to , port can optionally be specified e.g hostname:80
  • appame – id for application sending notification
  • tite – title for notification
  • message – notification text
  • icon – url or file name for application icon or NULL
  • notification_icon – url or file name for notification icon or NULL
  • password
  • url – website to direct user to if they click notification or NULL

int growl_udp( server , appname, notify , title , message , icon , password , url )

Send udp notification. This is supported by both GrowlForWindows and MacGrowl v1.2

As above except icon and url are ignored.


In addition to the high level functions there are lower level functions that just handle application registration or notifications. These give a little more control over the registration/notification life cycle but the convenience functions are usually best used.

int growl_tcp_register( server , appname , notifications , notifications_count , password, icon );

int growl_tcp_notify( server , appname , notify , title , message , password, url, icon )

int growl_udp_register( server , appname , notifications , notifications_count , password )

int growl_udp_notify( server , appname , notify , title , message , password )

C++ Objects

Growl *grow = new Growl( protocol , password , appname , notifications , notifications_count );
growl→Notify( notification1 , title , message );
growl→Notify( notification2 , title , message );

Clone this wiki locally