Beispiel #1
0
        Response server_NotifyReceived(Notification notification, Growl.Daemon.CallbackInfo callbackInfo, Growl.Connector.RequestInfo requestInfo)
        {
            Response response = new Response();

            if (callbackInfo != null)
            {
                if (callbackInfo.ShouldKeepConnectionOpen())
                {
                    response.SetCallbackData(notification.ID, callbackInfo.Context, Growl.CoreLibrary.CallbackResult.CLICK);

                    // simulate a wait
                    System.Threading.Thread.Sleep(5000);
                }
                else
                {
                    string url = callbackInfo.Context.CallbackUrl;
                    server_ServerMessage(null, Growl.Daemon.GrowlServer.LogMessageType.Information, url);
                }
            }

            //Console.WriteLine("notification response");
            return response;
        }