예제 #1
1
 public Growler( string              applicationName, 
                 NotificationType[]  notificationTypes)
 {
     _notificationTypes = notificationTypes;
     _application = new Application(applicationName);
     _growl = new GrowlConnector
                  {
                      EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText
                  };
     _growl.Register(_application, _notificationTypes);
 }
        public override void Subscribe()
        {
            Kill();

            Application app = new Application(APP_NAME);
            app.Icon = FolderWatchHandler.Icon;
            NotificationType[] types = new NotificationType[4];
            types[0] = new NotificationType(TYPE_CHANGED);
            types[1] = new NotificationType(TYPE_CREATED);
            types[2] = new NotificationType(TYPE_DELETED);
            types[3] = new NotificationType(TYPE_RENAMED);
            Register(app, types);

            if (this.watcher == null)
            {
                this.watcher = new FileSystemWatcher();
                this.watcher.Changed += new FileSystemEventHandler(watcher_Changed);
                this.watcher.Created += new FileSystemEventHandler(watcher_Created);
                this.watcher.Deleted += new FileSystemEventHandler(watcher_Deleted);
                this.watcher.Renamed += new RenamedEventHandler(watcher_Renamed);
            }

            this.watcher.Path = this.Path;
            this.watcher.IncludeSubdirectories = this.IncludeSubfolders;
            this.watcher.EnableRaisingEvents = true;
        }
        //Create growl object to register application and send notification.
        public void createGrowlObject()
        {
            //Growl object
            growl = new GrowlConnector();

            //Check growl running or not.
            if (GrowlConnector.IsGrowlRunningLocally())
            {

                //Application name(Spotify) as seen in growl GUI.
                Growl.Connector.Application application = new Growl.Connector.Application("Spotify");

                //Application Icon.
                application.Icon = getCurrentWorkingDirectory();

                NotificationType Spotify_notification_type = new NotificationType("SPOTIFYNOTIFICATION", "Display Notification");
                //Register "Spotify" application
                growl.Register(application, new NotificationType[] { Spotify_notification_type });

                //return growl object to show notification.
                // return growl;

            }
            else
                MessageBox.Show("check Growl running or not","Growl Not Found",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
        }
예제 #4
0
        /// <summary>
        /// Sends a notification to Growl
        /// </summary>
        /// <param name="notificationType">The <see cref="NotificationType">type</see> of notification to send</param>
        /// <param name="title">The notification title</param>
        /// <param name="text">The notification text</param>
        /// <param name="imageUrl">The notification image as a url</param>
        public static void Notify(NotificationType notificationType, string title, string text, string imageUrl)
        {
            Notification notification = new Notification(application.Name, notificationType.Name, String.Empty, title, text);
            notification.Icon = imageUrl;

            growl.Notify(notification);
        }
예제 #5
0
        public Form1()
        {
            InitializeComponent();

            log4net.Config.XmlConfigurator.Configure();

            textBox1.Text = ConfigurationManager.AppSettings["Path"];
            _application = new Application(ApplicationName);

            _workerFiber = new PoolFiber();
            _workerFiber.Start();

            _importar = new Channel<string>();
            _importar.Subscribe(_workerFiber, Work);

            _notificationType = new NotificationType(SampleNotificationType, "Sample Notification");

            _growl = new GrowlConnector { EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.AES };
            _growl.NotificationCallback += GrowlNotificationCallback;
            _growl.Register(_application, new[] { _notificationType });

            folderWatch.Created += FolderWatchCreated;
            folderWatch.Renamed += FolderWatchRenamed;
            folderWatch.Deleted += FolderWatchDeleted;

            InitDatabase();

            if (!_autostart) return;

            Operar(true,true);
        }
예제 #6
0
        public void RegisterForGrowl(string password, string hostName, string tcpPort)
        {
            this.notificationType = new NotificationType(NotificationName, NotificationName);

            int portNum;
            bool isValidPortNum = int.TryParse(tcpPort, out portNum);
            if (!string.IsNullOrEmpty(hostName) && isValidPortNum)
            {
                // use this if you want to connect to a remote Growl instance on another machine
                this.growl = new GrowlConnector(password, hostName, portNum);
            }
            else
            {
                // use this if you need to set a password - you can also pass null or an empty string to this constructor to use no password
                this.growl = new GrowlConnector(password);
            }

            //this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback);

            // set this so messages are sent in plain text (easier for debugging)
            this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;

            this.application = new Growl.Connector.Application(ApplicationName);

            this.growl.Register(application, new NotificationType[] { notificationType });
        }
예제 #7
0
        /// <summary>

        /// NOTE: If you are calling this method from VBScript or another language that

        /// does not have strongly-typed variables, use Register2() instead.

        /// </summary>

        public void Register(Application application, ref NotificationType[] notificationTypes)

        {
            if (application == null)
            {
                throw new ArgumentException("The application cannot be null", "application");
            }

            if (notificationTypes == null || notificationTypes.Length == 0)
            {
                throw new ArgumentException("The list of notification types to register must not be null and must contain at least one notification type.");
            }



            Growl.Connector.Application a = application.UnderlyingApplication;

            Growl.Connector.NotificationType[] nts = new Growl.Connector.NotificationType[notificationTypes.Length];

            for (int i = 0; i < notificationTypes.Length; i++)

            {
                nts[i] = notificationTypes[i].UnderlyingNotificationType;
            }

            this.growl.Register(a, nts);
        }
예제 #8
0
 public GrowlNotification()
 {
     var icon = Path.Combine(Directory.GetCurrentDirectory(), @"img\ycombinator-logo.gif");
     var application = new Application(ApplicationName) {Icon = icon};
     var newStory = new NotificationType(NotificationTypeName, "New Story");
     _growl = new GrowlConnector();
     _growl.Register(application, new[] {newStory});
 }
예제 #9
0
 public static void simpleGrowl(string title, string message = "")
 {
     GrowlConnector simpleGrowl = new GrowlConnector();
     global::Growl.Connector.Application thisApp = new global::Growl.Connector.Application("Forseti");
     NotificationType simpleGrowlType = new NotificationType(GrowlType, "JavaScript test/spec result");
     simpleGrowl.Register(thisApp, new NotificationType[] { simpleGrowlType });
     Notification myGrowl = new Notification("Forseti", GrowlType, title, title, message);
     simpleGrowl.Notify(myGrowl);
 }
예제 #10
0
 public static void simpleGrowl(string title, string message = "")
 {
     var simpleGrowl = new GrowlConnector();
     var thisApp = new Growl.Connector.Application(System.Reflection.Assembly.GetExecutingAssembly().GetName().Name);
     var simpleGrowlType = new NotificationType("SIMPLEGROWL");
     simpleGrowl.Register(thisApp, new NotificationType[] { simpleGrowlType });
     var myGrowl = new Notification(System.Reflection.Assembly.GetExecutingAssembly().GetName().Name, "SIMPLEGROWL", title, title, message);
     simpleGrowl.Notify(myGrowl);
 }
예제 #11
0
 public static void simpleGrowl(string title, string message = "")
 {
     GrowlConnector simpleGrowl = new GrowlConnector();
     Growl.Connector.Application thisApp = new Growl.Connector.Application(System.Windows.Forms.Application.ProductName);
     NotificationType simpleGrowlType = new NotificationType("SIMPLEGROWL");
     simpleGrowl.Register(thisApp, new NotificationType[] { simpleGrowlType });
     Notification myGrowl = new Notification(System.Windows.Forms.Application.ProductName, "SIMPLEGROWL", title, title, message);
     simpleGrowl.Notify(myGrowl);
 }
예제 #12
0
 public void Notify(string title, string message = "", NotificationType notificationType = NotificationType.None)
 {
     var simpleGrowl = new GrowlConnector();
     var thisApplication = new Growl.Connector.Application("Jubilee");
     var simpleGrowlType = new Growl.Connector.NotificationType("SIMPLEGROWL");
     simpleGrowl.Register(thisApplication, new Growl.Connector.NotificationType[] { simpleGrowlType });
     var myGrowl = new Notification("Jubilee", "SIMPLEGROWL", title, title, message);
     simpleGrowl.Notify(myGrowl);
 }
        public SystemBalloonIntercepter(IntPtr handle) : base(handle)
        {
            this.handle = handle;

            this.app       = new Growl.Connector.Application("Windows");
            this.app.Icon  = System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, @"icons\info.png");
            this.ntBalloon = new NotificationType("balloon", "System Balloons");
            this.growl     = new GrowlConnector();
            this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;
        }
