The QueueWapPushSendingEventArgs class prepares data for the
QueueWapPushSending event.
Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)
Inherits: System.EventArgs
| Property | Description | Type |
| DestinationNumber | Destination mobile phone number to which the WAP Push message is being sent | String |
| Priority | Queue priority of the WAP Push message being sent | SMS.EnumQueuePriority |
| QueueMessageKey | Unique key as string that identifies the WAP Push message in the queue | String |
| Visual Basic |
| Public Class MyClass Public WithEvents objSMS As New mCore.SMS Public Sub SendQueue() Dim objWP As mCore.WapPush = objSMS.vCalendar Dim strKey As String = "" Try SetCommParameters() objWP.Destination = "+919873094767" objWP.Text = "Check your emails online" objWP.URL = "http://www.mobulus.com/mobile" objWP.Action = mCore.WapPushAction.SignalMedium objWP.Created = DateTime.Now objWP.Expiry = "1W" If objWP.IsLengthOK Then strKey = objWP.SendToQueue(mCore.QueuePriority.High) MsgBox("WAP Push message added to queue." & vbCrLf & _ "[Queue Key: " & strKey & "]") End If objWP.Destination = "+919810098765" If objWP.IsLengthOK Then 'Following message is sent with normal queue priority strKey = objWP.SendToQueue() MsgBox("WAP Push message added to queue." & vbCrLf & _ "[Queue Key: " & strKey & "]") End If objWP.Destination = "+919811045678" If objWP.IsLengthOK Then strKey = objWP.SendToQueue(mCore.QueuePriority.Low) MsgBox("WAP Push message added to queue." & vbCrLf & _ "[Queue Key: " & strKey & "]") End If 'Message queue is enabled objSMS.Queue.Enabled = True 'Messages can be added to the queue even 'when the Message queue is enabled objWP.Destination = "+919873012345" If objWP.IsLengthOK Then strKey = objWP.SendToQueue(mCore.QueuePriority.High) MsgBox("WAP Push message added to queue." & vbCrLf & _ "[Queue Key: " & strKey & "]") End If Catch ex As mCore.GeneralException MsgBox(ex.Message, MsgBoxStyle.Critical, "mCore Demo") Catch ex As Exception End Try End Sub 'Event at the start of sending a queued WAP Push message Private Sub objSMS_QueueWapPushSending(ByVal sender As Object, _ ByVal e As mCore.QueueWapPushSendingEventArgs) _ Handles objSMS.QueueWapPushSending MsgBox("Sending WAP Push message to: " & e.DestinationNumber & vbCrLf & _ "[Queue Key: " & e.QueueMessageKey & _ "]", MsgBoxStyle.Information, "SENDING WAP PUSH") End Sub 'Event at the end of sending a queued WAP Push message Private Sub objSMS_QueueWapPushSent(ByVal sender As Object, _ ByVal e As mCore.QueueWapPushSentEventArgs) _ Handles objSMS.QueueWapPushSent If e.ErrorCode > 0 Then MsgBox("WAP Push message sending FAILED to: " & e.DestinationNumber & _ vbCrLf & "[ERROR: " & e.ErrorDescription & _ "]" & vbCrLf & "[Queue Key: " & e.QueueMessageKey & _ "]", MsgBoxStyle.Critical, "WAP PUSH FAILED") Else MsgBox("WAP Push message SENT to: " & e.DestinationNumber & vbCrLf & _ "[Queue Key: " & e.QueueMessageKey & _ "]", MsgBoxStyle.Information, "WAP PUSH SENT") End If End Sub Public Sub SetCommParameters() Try objSMS.Port = "COM1" objSMS.BaudRate = mCore.BaudRate.BaudRate_19200 objSMS.DataBits = mCore.DataBits.Eight objSMS.StopBits = mCore.StopBits.One objSMS.Parity = mCore.Parity.None objSMS.FlowControl = mCore.FlowControl.RTS_CTS Catch ex As mCore.GeneralException MsgBox(ex.Message) Catch ex As Exception End Try End Function End Class |
| C# |
class MyClass { SetCommParameters(); catch
(mCore.GeneralException e) catch
(mCore.GeneralException e) |
mCore.SMS.QueueWapPushSending Event
mCore.SMS.QueueWapPushSendingEventHandler Delegate