Exemple #1
0
        public SmsService.SendWAPPushOutput Send(WapPushMessage message)
        {
            //_smsInput.SHORT_NUMBER = "7023";
            _wapPushInput.SHORT_NUMBER = message.ShortNumber;
            int messageCount = message.Recievers.Count;

            _wapPushInput.TO_RECEIVERS = new string[messageCount];
            _wapPushInput.MESSAGE_BODY = new string[messageCount];
            _wapPushInput.SENDER       = message.Sender;
            _wapPushInput.S_DATE       = message.SendDate;
            _wapPushInput.EXPIRY_DATE  = message.ExpryDate;
            _wapPushInput.MESSAGE_HREF = new string[1];
            for (int i = 0; i < messageCount; i++)
            {
                _wapPushInput.TO_RECEIVERS.SetValue(message.Recievers[i], i);
                // _smsInput.TO_RECEIVERS.SetValue("905330000000", 0);
                //_smsInput.MESSAGE_BODY.SetValue("Bu bir test mesajıdır!", 0);
                _wapPushInput.MESSAGE_BODY.SetValue(message.MessageBody[0], i);
                _wapPushInput.MESSAGE_HREF.SetValue(message.MessageUrl[0], i);
                _transactionList[0] = "64324423";
            }
            SmsGatewayTurkcell.SmsService.SendWAPPushOutput output = _smsClient.SendWAPPush(_smsToken, _transactionList, _wapPushInput);

            _smsClient.Close();
            return(output);
        }
        public static SMSSubmit ServiceLoadingMessage()
        {
            ServiceLoading sl = new ServiceLoading();

            sl.Action = ServiceLoadingAction.Execute_high;
            // This is a cab file with Total Commander for Windows Mobile 5/6/6.5
            sl.Href = "http://ghisler.fileburst.com/ce/tcmdphone.cab";

            WapPushMessage wapPushMessage = new WapPushMessage(sl);

            wapPushMessage.XWapInitiatorURI = "SharpSMS";
            return(new SMSSubmit(wapPushMessage));
        }
        public static SMSSubmit ServiceIndicationMessage()
        {
            ServiceIndication si = new ServiceIndication();

            si.Action  = ServiceIndicationAction.Signal_medium;
            si.Text    = "Service indication from SharpSMS";
            si.Href    = "https://github.com/pbansky/SharpSMS";
            si.Expires = DateTime.Now.AddDays(3);

            WapPushMessage wapPushMessage = new WapPushMessage(si);

            wapPushMessage.XWapInitiatorURI = "SharpSMS";

            return(new SMSSubmit(wapPushMessage));
        }
        public static SMSSubmit WapPushConfiguration()
        {
            // This is a configuration XML for Windows Mobile Internet Explorer Favorites
            string configXML = @"<wap-provisioningdoc><characteristic type=""BrowserFavorite""><characteristic type=""SharpSMS""><parm name=""URL"" value=""https://github.com/pbansky/SharpSMS""/></characteristic></characteristic></wap-provisioningdoc>";

            WapPushMessage wapPushMessage = new WapPushMessage();

            wapPushMessage.XWapInitiatorURI = "SharpSMS";

            wapPushMessage.ContentType = "text/vnd.wap.connectivity-xml";
            wapPushMessage.Data        = Encoding.UTF8.GetBytes(configXML);

            wapPushMessage.Security = Wsp.SecurityMethod.USERPIN;
            wapPushMessage.UserPin  = "1234";

            return(new SMSSubmit(wapPushMessage));
        }
Exemple #5
0
 public abstract WapPushMessageOutPut SendWapPushMessage(WapPushMessage message);