removing home/printer/device/media player/media server types
This commit is contained in:
Родитель
d7da3a2a93
Коммит
dcd62cfef3
|
@ -2631,7 +2631,6 @@ module TDev.AST {
|
|||
{ cap: PlatformCapability.EditorOnly, id: "editoronly", name: lf("Editor only") },
|
||||
{ cap: PlatformCapability.Gyroscope, id: "gyroscope", name: lf("Gyroscope") },
|
||||
{ cap: PlatformCapability.Hawaii, id: "hawaii", name: lf("Hawaii") },
|
||||
{ cap: PlatformCapability.Home, id: "home", name: lf("Home media devices") },
|
||||
{ cap: PlatformCapability.Location, id: "location", name: lf("Location") },
|
||||
{ cap: PlatformCapability.Maps, id: "maps", name: lf("Maps") },
|
||||
{ cap: PlatformCapability.Media, id: "media", name: lf("Media libraries on device") },
|
||||
|
|
|
@ -286,17 +286,12 @@ module TDev { export module AST {
|
|||
switch (n) {
|
||||
case "Appointment Collection": collKind = api.getKind("Appointment"); break;
|
||||
case "Contact Collection": collKind = api.getKind("Contact"); break;
|
||||
case "Device Collection": collKind = api.getKind("Device"); break;
|
||||
case "Link Collection": collKind = api.getKind("Link"); break;
|
||||
case "Location Collection": collKind = api.getKind("Location"); break;
|
||||
case "Media Link Collection": collKind = api.getKind("Media Link"); break;
|
||||
case "Media Player Collection": collKind = api.getKind("Media Player"); break;
|
||||
case "Media Server Collection": collKind = api.getKind("Media Server"); break;
|
||||
case "Message Collection": collKind = api.getKind("Message"); break;
|
||||
case "Number Collection": collKind = api.core.Number; break;
|
||||
case "Page Collection": collKind = api.getKind("Page"); break;
|
||||
case "Place Collection": collKind = api.getKind("Place"); break;
|
||||
case "Printer Collection": collKind = api.getKind("Printer"); break;
|
||||
case "String Collection": collKind = api.core.String; break;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ module TDev.Synth {
|
|||
})
|
||||
});
|
||||
return Utils.distinctStrings(kinds);
|
||||
/* ["Action","Appointment", "Appointment Collection", "Bluetooth Device", "Board", "Boolean", "Buffer", "Camera", "Cloud Picture", "Cloud Session", "Collection of Action", "Collection of Bluetooth Device", "Collection of DateTime", "Collection of Gamepad", "Collection of Number", "Collection of Picture", "Collection of Sound", "Collection of User", "Color", "Contact", "Contact Collection", "DateTime", "Device", "Device Collection", "Event Binding", "Form Builder", "Gamepad", "Json Builder", "Json Object", "Link", "Link Collection", "Location", "Location Collection", "Map", "Matrix", "Media Link", "Media Link Collection", "Media Player", "Media Player Collection", "Media Server", "Media Server Collection", "Message", "Message Collection", "Motion", "Nothing", "Number", "Number Collection", "Number Map", "OAuth Response", "Page", "Page Button", "Page Collection", "Picture", "Picture Album", "Picture Albums", "Pictures", "Place", "Place Collection", "Playlist", "Playlists", "Printer", "Printer Collection", "Song", "Song Album", "Song Albums", "Songs", "Sound", "Sprite", "Sprite Set", "String", "String Collection", "String Map", "TextBox", "Tile", "Timer", "Unfinished Type", "User", "Vector3", "Web Event Source", "Web Request", "Web Response", "Xml Object"] */
|
||||
/* ["Action","Appointment", "Appointment Collection", "Bluetooth Device", "Board", "Boolean", "Buffer", "Camera", "Cloud Picture", "Cloud Session", "Collection of Action", "Collection of Bluetooth Device", "Collection of DateTime", "Collection of Gamepad", "Collection of Number", "Collection of Picture", "Collection of Sound", "Collection of User", "Color", "Contact", "Contact Collection", "DateTime", "Device", "Device Collection", "Event Binding", "Form Builder", "Gamepad", "Json Builder", "Json Object", "Link", "Link Collection", "Location", "Location Collection", "Map", "Matrix","Message", "Message Collection", "Motion", "Nothing", "Number", "Number Collection", "Number Map", "OAuth Response", "Page", "Page Button", "Page Collection", "Picture", "Picture Album", "Picture Albums", "Pictures", "Place", "Place Collection", "Playlist", "Playlists", "Printer", "Printer Collection", "Song", "Song Album", "Song Albums", "Songs", "Sound", "Sprite", "Sprite Set", "String", "String Collection", "String Map", "TextBox", "Tile", "Timer", "Unfinished Type", "User", "Vector3", "Web Event Source", "Web Request", "Web Response", "Xml Object"] */
|
||||
}
|
||||
|
||||
export function listSingletonProperties(): IProperty[]{
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
///<reference path='refs.ts'/>
|
||||
module TDev { export module RT {
|
||||
//? A device on the home network
|
||||
//@ stem("dev") immutable walltap cap(home) obsolete
|
||||
export class Device
|
||||
extends RTValue
|
||||
{
|
||||
private _name : string = undefined;
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
//? Gets the friendly name of the device
|
||||
//@ obsolete
|
||||
public name() : string { return this._name; }
|
||||
|
||||
//? Sets the friendly name of the device
|
||||
//@ obsolete
|
||||
public set_name(name:string) : void { this._name = name; }
|
||||
|
||||
//? Gets the manfacturer name
|
||||
//@ stub obsolete
|
||||
public manufacturer() : string
|
||||
{ return undefined; }
|
||||
|
||||
//? Browses to the device control panel
|
||||
//@ stub obsolete
|
||||
public browse() : void
|
||||
{ }
|
||||
|
||||
//? Display the device to the wall
|
||||
//@ stub obsolete
|
||||
public post_to_wall() : void
|
||||
{ }
|
||||
|
||||
//? Checks if the device is connected
|
||||
//@ stub obsolete
|
||||
//@ tandre
|
||||
public is_connected() : boolean
|
||||
{ return undefined; }
|
||||
|
||||
}
|
||||
} }
|
45
lib/Home.ts
45
lib/Home.ts
|
@ -1,45 +0,0 @@
|
|||
///<reference path='refs.ts'/>
|
||||
module TDev { export module RT {
|
||||
//? Interact with devices in the home network. Devices must be UPnP™ compatible.
|
||||
//@ cap(home) obsolete
|
||||
export module Home
|
||||
{
|
||||
|
||||
//? Gets the printers on the current wireless network
|
||||
//@ stub flow(SourceHome)
|
||||
//@ cap(home) obsolete
|
||||
export function printers() : Collection<Printer>
|
||||
{ return undefined; }
|
||||
|
||||
//? Gets the media players on the current wireless network
|
||||
//@ stub flow(SourceHome)
|
||||
//@ cap(home) obsolete
|
||||
export function players() : Collection<MediaPlayer>
|
||||
{ return undefined; }
|
||||
|
||||
//? Gets the media servers on the home network
|
||||
//@ stub flow(SourceHome)
|
||||
//@ cap(home) obsolete
|
||||
export function servers() : Collection<MediaServer>
|
||||
{ return undefined; }
|
||||
|
||||
//? Choose a printer on the current wireless network
|
||||
//@ stub flow(SourceHome) returns(Printer)
|
||||
//@ cap(home) obsolete
|
||||
export function choose_printer(r:ResumeCtx)
|
||||
{ }
|
||||
|
||||
//? Choose a media player on the current wireless network
|
||||
//@ stub flow(SourceHome) returns(MediaPlayer)
|
||||
//@ cap(home) obsolete
|
||||
export function choose_player(r:ResumeCtx)
|
||||
{ }
|
||||
|
||||
//? Choose a media server on the current wireless network
|
||||
//@ stub flow(SourceHome) returns(MediaServer)
|
||||
//@ cap(home) obsolete
|
||||
export function choose_server(r:ResumeCtx)
|
||||
{ }
|
||||
|
||||
}
|
||||
} }
|
|
@ -117,45 +117,6 @@ module TDev.RT {
|
|||
//? Creates an invalid Xml Object instance
|
||||
export function xml_object() : XmlObject { return undefined; }
|
||||
|
||||
//? Creates an invalid Device instance
|
||||
//@ cap(home) obsolete
|
||||
export function device() : Device { return undefined; }
|
||||
|
||||
//? Creates an invalid Device Collection instance
|
||||
//@ cap(home) obsolete
|
||||
export function device_collection() : Collection<Device> { return undefined; }
|
||||
|
||||
//? Creates an invalid Printer instance
|
||||
//@ cap(home) obsolete
|
||||
export function printer() : Printer { return undefined; }
|
||||
|
||||
//? Creates an invalid Printer Collection instance
|
||||
//@ cap(home) obsolete
|
||||
export function printer_collection() : Collection<Printer> { return undefined; }
|
||||
|
||||
//? Creates an invalid Media Player instance
|
||||
//@ cap(home) obsolete
|
||||
export function media_player() : MediaPlayer { return undefined; }
|
||||
|
||||
//? Creates an invalid Media Player Collection instance
|
||||
//@ cap(home) obsolete
|
||||
export function media_player_collection() : Collection<MediaPlayer> { return undefined; }
|
||||
|
||||
//? Creates an invalid Media Server instance
|
||||
//@ cap(home) obsolete
|
||||
export function media_server() : MediaServer { return undefined; }
|
||||
|
||||
//? Creates an invalid Media Server Collection instance
|
||||
//@ cap(home) obsolete
|
||||
export function media_server_collection() : Collection<MediaServer> { return undefined; }
|
||||
|
||||
//? Creates an invalid Media Link instance
|
||||
//@ cap(home) obsolete
|
||||
export function media_link() : MediaLink { return undefined; }
|
||||
|
||||
//? Creates an invalid Media Link Collection instance
|
||||
//@ cap(home) obsolete
|
||||
export function media_link_collection() : Collection<MediaLink> { return undefined; }
|
||||
|
||||
//? Creates an invalid Place instance
|
||||
export function place() : Place { return undefined; }
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
///<reference path='refs.ts'/>
|
||||
module TDev.RT {
|
||||
//? A media file on the home network
|
||||
//@ stem("link") immutable cap(home) obsolete
|
||||
export class MediaLink
|
||||
extends RTValue
|
||||
{
|
||||
private _kind: string;
|
||||
private _title: string;
|
||||
private _author: string;
|
||||
private _album: string;
|
||||
private _date: DateTime;
|
||||
private _duration: number;
|
||||
private _url: string;
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
static mk(kind: string, title: string, url : string) : MediaLink {
|
||||
var m = new MediaLink();
|
||||
m._kind = kind;
|
||||
m._title = title;
|
||||
m._url = url;
|
||||
return m;
|
||||
}
|
||||
|
||||
//public reuseKey() { return "" + this._title + this._kind + this._author + this._duration + this._album + this._date; }
|
||||
|
||||
|
||||
//? Gets the title if available
|
||||
//@ obsolete
|
||||
public title(): string { return this._title; }
|
||||
|
||||
//? Gets the author if available
|
||||
//@ obsolete
|
||||
public author() : string { return this._author; }
|
||||
|
||||
//? Gets the album if available
|
||||
//@ obsolete
|
||||
public album() : string { return this._album; }
|
||||
|
||||
//? Gets the date if available
|
||||
//@ obsolete
|
||||
public date() : DateTime { return this._date; }
|
||||
|
||||
//? Gets the duration in seconds (0 for pictures)
|
||||
//@ obsolete
|
||||
public duration() : number { return this._duration || 0; }
|
||||
|
||||
//? Gets the kind of media (video, song, picture)
|
||||
//@ obsolete
|
||||
public kind(): string { return this._kind; }
|
||||
|
||||
// gets the current url of the media.
|
||||
//@ obsolete
|
||||
public url(): string { return this._url; }
|
||||
public set_url(url: string) { this._url = url; }
|
||||
|
||||
//? Post the media to the wall
|
||||
//@ obsolete
|
||||
//@ cap(media)
|
||||
public post_to_wall(s : IStackFrame): void {
|
||||
switch (this.kind()) {
|
||||
case 'video':
|
||||
var video = <HTMLVideoElement>createElement("video", "", this.title());
|
||||
video.src = this.url();
|
||||
video.controls = true;
|
||||
video.autobuffer = true;
|
||||
video.load();
|
||||
s.rt.postBoxedHtml(video, s.pc);
|
||||
break;
|
||||
case 'song':
|
||||
var audio = Song.createAudio(this.url());
|
||||
s.rt.postBoxedHtml(audio, s.pc);
|
||||
break;
|
||||
case 'picture':
|
||||
var img = HTML.mkImg(this.url());
|
||||
s.rt.postBoxedHtml(img, s.pc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//? Plays or displays the media on the phone
|
||||
//@ obsolete
|
||||
//@ cap(musicandsounds)
|
||||
public play(): void {
|
||||
Player.play_home_media(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,121 +0,0 @@
|
|||
///<reference path='refs.ts'/>
|
||||
module TDev { export module RT {
|
||||
//? An audio/video player on the home network
|
||||
//@ stem("pa") walltap cap(home) obsolete
|
||||
export class MediaPlayer
|
||||
extends RTValue
|
||||
{
|
||||
private _volume : number = undefined;
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
//? Gets the current volume
|
||||
//@ obsolete
|
||||
public volume() : number { return this._volume; }
|
||||
|
||||
//? Sets the current value
|
||||
//@ obsolete
|
||||
public set_volume(volume:number) : void { this._volume = volume; }
|
||||
|
||||
//? Gets the detailled information about this device
|
||||
//@ stub obsolete
|
||||
public device() : Device
|
||||
{ return undefined; }
|
||||
|
||||
//? Gets the name of the audio/video player
|
||||
//@ stub obsolete
|
||||
public name() : string
|
||||
{ return undefined; }
|
||||
|
||||
//? Display the player to the wall
|
||||
//@ stub obsolete
|
||||
public post_to_wall() : void
|
||||
{ }
|
||||
|
||||
//? Indicates the media can be played, paused, resumed
|
||||
//@ stub obsolete
|
||||
public is_control_supported() : boolean
|
||||
{ return undefined; }
|
||||
|
||||
//? Resumes playing the current media if any.
|
||||
//@ stub obsolete
|
||||
public resume() : void
|
||||
{ }
|
||||
|
||||
//? Stops the current media if any.
|
||||
//@ stub obsolete
|
||||
public stop() : void
|
||||
{ }
|
||||
|
||||
//? Pauses the current media if any.
|
||||
//@ stub obsolete
|
||||
public pause() : void
|
||||
{ }
|
||||
|
||||
//? Moves the player to the next media in the queue.
|
||||
//@ stub obsolete
|
||||
public next() : void
|
||||
{ }
|
||||
|
||||
//? Moves the player to the previous media in the queue.
|
||||
//@ stub obsolete
|
||||
public previous() : void
|
||||
{ }
|
||||
|
||||
//? Plays the current media from the start.
|
||||
//@ stub obsolete
|
||||
public play() : void
|
||||
{ }
|
||||
|
||||
//? Plays the media at the 'url' internet address.
|
||||
//@ stub cap(network) flow(SinkWeb)
|
||||
//@ writesMutable obsolete
|
||||
public play_media(url:string) : void
|
||||
{ }
|
||||
|
||||
//? Plays a media from the home network.
|
||||
//@ stub
|
||||
//@ writesMutable obsolete
|
||||
public play_home_media(media:MediaLink) : void
|
||||
{ }
|
||||
|
||||
//? Gets the uri of the media currently active
|
||||
//@ stub
|
||||
//@ readsMutable obsolete
|
||||
public active_media() : string
|
||||
{ return undefined; }
|
||||
|
||||
//? Gets the position in seconds whithin the active media
|
||||
//@ stub obsolete
|
||||
public play_position() : number
|
||||
{ return undefined; }
|
||||
|
||||
//? Indicates if the player is stopped
|
||||
//@ stub obsolete
|
||||
public is_stopped() : boolean
|
||||
{ return undefined; }
|
||||
|
||||
//? Indicates if the player is playing
|
||||
//@ stub obsolete
|
||||
public is_playing() : boolean
|
||||
{ return undefined; }
|
||||
|
||||
//? Indicates if the player is paused
|
||||
//@ stub obsolete
|
||||
public is_paused() : boolean
|
||||
{ return undefined; }
|
||||
|
||||
//? Gets the status of the player
|
||||
//@ stub obsolete
|
||||
public status() : string
|
||||
{ return undefined; }
|
||||
|
||||
//? Indicates if volume can be changed
|
||||
//@ stub obsolete
|
||||
public is_volume_supported() : boolean
|
||||
{ return undefined; }
|
||||
|
||||
}
|
||||
} }
|
|
@ -1,80 +0,0 @@
|
|||
///<reference path='refs.ts'/>
|
||||
module TDev { export module RT {
|
||||
//? A media server on the home network
|
||||
//@ stem("server") walltap cap(home) obsolete
|
||||
export class MediaServer
|
||||
extends RTValue
|
||||
{
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
//? Gets the detailled information about this device
|
||||
//@ stub obsolete
|
||||
public device() : Device
|
||||
{ return undefined; }
|
||||
|
||||
//? Gets the name of the printer
|
||||
//@ stub obsolete
|
||||
public name() : string
|
||||
{ return undefined; }
|
||||
|
||||
//? Display the printer to the wall
|
||||
//@ stub obsolete
|
||||
public post_to_wall() : void
|
||||
{ }
|
||||
|
||||
//? Gets a list of all songs
|
||||
//@ stub obsolete
|
||||
public songs() : Collection<MediaLink>
|
||||
{ return undefined; }
|
||||
|
||||
//? Gets a list of all videos
|
||||
//@ stub obsolete
|
||||
public videos() : Collection<MediaLink>
|
||||
{ return undefined; }
|
||||
|
||||
//? Gets a list of all pictures
|
||||
//@ stub obsolete
|
||||
public pictures() : Collection<MediaLink>
|
||||
{ return undefined; }
|
||||
|
||||
//? Searches for songs
|
||||
//@ stub obsolete
|
||||
public search_songs(term:string) : Collection<MediaLink>
|
||||
{ return undefined; }
|
||||
|
||||
//? Searches for videos
|
||||
//@ stub obsolete
|
||||
public search_videos(term:string) : Collection<MediaLink>
|
||||
{ return undefined; }
|
||||
|
||||
//? Searches for videos in a particular date range.
|
||||
//@ stub obsolete
|
||||
//@ [end].deflExpr('time->now')
|
||||
public search_videos_by_date(start:DateTime, end:DateTime) : Collection<MediaLink>
|
||||
{ return undefined; }
|
||||
|
||||
//? Searches for pictures in a particular date range.
|
||||
//@ stub obsolete
|
||||
//@ [end].deflExpr('time->now')
|
||||
public search_pictures_by_date(start:DateTime, end:DateTime) : Collection<MediaLink>
|
||||
{ return undefined; }
|
||||
|
||||
//? Chooses a song
|
||||
//@ stub returns(MediaLink) obsolete
|
||||
public choose_song(r:ResumeCtx)
|
||||
{ }
|
||||
|
||||
//? Chooses a video or a movie
|
||||
//@ stub returns(MediaLink) obsolete
|
||||
public choose_video(r:ResumeCtx)
|
||||
{ }
|
||||
|
||||
//? Chooses a picture
|
||||
//@ stub returns(MediaLink) obsolete
|
||||
public choose_picture(r:ResumeCtx)
|
||||
{ }
|
||||
|
||||
}
|
||||
} }
|
|
@ -296,20 +296,6 @@ module TDev.RT {
|
|||
r.resumeVal(_audio ? _audio.paused : false);
|
||||
}
|
||||
|
||||
//? Plays an audio/video file from the home network
|
||||
//@ writesMutable cap(home)
|
||||
export function play_home_media(media: MediaLink): void {
|
||||
switch (media.kind()) {
|
||||
case 'song':
|
||||
var s = Song.mk(media.url(), 'media', media.title());
|
||||
Player.play(s);
|
||||
break;
|
||||
default:
|
||||
Web.play_media(media.url());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//? Volume is no longer supported.
|
||||
//@ obsolete
|
||||
//@ readsMutable
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
///<reference path='refs.ts'/>
|
||||
module TDev { export module RT {
|
||||
//? A printer on the home network
|
||||
//@ walltap cap(home) obsolete
|
||||
export class Printer
|
||||
extends RTValue
|
||||
{
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
// public jsonFields() => [];
|
||||
|
||||
//? Gets the detailled information about this device
|
||||
//@ stub obsolete
|
||||
public device() : Device
|
||||
{ return undefined; }
|
||||
|
||||
//? Gets the name of the printer
|
||||
//@ stub obsolete
|
||||
public name() : string
|
||||
{ return undefined; }
|
||||
|
||||
//? Display the printer to the wall
|
||||
//@ stub obsolete
|
||||
public post_to_wall() : void
|
||||
{ }
|
||||
|
||||
//? Queues a job to print the text.
|
||||
//@ stub obsolete
|
||||
public print_text(text:string) : void
|
||||
{ }
|
||||
|
||||
// Queues a job to print the picture.
|
||||
// public print_picture(picture:Picture) : void
|
||||
|
||||
//? Indicates if new jobs can start processing immediately without waiting.
|
||||
//@ stub obsolete
|
||||
//@ tandre
|
||||
public is_idle() : boolean
|
||||
{ return undefined; }
|
||||
|
||||
//? Indicates if jobs are processing; new jobs will wait before processing, i.e., are said to be pending.
|
||||
//@ stub obsolete
|
||||
//@ tandre
|
||||
public is_processing() : boolean
|
||||
{ return undefined; }
|
||||
|
||||
//? Indicates if no jobs can be processed and intervention is needed.
|
||||
//@ stub obsolete
|
||||
//@ tandre
|
||||
public is_stopped() : boolean
|
||||
{ return undefined; }
|
||||
|
||||
//? Indicates additional information about why the Printer is in its current state.
|
||||
//@ stub obsolete
|
||||
//@ tandre
|
||||
public state_reason() : string
|
||||
{ return undefined; }
|
||||
|
||||
}
|
||||
} }
|
|
@ -15,13 +15,11 @@
|
|||
///<reference path='Colors.ts'/>
|
||||
///<reference path='Contact.ts'/>
|
||||
///<reference path='DateTime.ts'/>
|
||||
///<reference path='Device.ts'/>
|
||||
///<reference path='DeviceMotion.ts'/>
|
||||
///<reference path='DeviceOrientation.ts'/>
|
||||
///<reference path='Docs.ts'/>
|
||||
///<reference path='Enumerator.ts'/>
|
||||
///<reference path='GeoLocation.ts'/>
|
||||
///<reference path='Home.ts'/>
|
||||
///<reference path='Invalid.ts'/>
|
||||
///<reference path='JsonObject.ts'/>
|
||||
///<reference path='JsonBuilder.ts'/>
|
||||
|
@ -36,9 +34,6 @@
|
|||
///<reference path='Maps.ts'/>
|
||||
///<reference path='Math.ts'/>
|
||||
///<reference path='Media.ts'/>
|
||||
///<reference path='MediaLink.ts'/>
|
||||
///<reference path='MediaPlayer.ts'/>
|
||||
///<reference path='MediaServer.ts'/>
|
||||
///<reference path='Message.ts'/>
|
||||
///<reference path='Motion.ts'/>
|
||||
///<reference path='Number.ts'/>
|
||||
|
@ -55,7 +50,6 @@
|
|||
///<reference path='Player.ts'/>
|
||||
///<reference path='Playlist.ts'/>
|
||||
///<reference path='Playlists.ts'/>
|
||||
///<reference path='Printer.ts'/>
|
||||
///<reference path='Radio.ts'/>
|
||||
///<reference path='Senses.ts'/>
|
||||
///<reference path='Social.ts'/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче