// Copyright (C) Intel Corporation, 2010 All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace Intel.Management.Wsman
{
///
/// Represents a reference to a CIM resource
///
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("2C3278AB-3CDC-4921-8854-6F437C606A4B")]
[ComVisible(true)]
public interface IManagedReference
{
///
/// Gets the connection object associated with the reference
///
IWsmanConnection Connection {get;}
///
/// Gets resourceUri of the reference
///
string ResourceUri {get;}
///
/// Get The simple name of the resource
///
string SimpleName { get; }
///
/// Gets the address of the reference
///
string Address {get;}
///
/// Gets the XML representation of the reference
///
string Xml {get;set;}
///
/// Adds a selector that be used to find instances
///
/// The name of the selector
/// The value of the selector
void AddSelector(string name, object value);
///
/// Creates input parameters for invoking methods
///
/// The name of the method to create parameters for
/// Returns an instance that parameters can be added to
IManagedInstance CreateMethodInput(string methodName);
///
/// Gets instance data from the server
///
/// An IManagedInstance object that reference represents
IManagedInstance Get();
///
/// Puts (updates) an instance data associated with the reference
///
/// The instance data
/// Returns the updated instance
IManagedInstance Put(object input);
///
/// Deletes the referenced object from the server
///
void Delete();
///
/// Enumerates instances associated with the reference
///
/// Optional input filter
/// Optional enumeration mode
/// An enumeration object
IWsmanEnumeration Enumerate
([Optional, DefaultParameterValue(null)]object input,
[Optional, DefaultParameterValue(null)]string mode);
///
/// Invokes a method
///
/// Method parameters
/// The method output parameters
IManagedInstance InvokeMethod(object input);
///
/// Subscribes to receive events emitted by the object
///
/// The delivery mode
/// The address to deliver events to
/// A reference to the subscription service
IManagedReference Subscribe(string mode, string toAddress);
///
/// End subscribing to events
///
void Unsubscribe();
}
}