Пример #1
0
        /// <summary> Called to create a new EnquireLink object </summary>
        /// <param name="defaultEncoding"></param>
        /// <param name="buf"></param>
        /// <param name="offset"></param>
        /// <returns> EnquireLink </returns>
        public static EnquireLinkSm Create(DataCodings defaultEncoding, SmppBuffer buf, ref int offset)
        {
            EnquireLinkSm enquireLink = new EnquireLinkSm(defaultEncoding);

            try
            {
                buf.ExtractHeader(enquireLink, ref offset);
            }

            catch
            {
                enquireLink = null;
            }

            return(enquireLink);
        }
Пример #2
0
        /// <summary> Called to create a new EnquireLink object </summary>
        /// <param name="defaultEncoding"></param>
        /// <param name="buf"></param>
        /// <param name="offset"></param>
        /// <returns> EnquireLink </returns>
        public static EnquireLinkSm Create(DataCodings defaultEncoding, SmppBuffer buf, ref int offset)
        {
            EnquireLinkSm enquireLink = new EnquireLinkSm(defaultEncoding);

            try
            {
                buf.ExtractHeader(enquireLink, ref offset);
            }

            catch
            {
                enquireLink = null;
            }

            return enquireLink;
        }
Пример #3
0
        /// <summary> Called when an enquire link is received </summary>
        /// <param name="sender"></param>
        /// <param name="data"></param>
        private CommandStatus ClientEventEnquireLinkSm(object sender, EnquireLinkSm data)
        {
            WriteLog("ESMEConnection : ClientEventEnquireLinkSm : Info : Enquire Link : Command[{0}] Length[{1}] Sequence[{2}] Status[{3}]", data.Command, data.Length, data.Sequence, data.Status);

            return CommandStatus.ESME_ROK;
        }
Пример #4
0
        /// <summary> Called when an enquire link is received </summary>
        /// <param name="sender"></param>
        /// <param name="data"></param>
        private CommandStatus ClientEventEnquireLinkSm(object sender, EnquireLinkSm data)
        {
            WriteLog("ESMEConnection : ClientEventEnquireLinkSm : Info : Enquire Link : Command[{0}] Length[{1}] Sequence[{2}] Status[{3}]", data.Command, data.Length, data.Sequence, data.Status);

            return(CommandStatus.ESME_ROK);
        }
Пример #5
0
 /// <summary> Called to create a EnquireLinkResp object </summary>
 /// <param name="defaultEncoding"></param>
 /// <param name="enquireLink"></param>
 /// <param name="commandStatus"></param>
 /// <returns> EnquireLinkResp </returns>
 public static EnquireLinkSmResp Create(DataCodings defaultEncoding, EnquireLinkSm enquireLink, CommandStatus commandStatus)
 {
     return(new EnquireLinkSmResp(defaultEncoding, commandStatus, enquireLink.Sequence));
 }
Пример #6
0
        /// <summary> Called to fire the enquire link event </summary>
        /// <param name="data"></param>
        /// <returns> CommandStatus </returns>
        internal CommandStatus OnEnquireLinkSm(EnquireLinkSm data)
        {
            CommandStatus commandStatus = CommandStatus.ESME_ROK;

            try
            {
                if (EnquireLinkSmEvent != null)
                {
                    commandStatus = EnquireLinkSmEvent(this, data);
                }
            }

            catch
            {
            }

            return commandStatus;
        }