Esempio n. 1
0
        public BaseResult <SMSSendResult> Send(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);

            GSMCommunication.Feature.SMS sms    = new GSMCommunication.Feature.SMS(param.TryGet <BasicInformation>("base"));
            BaseResult <SMSSendResult>   result = null;

            result = sms.Send(param.TryGet <string>("message"), param.TryGet <string>("number"));
            if (result != null)
            {
                result.ID = param.TryGet <string>("id");

                IInternalLogging logging    = ObjectPool.Instance.Resolve <IInternalLogging>();
                ISMSLogging      smsLogging = ObjectPool.Instance.Resolve <ISMSLogging>();

                if (logging != null)
                {
                    logging.Write(result);
                }
                if (smsLogging != null)
                {
                    smsLogging.Send(result);
                }
            }

            return(result);
        }
Esempio n. 2
0
        public string GetRawXml(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);

            GSMServer.Configuration.IConfiguration config = ObjectPool.Instance.Resolve <GSMServer.Configuration.IConfiguration>();
            string section = param.TryGet <string>("section");

            return(config.GetRawXml(section));
        }
Esempio n. 3
0
        public BaseResult <GenericTypeResult <List <string> > > GetPossibleCharacterSet(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);
            BasicInformation      basic = param.TryGet <BasicInformation>("base");
            BaseResult <GenericTypeResult <List <string> > > result = basic.GetPossibleCharacterSet();

            result.ID = param.TryGet <string>("id");

            IInternalLogging logging = ObjectPool.Instance.Resolve <IInternalLogging>();

            if (logging != null)
            {
                logging.Write(result);
            }
            return(result);
        }
Esempio n. 4
0
        public BaseResult <GenericTypeResult <bool> > SetErrorMessageFormat(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);
            BasicInformation      basic = param.TryGet <BasicInformation>("base");
            BaseResult <GenericTypeResult <bool> > result = basic.SetErrorMessageFormat(param.TryGet <int>("format"));

            result.ID = param.TryGet <string>("id");

            IInternalLogging logging = ObjectPool.Instance.Resolve <IInternalLogging>();

            if (logging != null)
            {
                logging.Write(result);
            }
            return(result);
        }
Esempio n. 5
0
        public BaseResult <GenericTypeResult <bool> > SetFunctionality(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);
            BasicInformation      basic = param.TryGet <BasicInformation>("base");
            BaseResult <GenericTypeResult <bool> > result = basic.SetFunctionality((FunctionalityLevel)Convert.ToInt32(param.TryGet <string>("level")));

            result.ID = param.TryGet <string>("id");

            IInternalLogging logging = ObjectPool.Instance.Resolve <IInternalLogging>();

            if (logging != null)
            {
                logging.Write(result);
            }
            return(result);
        }
Esempio n. 6
0
        public BaseResult <GenericTypeResult <bool> > WritePhoneBook(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);

            GSMCommunication.Feature.PhoneBook     pb     = new GSMCommunication.Feature.PhoneBook(param.TryGet <BasicInformation>("base"));
            BaseResult <GenericTypeResult <bool> > result = pb.WritePhoneBook(param.TryGet <string>("memory"), param.TryGet <string>("index"), param.TryGet <string>("name"), param.TryGet <string>("phonenumber"));

            result.ID = param.TryGet <string>("id");

            IInternalLogging logging = ObjectPool.Instance.Resolve <IInternalLogging>();

            if (logging != null)
            {
                logging.Write(result);
            }
            return(result);
        }
Esempio n. 7
0
        public List <BaseResult <SMSReadResult> > ReadAll(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);

            GSMCommunication.Feature.SMS       sms    = new GSMCommunication.Feature.SMS(param.TryGet <BasicInformation>("base"));
            List <BaseResult <SMSReadResult> > result = sms.Read(SMSStatus.AllMessages);

            IInternalLogging logging    = ObjectPool.Instance.Resolve <IInternalLogging>();
            ISMSLogging      smsLogging = ObjectPool.Instance.Resolve <ISMSLogging>();

            if (smsLogging != null)
            {
                smsLogging.Read(result);
            }

            return(result);
        }
Esempio n. 8
0
        public BaseResult <USSDResult> SendUSSD(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);

            GSMCommunication.Feature.Call call   = new GSMCommunication.Feature.Call(param.TryGet <BasicInformation>("base"));
            BaseResult <USSDResult>       result = call.SendUSSD(param.TryGet <string>("code"), param.TryGet <string>("number"));

            result.ID = param.TryGet <string>("id");

            IInternalLogging logging = ObjectPool.Instance.Resolve <IInternalLogging>();

            if (logging != null)
            {
                logging.Write(result);
            }
            return(result);
        }
Esempio n. 9
0
        public BaseResult <GenericTypeResult <bool> > Answer(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);

            GSMCommunication.Feature.Call          call   = new GSMCommunication.Feature.Call(param.TryGet <BasicInformation>("base"));
            BaseResult <GenericTypeResult <bool> > result = call.Answer();

            result.ID = param.TryGet <string>("id");

            IInternalLogging logging = ObjectPool.Instance.Resolve <IInternalLogging>();

            if (logging != null)
            {
                logging.Write(result);
            }
            return(result);
        }