GithubHelp home page GithubHelp logo

mattn / gntp-send Goto Github PK

View Code? Open in Web Editor NEW
54.0 11.0 131.0 118 KB

command line program that send to growl using GNTP protocol.

Home Page: http://mattn.kaoriya.net/

License: Other

Shell 0.15% C 86.44% C++ 8.12% SQLPL 0.57% CMake 2.86% Makefile 1.15% M4 0.72%

gntp-send's Introduction

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

C Functions


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

Send tcp notification. Currently this is supported only by GrowlForWindows

  • server - hostname where Growl is running, port can optionally be specified e.g localhost:23053
  • appame - name for application sending notification
  • tite - notification title
  • message - notification text
  • icon - optional url or local file path for notification icon or NULL
  • password - password for Growl
  • 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 Mac Growl.

As above except icon and url are ignored.

C++ Objects


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

Building for MinGW


MinGW is basically gcc for Windows. make is required to build using MinGW.

To build the gntp-send.exe executable and libraries required for integration run

    mingw32-make -f Makefile.w32

Building for Visual Studio


nmake is required to build using Visual Studio.

To build the gntp-send.exe executable and libraries required for integration run

    nmake -f Makefile.msc

Building for UNIX


Max OS X is basically a Unix variant and is covered by these instructions.

gcc/g++ and make are required for building.

To build gntp-send and the libraries required for integration run

    make -f Makefile

Precompiled Binaries


Peter Sinnott provided windows binaries, see:
https://github.com/psinnott/gntp-send

For ubuntu linux, use ppa: https://launchpad.net/~mattn/+archive/gntp-send

License


gntp-send and libraries distributed under BSD license.

Contributors


Please fork on github, and send me pull-requests.

Note to keep my code style.

Authors

Yasuhiro Matsumoto <[email protected]>

Peter Sinnott <[email protected]>

Dither <[email protected]>

gntp-send's People

Contributors

dither avatar edwardbetts avatar eiiches avatar flast avatar kenhys avatar mattn avatar psinnott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gntp-send's Issues

PPA for Ubuntu 12.04

Hi,

could you please add a PPA for Ubuntu 12.04. Since the update, I´m getting errors when I run apt-get...

Thanks,

Januz

Connections not closed properly

in tcp.h

void growl_tcp_close(int sock) {
if (sock < 0) closesocket(sock) ;
}

Negative socket is an error code, so close is only called if the socket is not open..

in growl.c

Since growl_init() is called growl_shutdown() should also be called at the end of these functions:
growl_tcp_register
growl_tcp_notify
growl_udp_register
growl_udp_notify

Empty string password generates hash

There is error that gives unpredicted results with Growl. When growl_tcp_notify called with empty password Growl doesn't generates notification. Further investigation showed that code created hash even for an empty string. The fix is something like this probably:

growl_generate_authheader_alloc(const char*const password) {
    char* authheader = NULL;

    if (password && *password) {
        char *salt = gen_salt_alloc(8);

Installing under OS X

I'm trying to install the library under OS X Lion, but since there's no Makefile, as stated in the README, I thought I should use the autogen.sh first, but this is what I'm getting:

./autogen.sh: line 3: libtoolize: command not found
configure.in:1: error: Autoconf version 2.65 or higher is required
configure.in:1: the top level
autom4te: /usr/bin/gm4 failed with exit status: 63
aclocal: /usr/bin/autom4te failed with exit status: 63
configure.in:1: error: Autoconf version 2.65 or higher is required
configure.in:1: the top level
autom4te: /usr/bin/gm4 failed with exit status: 63
automake: /usr/bin/autoconf failed with exit status: 63
configure.in:1: error: Autoconf version 2.65 or higher is required
configure.in:1: the top level
autom4te: /usr/bin/gm4 failed with exit status: 63

I'm using autoconf 2.69: autoconf: stable 2.69

Any ideas?

Icon from a memory object

Is it possible to rewrite sending code to be compatible with MapViewOfFile or LockResource support for windows? The main idea is to add possibility to send not only file-based but also memory-based images.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.