83 lines
3.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
namespace Intel.Management.Wsman
{
/// <summary>
/// Represents a connection to a Wsman capable service
/// </summary>
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("9472EA99-DA1D-41a7-BCCE-F77C0916ED52")]
[ComVisible(true)]
public interface IWsmanConnection : IDisposable
{
/// <summary>
/// Gets or sets the username the connection will use to authenticate
/// </summary>
string Username { get; set;}
/// <summary>
/// Gets or sets the password the connection will use to authenticate
/// </summary>
SecureString Password { get;set;}
/// <summary>
/// Gets or sets the address that will be associtated with this connection
/// </summary>
string Address { get;set;}
/// <summary>
/// Gets or sets the authentication scheme the connection will use
/// </summary>
string AuthenticationScheme { get; set; }
/// <summary>
/// Gets or sets the connections options
/// </summary>
IWsmanConnectionOptions Options { get; }
/// <summary>
/// Gets the last error that occured when using the connection
/// </summary>
IWsmanFault LastError { get; }
/// <summary>
/// Tests the connection to see if the endpoint supports Wsman
/// </summary>
IManagedInstance Identify();
/// <summary>
/// Creates a reference to a object supported by a Wsman Service
/// </summary>
/// <param name="resourceUri">A string describing the object reference</param>
/// <return>A IManagedReference pointing to the object</return>
IManagedReference NewReference(string resourceUri);
/// <summary>
/// Creates a new representation of a CIM object that can be exchanged with the server
/// </summary>
/// <param name="resourceUri">A string describing the instance</param>
/// <return>A IManagedInstance representing the resource</return>
IManagedInstance NewInstance(string resourceUri);
/// <summary>
/// Executes a simple SQL type query
/// </summary>
/// <param name="queryString"></param>
/// <return>An IWsmanEnumeration containing resulting items</return>
IWsmanEnumeration ExecQuery(string queryString);
/// <summary>
/// Resolves a class name prefix to a full resourceUri
/// </summary>
/// <param name="prefix"></param>
/// <return>The resoved resourceUri</return>
string ResolveNamespace(string prefix);
/// <summary>
/// Registers a namespaceUri for a class name prefix
/// </summary>
/// <param name="prefix"></param>
/// <param name="ns"></param>
void RegisterNamespace(string prefix, string ns);
/// <summary>
/// Closes the connection
/// </summary>
void Close();
}
}