示例#1
0
文件: Service.cs 项目: jesumarquez/lt
        public Refresh Refresh(String sessionId)
        {
            const String op  = "Refresh";
            var          par = PostParams.Create().Add("SESSION_ID", sessionId);
            var          res = Request(op, par);

            return(new Refresh(res.DocumentElement));
        }
示例#2
0
文件: Service.cs 项目: jesumarquez/lt
        public Logout Logout(String sessionId)
        {
            const String op  = "Logout";
            var          par = PostParams.Create().Add("SESSION_ID", sessionId);
            var          res = Request(op, par);

            return(new Logout(res.DocumentElement));
        }
示例#3
0
文件: Service.cs 项目: jesumarquez/lt
        public Authenticate Authenticate(string user, string password)
        {
            const string op  = "Authenticate";
            var          par = PostParams.Create().Add("LOGIN", user)
                               .Add("PSSWD", password)
                               .Add("VERSION", "2");
            var res = Request(op, par);

            return(new Authenticate(res.DocumentElement));
        }
示例#4
0
文件: Service.cs 项目: jesumarquez/lt
        public QueryDeviceStatus QueryDeviceStatus(String sessionId, String deviceId)
        {
            const String op  = "QueryDeviceStatus";
            var          par = PostParams.Create().Add("SESSION_ID", sessionId)
                               .Add("DEVICE_ID", deviceId)
                               .Add("VERSION", "2");
            var res = Request(op, par);

            return(new QueryDeviceStatus(res.DocumentElement));
        }
示例#5
0
文件: Service.cs 项目: jesumarquez/lt
        public DeleteMessage DeleteMessage(String sessionId, String confNum)
        {
            const String op  = "DeleteMessage";
            var          par = PostParams.Create().Add("SESSION_ID", sessionId)
                               .Add("CONF_NUM", confNum)
                               .Add("VERSION", "2");
            var res = Request(op, par);

            return(new DeleteMessage(res.DocumentElement));
        }
示例#6
0
文件: Service.cs 项目: jesumarquez/lt
        public QueryMessageStatus QueryMessageStatus(String sessionId, String confNum)
        {
            const String op  = "QueryMessageStatus";
            var          par = PostParams.Create().Add("SESSION_ID", sessionId)
                               .Add("CONF_NUM", confNum)
                               .Add("MESSAGE", "1")
                               .Add("VERSION", "2");
            var res = Request(op, par);

            return(new QueryMessageStatus(res.DocumentElement));
        }
示例#7
0
文件: Service.cs 项目: jesumarquez/lt
        public static SetMessageFlag SetMessageFlag(String sessionId, int select, String criteria, int setMessageFlag)
        {
            const String op  = "SetMessageFlag";
            var          par = PostParams.Create().Add("SESSION_ID", sessionId)
                               .Add("SELECT", select.ToString(CultureInfo.InvariantCulture))
                               .Add("CRITERIA", criteria)
                               .Add("FLAG", setMessageFlag.ToString(CultureInfo.InvariantCulture));
            var res = Request(op, par);

            return(new SetMessageFlag(res.DocumentElement));
        }
示例#8
0
文件: Service.cs 项目: jesumarquez/lt
        public SendMessage SendMessage(String sessionId, String deviceId, String subject, String body, bool bodyBinary)
        {
            const String op  = "SendMessage";
            var          par = PostParams.Create().Add("SESSION_ID", sessionId)
                               .Add("DEVICE_ID", deviceId)
                               .Add("NETWORK_ID", "3")
                               .Add("MESSAGE_SUBJECT", subject)
                               .Add("MESSAGE_BODY_TYPE", bodyBinary ? "1" : "0")
                               .Add("MESSAGE_BODY", body)
                               .Add("SEND_TIME", "************");
            var res = Request(op, par);

            return(new SendMessage(res.DocumentElement));
        }
示例#9
0
文件: Service.cs 项目: jesumarquez/lt
        public RetrieveMessages RetrieveMessages(String sessionId, int messageFlag, int setMessageFlag, int messageStatusFlag, int messageId, bool returnMessageBody)
        {
            const String op  = "RetrieveMessages";
            var          par = PostParams.Create().Add("SESSION_ID", sessionId)
                               .Add("NETWORK_ID", "3")
                               .Add("MSG_FLAG", messageFlag.ToString(CultureInfo.InvariantCulture))
                               .Add("SET_FLAG", setMessageFlag.ToString(CultureInfo.InvariantCulture))
                               .Add("MSG_STATUS", messageStatusFlag.ToString(CultureInfo.InvariantCulture))
                               .Add("MESSAGE_ID", messageId.ToString(CultureInfo.InvariantCulture))
                               .Add("MESSAGE", returnMessageBody ? "1" : "0")
                               .Add("MTAG", "1")
                               .Add("VERSION", "2");
            var res = Request(op, par);

            return(new RetrieveMessages(res.DocumentElement));
        }