using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ShiftOS.Engine
{
///
/// Interface for creating a Shiftnet website.
///
public interface IShiftnetSite
{
///
/// Called when the page is loaded. Perform data population here.
///
void Setup();
///
/// Occurs when a ShiftOS skin is loaded.
///
void OnSkinLoad();
///
/// Occurs when a Shiftorium upgrade is installed.
///
void OnUpgrade();
///
/// Invoke this to navigate the parent browser to a specified Shiftnet URL.
///
event Action GoToUrl;
///
/// Invoke this to tell the parent browser to navigate to the previous page.
///
event Action GoBack;
}
///
/// Marks a shiftnet site as a fundamental, and will make it display on the homepage.
///
public class ShiftnetFundamentalAttribute : Attribute
{
}
///
/// Interface for creating a Shiftnet client.
///
public interface IShiftnetClient
{
///
/// Navigates the client to a specified Shiftnet URL.
///
/// The URL to navigate to.
void NavigateToUrl(string url);
///
/// Refreshes the current page.
///
void RefreshSite();
}
///
/// Marks this class as a Shiftnet website.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple =false)]
public class ShiftnetSiteAttribute : Attribute
{
///
/// Creates a new instance of the class.
///
/// The URL that links to this site
/// The name of this site
/// The description of this site
public ShiftnetSiteAttribute(string url, string name, string description)
{
Url = url;
Name = name;
Description = description;
}
///
/// Gets the Shiftnet URL for this site.
///
public string Url { get; private set; }
///
/// Gets the name of this website.
///
public string Name { get; private set; }
///
/// Gets the description of this website.
///
public string Description { get; private set; }
}
}