Ejemplo n.º 1
0
        public void Send(string myevent, string mydesc, ProwlNotificationPriority priority = ProwlNotificationPriority.Normal)
        {
            var notification = new ProwlNotification();

            notification.Event       = myevent;
            notification.Description = mydesc;
            notification.Priority    = priority;
            m_prowl.PostNotification(notification);
        }
Ejemplo n.º 2
0
        private void sendProwlMessage(string prowlEvent, string description, ProwlNotificationPriority priority = ProwlNotificationPriority.Normal)
        {
            var notification = new ProwlNotification();

            notification.Event       = prowlEvent;
            notification.Description = description;
            notification.Priority    = priority;
            _prowl.PostNotification(notification);
        }
Ejemplo n.º 3
0
 public static void AddNotificationToQueue(string description, string eventName, ProwlNotificationPriority priority)
 {
     // Queue the notification message
     var newNotification =
             new ProwlNotification
             {
                 Description = description,
                 Event = eventName,
                 Priority = priority
             };
     pushQueue.Enqueue(newNotification);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Sends a prowlnotification with given data
        /// </summary>
        /// <param name="apiKeys">List of API-Keys</param>
        /// <param name="application">Title of the Application</param>
        /// <param name="header">Title of the Event</param>
        /// <param name="message">Message</param>
        /// <param name="priority">Priority of the message</param>
        public static void Notify(List<string> apiKeys, string application, string header, string message, ProwlNotificationPriority priority)
        {
            String[] keyArray = apiKeys.ToArray();
            string apikey = String.Join(",", keyArray);
            Dictionary<string, string> data = new Dictionary<string, string>
                {
                    {Apikey, apikey},
                    {Application, application},
                    {Event, header},
                    {Description, message},
                    {Priortiy, ((sbyte) priority).ToString()}
                };

            Send(data);
        }
Ejemplo n.º 5
0
        public static void AddNotificationToQueue(string description, string eventName, ProwlNotificationPriority priority)
        {
            // Queue the notification message
            var newNotification =
                new ProwlNotification
            {
                Description = description,
                Event       = eventName,
                Priority    = priority
            };

            pushQueue.Enqueue(newNotification);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Sends a prowlnotification with given data
        /// </summary>
        /// <param name="apiKeys">List of API-Keys</param>
        /// <param name="application">Title of the Application</param>
        /// <param name="header">Title of the Event</param>
        /// <param name="message">Message</param>
        /// <param name="priority">Priority of the message</param>
        public static void Notify(List <string> apiKeys, string application, string header, string message, ProwlNotificationPriority priority)
        {
            String[] keyArray = apiKeys.ToArray();
            string   apikey   = String.Join(",", keyArray);
            Dictionary <string, string> data = new Dictionary <string, string>
            {
                { Apikey, apikey },
                { Application, application },
                { Event, header },
                { Description, message },
                { Priortiy, ((sbyte)priority).ToString() }
            };

            Send(data);
        }