using System; namespace MassiveKnob.Plugin { /// /// Determines the type of control this action can be assigned to. /// [Flags] public enum MassiveKnobActionType { /// /// Can be assigned to a potentiometer. The action instance must implement IMassiveKnobAnalogAction. /// InputAnalog = 1 << 0, /// /// Can be assigned to a button or switch. The action instance must implement IMassiveKnobDigitalAction. /// InputDigital = 1 << 1, /// /// Can be assigned to an output, like an LED or relay. /// OutputSignal = 1 << 2 } /// /// Provides information about an action which can be assigned to a knob or button. /// public interface IMassiveKnobAction { /// /// Unique identifier for the action. /// Guid ActionId { get; } /// /// Determines the type of control this action can be assigned to. /// MassiveKnobActionType ActionType { get; } /// /// The name of the action as shown in the action list when assigning to a knob or button. /// string Name { get; } /// /// A short description of the functionality provided by the action. /// string Description { get; } /// /// Called when an action is bound to a knob or button to create an instance of the action. /// /// Provides an interface to the Massive Knob settings and device. Can be stored until the action instance is disposed. IMassiveKnobActionInstance Create(IMassiveKnobActionContext context); } }