예제 #14
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            var growlConnector = new GrowlConnector();
            var application = new Growl.Connector.Application("Hello, growl!");
            var notificationType = new NotificationType("sample", "Test");
            growlConnector.Register(application, new [] {notificationType});

            var notification = new Notification(application.Name, notificationType.Name, "1", "Test", "Hello there!");
            growlConnector.Notify(notification);
        }
예제 #15
0
 public void RegisterGrowl()
 {
     _growl = new GrowlConnector();
     _notificationTypeSucces = new NotificationType("SUCCESS_NOTIFICATION", "Notification Succes");
     _notificationTypeFailure = new NotificationType("FAILURE_NOTIFICATION", "NotificationFailure");
     _application = new Application("NUnit build notifier");
     NotificationType[] notificationList = {_notificationTypeSucces, _notificationTypeFailure};
     _growl.Register(_application, notificationList);
     Thread.Sleep(2000);
 }
예제 #16
0
        void Initialize()
        {
            notificationType = new NotificationType("BUILD_RESULT_NOTIFICATION", "Sample Notification");
            application = new Application("Giles");
            growl = new GrowlConnector
                        {
                            EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText
                        };

            growl.Register(application, new[] { notificationType });
        }
예제 #17
0
        public AppContext()
            : base()
        {
            bool ok = false;
            if (Environment.OSVersion.Version.Major > 5)
            {
                // Vista & higher
                ok = true;

                MMDeviceEnumerator devEnum = new MMDeviceEnumerator();
                this.defaultDevice = devEnum.GetDefaultAudioEndpoint(EDataFlow.eRender, ERole.eMultimedia);
                this.defaultDevice.AudioEndpointVolume.OnVolumeNotification += new AudioEndpointVolumeNotificationDelegate(AudioEndpointVolume_OnVolumeNotification);
            }
            else
            {
                this.spkrVolumeControlID = MM.GetControlID(spkrComponent, spkrVolumeControl);
                this.spkrMuteControlID = MM.GetControlID(spkrComponent, spkrMuteControl);

                if (this.spkrVolumeControlID > 0)
                {
                    ok = true;

                    int v = MM.GetVolume(spkrVolumeControl, spkrComponent);
                    this.currentVolume = ConvertToPercentage(v);

                    this.hwnd = new Hwnd(WndProc);
                    int iw = (int)this.hwnd.Handle;

                    // ... and we can now activate the message monitor 
                    bool b = MM.MonitorControl(iw);
                }
            }

            if (ok)
            {
                NotificationType ntUp = new NotificationType(ntNameVolumeUp);
                NotificationType ntDown = new NotificationType(ntNameVolumeDown);
                NotificationType[] types = new NotificationType[] { ntUp, ntDown };
                Growl.Connector.Application app = new Growl.Connector.Application(appName);
                app.Icon = Properties.Resources.volumeter;

                this.growl = new GrowlConnector();
                this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;
                this.growl.Register(app, types);

                this.timer = new System.Timers.Timer(buffer);
                this.timer.AutoReset = false;
                this.timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
            }
            else
            {
                MessageBox.Show("No speaker/line out component found to monitor");
            }
        }
예제 #18
0
        public GrowlNotifier()
        {
            this.notificationType = new NotificationType(SAMPLENOTIFICATIONTYPE, "Sample Notification");

            this.growl = new GrowlConnector();

            this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback);

            // set this so messages are sent in plain text (easier for debugging)
            this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;

            RegisterToGrowl();
        }
예제 #19
0
        private void Initialize()
        {
            this.timer           = new System.Timers.Timer();
            this.timer.AutoReset = false;
            this.timer.Elapsed  += new System.Timers.ElapsedEventHandler(timer_Elapsed);

            this.webclient                    = new Growl.CoreLibrary.WebClientEx();
            this.webclient.Encoding           = Encoding.UTF8;
            this.webclient.OpenReadCompleted += new OpenReadCompletedEventHandler(webclient_OpenReadCompleted);

            this.ntNewFeedItem = new NotificationType("New Feed Item", "New Feed Item");
            this.ntFeedError   = new NotificationType("Feed Error", "Feed Error");
        }
예제 #20
0
        private void Initialize()
        {
            this.timer = new System.Timers.Timer();
            this.timer.AutoReset = false;
            this.timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);

            this.webclient = new Growl.CoreLibrary.WebClientEx();
            this.webclient.Encoding = Encoding.UTF8;
            this.webclient.OpenReadCompleted += new OpenReadCompletedEventHandler(webclient_OpenReadCompleted);

            this.ntNewFeedItem = new NotificationType("New Feed Item", "New Feed Item");
            this.ntFeedError = new NotificationType("Feed Error", "Feed Error");
        }
예제 #21
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.notificationType = new NotificationType(sampleNotificationType, "Sample Notification");

            this.growl = new GrowlConnector();
            //this.growl = new GrowlConnector("password");    // use this if you need to set a password - you can also pass null or an empty string to this constructor to use no password
            //this.growl = new GrowlConnector("password", "hostname", GrowlConnector.TCP_PORT);   // use this if you want to connect to a remote Growl instance on another machine

            this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback);

            // set this so messages are sent in plain text (easier for debugging)
            this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;
        }
예제 #22
0
        public GrowlNotifier()
        {
            notificationType = new NotificationType(sampleNotificationType, "Network ARP change notification");

            growl = new GrowlConnector();
            //this.growl = new GrowlConnector("password");    // use this if you need to set a password - you can also pass null or an empty string to this constructor to use no password
            //this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback);
            // set this so messages are sent in plain text (easier for debugging)

            growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;

            application = new Application("MacNotifier");

            growl.Register(application, new NotificationType[] { notificationType });
        }
        static Configuration()
        {
            application_name = Properties.Settings.Default.application_name;
            updateUserConfig();

            // configure growl
            growl = new GC.GrowlConnector();
            application = new GC.Application(Configuration.application_name);
            application.Icon = @"Icon.ico";

            // Notifications types available to register
            torrent_started = new GC.NotificationType("STARTED", "Torrent Started");
            torrent_completed = new GC.NotificationType("COMPLETED", "Torrent Completed");
            connection_error = new GC.NotificationType("ERROR", "Connection Error");
        }
예제 #24
0
        public void Register()
        {
            var name = "SQL Aliaser";

            var icons = new StateIcons();

            _application = new Application(name) {
                                                     Icon = new BinaryData(GetIconBytes(icons.NotAliased))
                                                 };

            Resource aliasedIcon = new BinaryData(GetIconBytes(icons.Aliased));
            Resource notAliasedIcon = new BinaryData(GetIconBytes(icons.NotAliased));

            _aliasedNotification = new NotificationType("Aliased", "Aliased", aliasedIcon, true);
            _notAliasedNotification = new NotificationType("NotAliased", "Not Aliased", notAliasedIcon, true);
            _closedNotification = new NotificationType("Closed", "Shut Down");
            _connector.Register(_application, new[] { _aliasedNotification, _notAliasedNotification, _closedNotification });
        }
예제 #25
0
        void Initialize()
        {
            informationNotificationType = new NotificationType("BUILD_RESULT_NOTIFICATION", "Sample Notification");
            successNotificationType = new NotificationType("SUCCESS_NOTIFICATION", "Success Notification");
            failureNotificationType = new NotificationType("FAILURE_NOTIFICATION", "Failure Notification");

            application = new Application("Giles");
            growl = new GrowlConnector
                        {
                            EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText
                        };

            growl.Register(application,
                new[] {
                    informationNotificationType,
                    successNotificationType,
                    failureNotificationType
                });
        }
예제 #26
0
        /* Using this doesn't work either
        private PropertySet _propertySet = new PropertySet(BasePropertySet.IdOnly)
                                  {
                                      ItemSchema.Body
                                  };
        */
        public MainWindow()
        {
            InitializeComponent();
            notificationType = new NotificationType(SampleNotificationType, "Sample Notification");
            growl = new GrowlConnector();
            growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(GrowlNotificationCallback);
            RegisterGrowl();

            growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;
            _exchangeService = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
            //_exchangeService.Credentials = new NetworkCredential("{Active Directory ID}", "{Password}", "{Domain Name}");

            bool success = ConfigureExchange();

            if (!success)
            {
                messageTextBox.AppendText("Not connected");
            }
        }
        public static void Register()
        {
            if (Registered) return;

            Application application = new Application(Resources.WindowTitle);
            using (MemoryStream s = new MemoryStream()) {
                Utilities.ResourceHelper.GetImage("about-icon.png"
                    ).Save(s, ImageFormat.Png);
                application.Icon = new BinaryData(s.ToArray());
            }

            NotificationType new_message = new NotificationType(
                MessageTypes.NEWMESSAGE.ToString(),
                Localization.Locale.Current.Growl.NewMessage);

            Growl.Register(application, new NotificationType[] {
                new_message });

            Registered = true;
        }
예제 #28
0
        public NUnitGrowlAddIn()
        {
            growlConnector = new GrowlConnector();

            if (growlConnector.IsGrowlRunning())
            {

                growlApplication = new Application("NUnit");
                NotificationType[] notificationTypeArr1 = new NotificationType[] {
                                                                                   new NotificationType("NUnit.TestRun.Started"),
                                                                                   new NotificationType("NUnit.TestRun.Succeeded"),
                                                                                   new NotificationType("NUnit.TestRun.Failed"),
                                                                                   new NotificationType("NUnit.TestRun.FirstTestFailed"),
                                                                                   new NotificationType("NUnit.TestRun.Exception")

                };

                NotificationType[] notificationTypes = notificationTypeArr1;
                growlConnector.Register(growlApplication, notificationTypes);

            }
        }
예제 #29
0
        public static void Connect()
        {
            if (!GrowlConnector.IsGrowlRunningLocally())
                MessageBox.Show("Growl isn't running. :(", "Github Issue Notifier", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

            var asm = Assembly.GetExecutingAssembly();
            Image icon;

            using (var stream = asm.GetManifestResourceStream("GitHubNotifier.Embedded.github.png"))
                icon = Image.FromStream(stream);

            var app = new Application("Github Notifier") {
                Icon = icon
            };

            var issueNotification = new NotificationType("ISSUE", "New issue");

            Connector.Register(app, new[] {
                issueNotification
            });

            Connector.NotificationCallback += ConnectorOnNotificationCallback;
        }
예제 #30
0
        public GrowlTrayAppContext()
            : base()
        {
            this.hwnd = new Hwnd(WndProc);

            NotificationType ntInfo = new NotificationType(ntNameInfo, ntNameInfo, Properties.Resources.info, true);
            NotificationType ntWarning = new NotificationType(ntNameWarning, ntNameWarning, Properties.Resources.warning, true);
            NotificationType ntError = new NotificationType(ntNameError, ntNameError, Properties.Resources.error, true);
            NotificationType ntOther = new NotificationType(ntNameOther, ntNameOther, Properties.Resources.windows, true);

            NotificationType[] types = new NotificationType[] { ntInfo, ntWarning, ntError, ntOther };
            Growl.Connector.Application app = new Growl.Connector.Application(appName);
            app.Icon = Properties.Resources.windows;

            this.growl = new GrowlConnector();
            this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;
            this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback);
            if(GROWL) this.growl.Register(app, types);

            timer = new Timer();
            timer.Interval = 5 * 1000;
            timer.Tick += new EventHandler(timer_Tick);
        }
