﻿//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Scada.Agent.Connector.AgentSvcRef {
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="AgentSvcRef.AgentSvc")]
    internal interface AgentSvc {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/CreateSession", ReplyAction="http://tempuri.org/AgentSvc/CreateSessionResponse")]
        bool CreateSession(out long sessionID);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/Login", ReplyAction="http://tempuri.org/AgentSvc/LoginResponse")]
        bool Login(out string errMsg, long sessionID, string username, string encryptedPassword, string scadaInstanceName);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/IsLoggedOn", ReplyAction="http://tempuri.org/AgentSvc/IsLoggedOnResponse")]
        bool IsLoggedOn(long sessionID);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/ControlService", ReplyAction="http://tempuri.org/AgentSvc/ControlServiceResponse")]
        bool ControlService(long sessionID, Scada.Agent.ServiceApp serviceApp, Scada.Agent.ServiceCommand command);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/GetServiceStatus", ReplyAction="http://tempuri.org/AgentSvc/GetServiceStatusResponse")]
        bool GetServiceStatus(out Scada.Agent.ServiceStatus status, long sessionID, Scada.Agent.ServiceApp serviceApp);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/GetAvailableConfig", ReplyAction="http://tempuri.org/AgentSvc/GetAvailableConfigResponse")]
        bool GetAvailableConfig(out Scada.Agent.ConfigParts configParts, long sessionID);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/DownloadConfig", ReplyAction="http://tempuri.org/AgentSvc/DownloadConfigResponse")]
        System.IO.Stream DownloadConfig(long sessionID, Scada.Agent.ConfigOptions configOptions);
        
        // CODEGEN: Generating message contract since the operation UploadConfig is neither RPC nor document wrapped.
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/UploadConfig", ReplyAction="http://tempuri.org/AgentSvc/UploadConfigResponse")]
        Scada.Agent.Connector.AgentSvcRef.UploadConfigResponse UploadConfig(Scada.Agent.Connector.AgentSvcRef.ConfigUploadMessage request);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/PackConfig", ReplyAction="http://tempuri.org/AgentSvc/PackConfigResponse")]
        bool PackConfig(long sessionID, string destFileName, Scada.Agent.ConfigOptions configOptions);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/UnpackConfig", ReplyAction="http://tempuri.org/AgentSvc/UnpackConfigResponse")]
        bool UnpackConfig(long sessionID, string srcFileName, Scada.Agent.ConfigOptions configOptions);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/Browse", ReplyAction="http://tempuri.org/AgentSvc/BrowseResponse")]
        bool Browse(out string[] directories, out string[] files, long sessionID, Scada.Agent.RelPath relPath);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/GetFileAgeUtc", ReplyAction="http://tempuri.org/AgentSvc/GetFileAgeUtcResponse")]
        System.DateTime GetFileAgeUtc(long sessionID, Scada.Agent.RelPath relPath);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/DownloadFile", ReplyAction="http://tempuri.org/AgentSvc/DownloadFileResponse")]
        System.IO.Stream DownloadFile(long sessionID, Scada.Agent.RelPath relPath);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/DownloadFileRest", ReplyAction="http://tempuri.org/AgentSvc/DownloadFileRestResponse")]
        System.IO.Stream DownloadFileRest(long sessionID, Scada.Agent.RelPath relPath, long offsetFromEnd);
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(WrapperName="ConfigUploadMessage", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
    internal partial class ConfigUploadMessage {
        
        [System.ServiceModel.MessageHeaderAttribute(Namespace="http://tempuri.org/")]
        public Scada.Agent.ConfigOptions ConfigOptions;
        
        [System.ServiceModel.MessageHeaderAttribute(Namespace="http://tempuri.org/")]
        public long SessionID;
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
        public System.IO.Stream Stream;
        
        public ConfigUploadMessage() {
        }
        
        public ConfigUploadMessage(Scada.Agent.ConfigOptions ConfigOptions, long SessionID, System.IO.Stream Stream) {
            this.ConfigOptions = ConfigOptions;
            this.SessionID = SessionID;
            this.Stream = Stream;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    internal partial class UploadConfigResponse {
        
        public UploadConfigResponse() {
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    internal interface AgentSvcChannel : Scada.Agent.Connector.AgentSvcRef.AgentSvc, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    internal partial class AgentSvcClient : System.ServiceModel.ClientBase<Scada.Agent.Connector.AgentSvcRef.AgentSvc>, Scada.Agent.Connector.AgentSvcRef.AgentSvc {
        
        public AgentSvcClient() {
        }
        
        public AgentSvcClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public AgentSvcClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public AgentSvcClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public AgentSvcClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public bool CreateSession(out long sessionID) {
            return base.Channel.CreateSession(out sessionID);
        }
        
        public bool Login(out string errMsg, long sessionID, string username, string encryptedPassword, string scadaInstanceName) {
            return base.Channel.Login(out errMsg, sessionID, username, encryptedPassword, scadaInstanceName);
        }
        
        public bool IsLoggedOn(long sessionID) {
            return base.Channel.IsLoggedOn(sessionID);
        }
        
        public bool ControlService(long sessionID, Scada.Agent.ServiceApp serviceApp, Scada.Agent.ServiceCommand command) {
            return base.Channel.ControlService(sessionID, serviceApp, command);
        }
        
        public bool GetServiceStatus(out Scada.Agent.ServiceStatus status, long sessionID, Scada.Agent.ServiceApp serviceApp) {
            return base.Channel.GetServiceStatus(out status, sessionID, serviceApp);
        }
        
        public bool GetAvailableConfig(out Scada.Agent.ConfigParts configParts, long sessionID) {
            return base.Channel.GetAvailableConfig(out configParts, sessionID);
        }
        
        public System.IO.Stream DownloadConfig(long sessionID, Scada.Agent.ConfigOptions configOptions) {
            return base.Channel.DownloadConfig(sessionID, configOptions);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        Scada.Agent.Connector.AgentSvcRef.UploadConfigResponse Scada.Agent.Connector.AgentSvcRef.AgentSvc.UploadConfig(Scada.Agent.Connector.AgentSvcRef.ConfigUploadMessage request) {
            return base.Channel.UploadConfig(request);
        }
        
        public void UploadConfig(Scada.Agent.ConfigOptions ConfigOptions, long SessionID, System.IO.Stream Stream) {
            Scada.Agent.Connector.AgentSvcRef.ConfigUploadMessage inValue = new Scada.Agent.Connector.AgentSvcRef.ConfigUploadMessage();
            inValue.ConfigOptions = ConfigOptions;
            inValue.SessionID = SessionID;
            inValue.Stream = Stream;
            Scada.Agent.Connector.AgentSvcRef.UploadConfigResponse retVal = ((Scada.Agent.Connector.AgentSvcRef.AgentSvc)(this)).UploadConfig(inValue);
        }
        
        public bool PackConfig(long sessionID, string destFileName, Scada.Agent.ConfigOptions configOptions) {
            return base.Channel.PackConfig(sessionID, destFileName, configOptions);
        }
        
        public bool UnpackConfig(long sessionID, string srcFileName, Scada.Agent.ConfigOptions configOptions) {
            return base.Channel.UnpackConfig(sessionID, srcFileName, configOptions);
        }
        
        public bool Browse(out string[] directories, out string[] files, long sessionID, Scada.Agent.RelPath relPath) {
            return base.Channel.Browse(out directories, out files, sessionID, relPath);
        }
        
        public System.DateTime GetFileAgeUtc(long sessionID, Scada.Agent.RelPath relPath) {
            return base.Channel.GetFileAgeUtc(sessionID, relPath);
        }
        
        public System.IO.Stream DownloadFile(long sessionID, Scada.Agent.RelPath relPath) {
            return base.Channel.DownloadFile(sessionID, relPath);
        }
        
        public System.IO.Stream DownloadFileRest(long sessionID, Scada.Agent.RelPath relPath, long offsetFromEnd) {
            return base.Channel.DownloadFileRest(sessionID, relPath, offsetFromEnd);
        }
    }
}
