Beispiel #1
0
        private static void FullSearch()
        {
            ParamBuilder oParamBuilder = new ParamBuilder();
            SearchResults = new List<Item>();

            oParamBuilder.addParam("sid", StaticSessionSettings.sessionID);
            oParamBuilder.addParam("q", "");

            var oComm = new Api();
            var result = oComm.getResponseFromOrb<List<Item>>(Api.mediasearch, oParamBuilder.GetParamList());

            List<Item> Temp = new List<Item>();

            Temp = result;

            SearchResults.Clear();

            foreach (var item in Temp)
            {
                if (!string.IsNullOrWhiteSpace(item.field))
                    SearchResults.Add(item);
            }

            iveFullySearched = true;
        }
Beispiel #2
0
        public bool sessionkeepAlive()
        {
            var oParamBuilder = new ParamBuilder();
            
            var oComm = new Api();
            oParamBuilder.addParam("sid", StaticSessionSettings.sessionID);
            var result = oComm.getResponseFromOrb<Status>(Api.sessionkeepAlive, oParamBuilder.GetParamList());

            if (result.code == "0")
                return true;

            return false;
        }
Beispiel #3
0
        public PcStatus computergetStatus(string elementName)
        {
            
            if (StaticSessionSettings.sessionID == "")
            {
                throw new Exception("No sessionID specified.");
            }


            var oComm = new Api();
            var result = oComm.getResponseFromOrb<PcStatus>(Api.computergetStatus, "sid=" + StaticSessionSettings.sessionID);
           
            
            return result;
        }
Beispiel #4
0
        public bool sessionlogin(string username, string password)
        {
            StaticSessionSettings.username = username;
            StaticSessionSettings.password = password;

            var oComm = new Api();
            var oParamBuilder = new ParamBuilder();
            var blnLoggedIn = false;

            oParamBuilder.addParam("apiKey", StaticSessionSettings.applicationKey);
            oParamBuilder.addParam("l", StaticSessionSettings.username);
            oParamBuilder.addParam("password", StaticSessionSettings.password);

            var result = oComm.getResponseFromOrb<Status>(Api.sessionlogin, oParamBuilder.GetParamList());

            StaticSessionSettings.sessionID = result.orbSessionId;
           // if(result.code == "0") 
                blnLoggedIn = true;
            StaticSessionSettings.sessionExpireTime = result.maxInactiveInterval;
           
            return blnLoggedIn;
        }