예제 #31
0
        public GrowlDisplay(IGrowlWrapper growl)
        {
            string workingDirectory = AppDomain.CurrentDomain.BaseDirectory;
            string iconpath = Path.Combine(workingDirectory, "images");

            var application = new Application(ApplicationName);
            var success = new NotificationType(Success, "All Tests Pass")
                              {
                                  Icon = Path.Combine(iconpath, "Green.jpg")
                              };

            var fail = new NotificationType(Failed, "A Test Has Failed")
                           {
                               Icon = Path.Combine(iconpath, "Red.jpg")
                           };

            var inconclusive = new NotificationType(Inconclusive, "The Tests Are Inconclusive")
                                   {
                                       Icon = Path.Combine(iconpath, "Yellow.jpg")
                                   };

            _growl = growl;
            _growl.Register(application,new NotificationType[]{success,fail,inconclusive});
        }
예제 #32
0
        public void RegisterGrowl()
        {
            try
            {
                //string[] resourcenames = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames();
                //foreach (string rname in resourcenames)
                //{
                //    API.WriteToLog(Urgency.INFO, rname);
                //}

                Growl.Connector.Application application = new Growl.Connector.Application("zVirtualScenes");
                string exePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);
                application.Icon = new Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("GrowlPlugin.zvirtualscenes57.png"));

                NotificationType DeviceValueChange = new NotificationType(NOTIFY_DEVICE_VALUE_CHANGE, "Device Value Changed");
                DeviceValueChange.Icon = new Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("GrowlPlugin.Broadcast48.png"));

                GrowlConnector.Register(application, new NotificationType[] { DeviceValueChange });
                WriteToLog(Urgency.INFO, "Registered Growl Interface.");
            }
            catch (Exception ex)
            {
                WriteToLog(Urgency.ERROR, "Error registering Growl. " + ex.Message);
            }
        }
        /// <summary>
        /// Registers the specified application and notification types and allows for additional request data.
        /// </summary>
        /// <param name="application">The <see cref="Application"/> to register.</param>
        /// <param name="notificationTypes">The <see cref="NotificationType"/>s to register.</param>
        /// <param name="requestData">The <see cref="RequestData"/> containing the additional information.</param>
        /// <param name="state">An optional state object that will be passed into the response events associated with this request</param>
        public virtual void Register(Application application, NotificationType[] notificationTypes, RequestData requestData, object state)
        {
            HeaderCollection appHeaders = application.ToHeaders();
            List<HeaderCollection> notifications = new List<HeaderCollection>();
            foreach (NotificationType notificationType in notificationTypes)
            {
                HeaderCollection notificationHeaders = notificationType.ToHeaders();
                notifications.Add(notificationHeaders);
            }

            MessageBuilder mb = new MessageBuilder(RequestType.REGISTER, this.GetKey());
            foreach(Header header in appHeaders)
            {
                mb.AddHeader(header);
            }
            mb.AddHeader(new Header(Header.NOTIFICATIONS_COUNT, notificationTypes.Length.ToString()));

            // handle any additional request data
            if (requestData != null)
            {
                HeaderCollection requestDataHeaders = requestData.ToHeaders();
                foreach (Header header in requestDataHeaders)
                {
                    mb.AddHeader(header);
                }
            }

            foreach(HeaderCollection headers in notifications)
            {
                MessageSection ms = new MessageSection();
                foreach(Header header in headers)
                {
                    ms.AddHeader(header);
                }
                mb.AddMessageSection(ms);
            }

            Send(mb, OnResponseReceived, false, state);
        }