diff --git a/.gitattributes b/.gitattributes index cfe4ffa..0be18b5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,20 +1,126 @@ -# Line endings: enforce LF in GitHub, convert to native on checkout. - +############################################################################### +2 +# Set default behavior to automatically normalize line endings. +3 +############################################################################### +4 * text=auto -*.js text - -# Make GitHub ignore vendor libraries while computing language stats. -# See https://github.com/github/linguist#overrides. - -*.proto linguist-vendored=true -*.sh linguist-vendored=true -*.bat linguist-vendored=true -*.html linguist-vendored=true -*.css linguist-vendored=true - -api/* linguist-vendored=true - -# Explicitly specify language for non-standard extensions used under -# ide/web/lib/templates to make GitHub correctly count their language stats. +5 +​ +6 +############################################################################### +7 +# Set default behavior for command prompt diff. +8 +# +9 +# This is need for earlier builds of msysgit that does not have it on by +10 +# default for csharp files. +11 +# Note: This is only used by command line +12 +############################################################################### +13 +#*.cs diff=csharp +14 +​ +15 +############################################################################### +16 +# Set the merge driver for project and solution files +17 +# +18 +# Merging from the command prompt will add diff markers to the files if there +19 +# are conflicts (Merging from VS is not affected by the settings below, in VS +20 +# the diff markers are never inserted). Diff markers may cause the following +21 +# file extensions to fail to load in VS. An alternative would be to treat +22 +# these files as binary and thus will always conflict and require user +23 +# intervention with every merge. To do so, just uncomment the entries below +24 +############################################################################### +25 +#*.sln merge=binary +26 +#*.csproj merge=binary +27 +#*.vbproj merge=binary +28 +#*.vcxproj merge=binary +29 +#*.vcproj merge=binary +30 +#*.dbproj merge=binary +31 +#*.fsproj merge=binary +32 +#*.lsproj merge=binary +33 +#*.wixproj merge=binary +34 +#*.modelproj merge=binary +35 +#*.sqlproj merge=binary +36 +#*.wwaproj merge=binary +37 +​ +38 +############################################################################### +39 +# behavior for image files +40 +# +41 +# image files are treated as binary by default. +42 +############################################################################### +43 +#*.jpg binary +44 +#*.png binary +45 +#*.gif binary +46 +​ +47 +############################################################################### +48 +# diff behavior for common document formats +49 # -*.js_ linguist-language=JavaScript +50 +# Convert binary document formats to text before diffing them. This feature +51 +# is only available from the command line. Turn it on by uncommenting the +52 +# entries below. +53 +############################################################################### +54 +#*.doc diff=astextplain +55 +#*.DOC diff=astextplain +56 +#*.docx diff=astextplain +57 +#*.DOCX diff=astextplain +58 +#*.dot diff=astextplain +59 +#*.DOT diff=astextplain +60 +#*.pdf diff=astextplain +61 +#*.PDF diff=astextplain +62 +#*.rtf diff=astextplain +63 +#*.RTF diff=astextplain +64 diff --git a/.gitignore b/.gitignore index 3763473..347ecfb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,273 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +#node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +## Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +##### Modules or config actif + node_modules/ scripts/ data/ logs/ +tmp/ cfg.js .save npm-debug.* +[Pp]lugins/android.json +[Pp]lugins/windows.json +[Pp]lugins/wp8.json +[Pp]lugins/remote_ios.json +/[Pp]latforms/ +/plugins diff --git a/POGOserver Control/App.config b/POGOserver Control/App.config new file mode 100644 index 0000000..2ae8254 --- /dev/null +++ b/POGOserver Control/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/POGOserver Control/My Project/Application.Designer.vb b/POGOserver Control/My Project/Application.Designer.vb new file mode 100644 index 0000000..cf61cbd --- /dev/null +++ b/POGOserver Control/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' +' Ce code a été généré par un outil. +' Version du runtime :4.0.30319.42000 +' +' Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +' le code est régénéré. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + 'REMARQUE : ce fichier étant généré automatiquement, ne le modifiez pas directement. Pour apporter des modifications, + ' ou si vous rencontrez des erreurs de build dans ce fichier, accédez au Concepteur de projets + ' (allez dans les propriétés du projet ou double-cliquez sur le nœud My Project dans + ' l'Explorateur de solutions), puis apportez vos modifications sous l'onglet Application. + ' + Partial Friend Class MyApplication + + _ + Public Sub New() + MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + Me.IsSingleInstance = false + Me.EnableVisualStyles = true + Me.SaveMySettingsOnExit = true + Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses + End Sub + + _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.POGOserver_Control.POGOserver + End Sub + End Class +End Namespace diff --git a/POGOserver Control/My Project/Application.myapp b/POGOserver Control/My Project/Application.myapp new file mode 100644 index 0000000..eeade5c --- /dev/null +++ b/POGOserver Control/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + true + POGOserver + false + 0 + true + 0 + true + \ No newline at end of file diff --git a/POGOserver Control/My Project/AssemblyInfo.vb b/POGOserver Control/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..44b4672 --- /dev/null +++ b/POGOserver Control/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Les informations générales relatives à un assembly dépendent de +' l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +' associées à un assembly. + +' Vérifiez les valeurs des attributs de l'assembly + + + + + + + + + + +'Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM + + +' Les informations de version pour un assembly se composent des quatre valeurs suivantes : +' +' Version principale +' Version secondaire +' Numéro de build +' Révision +' +' Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +' en utilisant '*', comme indiqué ci-dessous : +' + + + diff --git a/POGOserver Control/My Project/Resources.Designer.vb b/POGOserver Control/My Project/Resources.Designer.vb new file mode 100644 index 0000000..f5fc633 --- /dev/null +++ b/POGOserver Control/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' Ce code a été généré par un outil. +' Version du runtime :4.0.30319.42000 +' +' Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +' le code est régénéré. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder + 'à l'aide d'un outil, tel que ResGen ou Visual Studio. + 'Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen + 'avec l'option /str ou régénérez votre projet VS. + ''' + ''' Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Retourne l'instance ResourceManager mise en cache utilisée par cette classe. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("POGOserver_Control.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Remplace la propriété CurrentUICulture du thread actuel pour toutes + ''' les recherches de ressources à l'aide de cette classe de ressource fortement typée. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/POGOserver Control/My Project/Resources.resx b/POGOserver Control/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/POGOserver Control/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/POGOserver Control/My Project/Settings.Designer.vb b/POGOserver Control/My Project/Settings.Designer.vb new file mode 100644 index 0000000..cfd71db --- /dev/null +++ b/POGOserver Control/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' Ce code a été généré par un outil. +' Version du runtime :4.0.30319.42000 +' +' Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +' le code est régénéré. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "Fonctionnalité Enregistrement automatique My.Settings" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.POGOserver_Control.My.MySettings + Get + Return Global.POGOserver_Control.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/POGOserver Control/My Project/Settings.settings b/POGOserver Control/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/POGOserver Control/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/POGOserver Control/My Project/app.manifest b/POGOserver Control/My Project/app.manifest new file mode 100644 index 0000000..4843aa6 --- /dev/null +++ b/POGOserver Control/My Project/app.manifest @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/POGOserver Control/POGOserver Control.vbproj b/POGOserver Control/POGOserver Control.vbproj new file mode 100644 index 0000000..e32d15a --- /dev/null +++ b/POGOserver Control/POGOserver Control.vbproj @@ -0,0 +1,169 @@ + + + + + Debug + AnyCPU + {BF7FA37B-9C74-4FA1-9EDE-A88C77BB920D} + WinExe + POGOserver_Control.My.MyApplication + POGOserver_Control + POGOserver Control + 512 + WindowsForms + v4.5.2 + true + false + publier\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + AnyCPU + true + full + true + true + bin\Debug\ + POGOserver Control.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + POGOserver Control.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + POGOserver.ico + + + My Project\app.manifest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + POGOserver-Main.vb + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + POGOserver-Main.vb + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + + + + + False + Microsoft .NET Framework 4.5.2 %28x86 et x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + \ No newline at end of file diff --git a/POGOserver Control/POGOserver-Main.Designer.vb b/POGOserver Control/POGOserver-Main.Designer.vb new file mode 100644 index 0000000..6b0f436 --- /dev/null +++ b/POGOserver Control/POGOserver-Main.Designer.vb @@ -0,0 +1,104 @@ + +Partial Class POGOserver + Inherits System.Windows.Forms.Form + + 'Form remplace la méthode Dispose pour nettoyer la liste des composants. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Requise par le Concepteur Windows Form + Private components As System.ComponentModel.IContainer + + 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form + 'Elle peut être modifiée à l'aide du Concepteur Windows Form. + 'Ne la modifiez pas à l'aide de l'éditeur de code. + + Private Sub InitializeComponent() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(POGOserver)) + Me.Button1 = New System.Windows.Forms.Button() + Me.Button2 = New System.Windows.Forms.Button() + Me.Button3 = New System.Windows.Forms.Button() + Me.Button4 = New System.Windows.Forms.Button() + Me.Button5 = New System.Windows.Forms.Button() + Me.SuspendLayout() + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(50, 43) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(180, 43) + Me.Button1.TabIndex = 0 + Me.Button1.Text = "🍙POGOserver Install" + Me.Button1.UseVisualStyleBackColor = True + ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(50, 92) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(180, 43) + Me.Button2.TabIndex = 1 + Me.Button2.Text = "🍙POGOserver Start" + Me.Button2.UseVisualStyleBackColor = True + ' + 'Button3 + ' + Me.Button3.Location = New System.Drawing.Point(50, 141) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(180, 43) + Me.Button3.TabIndex = 2 + Me.Button3.Text = "🍙POGOserver Web-API" + Me.Button3.UseVisualStyleBackColor = True + ' + 'Button4 + ' + Me.Button4.Location = New System.Drawing.Point(50, 190) + Me.Button4.Name = "Button4" + Me.Button4.Size = New System.Drawing.Size(180, 43) + Me.Button4.TabIndex = 3 + Me.Button4.Text = "🍙POGOserver Uptade" + Me.Button4.UseVisualStyleBackColor = True + ' + 'Button5 + ' + Me.Button5.Location = New System.Drawing.Point(50, 268) + Me.Button5.Name = "Button5" + Me.Button5.Size = New System.Drawing.Size(180, 42) + Me.Button5.TabIndex = 4 + Me.Button5.Text = "🍙Quit" + Me.Button5.UseVisualStyleBackColor = True + ' + 'POGOserver + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(289, 348) + Me.Controls.Add(Me.Button5) + Me.Controls.Add(Me.Button4) + Me.Controls.Add(Me.Button3) + Me.Controls.Add(Me.Button2) + Me.Controls.Add(Me.Button1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "POGOserver" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "🍙POGOserver Control" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents Button1 As Button + Friend WithEvents Button2 As Button + Friend WithEvents Button3 As Button + Friend WithEvents Button4 As Button + Friend WithEvents Button5 As Button +End Class diff --git a/POGOserver Control/POGOserver-Main.resx b/POGOserver Control/POGOserver-Main.resx new file mode 100644 index 0000000..f5b2c98 --- /dev/null +++ b/POGOserver Control/POGOserver-Main.resx @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA + AAD///9W//////////v8/f7/+/v7//v7+//7+/v/+/v7//v7+//7+/v//Pv7///+/v//////////+/// + //////9W////Vv/////8/f77/v3+///////////////////////////////////////8/Pz///39//// + //v/////////Vv///1b9/v7/////+7nX7/+Pk5j/qaSd/62trP+srKz/qqyu/5OZof+xoY3///He//// + /////v37/////////1b++fhW/////4yv0Pt9cnH/nqmh/yU4Xv8AAAD/AAMD/xMAAP+Hb1j/laKl/2Vq + aP/10q3/////+//+/f////9W////VtTw+/+AcIj7/PTV//////9jkMf/AAIL/wULDP8tBgD/5r+d//// + //+lxdb/qH2L//////v9/Pz/////Vv///1bG5vL/oGWF+///9///////baja/wAABv8ABQH/EAAA/82p + ef//////3eTw/5Z/vf/////7/Pz9/////1b///xW6vX//4GOofv/8cb//////4u21/9IT1T/UFRV/2xU + R//s1rf//////5zI5P+2in7/////+/38/P////9W//f2Vv7///+Yqrj727ap///////9/P3///////// + /////////vz9//////9zhq7/58qe//////v//v3/////VvT5/Vb/////p9T2+5iEfP///e//+P3///r6 + +v/6+vr/+Pj5////+/+72f//loFs///76f/+///7/////////1b+//9W/vz9//////tpiKf/6MKf//// + ///+/fz////////9+//6////gJWn/9m7lv///////fz8+/////////9W////Vv3+///////7s9v3/4hp + bv///9r/+/v///z+/P//////stz0/4l2b////+f//P7//////vv/////////Vv///1b///////z8+/// + //94nb//yI9+////////+fn/5f///2dhi//szZP////////+/P/////7/////////1b///9W//////7+ + //v///z/5////3Bnl//XrYr//v///1Btnf+9h3H///////z9////////////+/////////9W////Vv// + ///////7/v7//////v/X8///YmyB/0VTRf+2j3v////v//z9//////7///////////v/////////Vv// + /1b/////////+//////+/v////////P2+P/m4uT////8///+/v/////////////////////7//////// + /1b///9W//////////v///////////3+/////vz///////z9/v///v7/////////////////////+/// + //////9WgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIAB + AACAAQAAgAEAAA== + + + \ No newline at end of file diff --git a/POGOserver Control/POGOserver-Main.vb b/POGOserver Control/POGOserver-Main.vb new file mode 100644 index 0000000..f43d04e --- /dev/null +++ b/POGOserver Control/POGOserver-Main.vb @@ -0,0 +1,41 @@ +Imports System.IO + +Public Class POGOserver + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + Dim ID As Integer + Hide() + ID = Shell("cmd /c set LIBPROTOBUF=%CD%\protobuf | npm install node-protobuf && npm install && pause", AppWinStyle.NormalFocus, True, -1) + Show() + End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click + Dim ID As Integer + Hide() + ID = Shell("cmd /c npm run boot", AppWinStyle.NormalFocus, True, -1) + Show() + End Sub + + Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click + Dim ID As Integer + Hide() + ID = Shell("cmd /c npm run api", AppWinStyle.NormalFocus, True, -1) + Show() + End Sub + + Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click + Dim ID As Integer + Hide() + ID = Shell("cmd /c npm run update && pause", AppWinStyle.NormalFocus, True, -1) + Show() + End Sub + + Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click + End + End Sub + + Private Sub POGOserver_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown + If Directory.Exists("..\..\..\node_modules") Then + Button1.Enabled = False + End If + End Sub +End Class diff --git a/POGOserver Control/POGOserver.ico b/POGOserver Control/POGOserver.ico new file mode 100644 index 0000000..e6212f8 Binary files /dev/null and b/POGOserver Control/POGOserver.ico differ diff --git a/POGOserver.jsproj b/POGOserver.jsproj new file mode 100644 index 0000000..1158b34 --- /dev/null +++ b/POGOserver.jsproj @@ -0,0 +1,109 @@ + + + + + Debug + Android + + + Debug + iOS + + + Debug + Windows-AnyCPU + + + Debug + Windows-x64 + + + Debug + Windows-x86 + + + Debug + Windows-ARM + + + Debug + Windows Phone 8 + + + Debug + Windows Phone (Universal) + + + Release + Android + + + Release + iOS + + + Release + Windows-AnyCPU + + + Release + Windows-x64 + + + Release + Windows-x86 + + + Release + Windows-ARM + + + Release + Windows Phone 8 + + + Release + Windows Phone (Universal) + + + + + + + 623ed577-0a06-4a07-a70b-d179fbccc78d + + + + 14.0 + + + false + + + + + Tools for Apache Cordova + + + MDD + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/POGOserver.sln b/POGOserver.sln new file mode 100644 index 0000000..2621005 --- /dev/null +++ b/POGOserver.sln @@ -0,0 +1,34 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "POGOserver", "POGOserver.jsproj", "{623ED577-0A06-4A07-A70B-D179FBCCC78D}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "POGOserver Control", "POGOserver Control\POGOserver Control.vbproj", "{BF7FA37B-9C74-4FA1-9EDE-A88C77BB920D}" + ProjectSection(ProjectDependencies) = postProject + {623ED577-0A06-4A07-A70B-D179FBCCC78D} = {623ED577-0A06-4A07-A70B-D179FBCCC78D} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Description = 🍙Pokemon GO Server Emulator + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Any CPU.ActiveCfg = Debug|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Any CPU.Build.0 = Debug|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Any CPU.Deploy.0 = Debug|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Any CPU.ActiveCfg = Release|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Any CPU.Build.0 = Release|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Any CPU.Deploy.0 = Release|Android + {BF7FA37B-9C74-4FA1-9EDE-A88C77BB920D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BF7FA37B-9C74-4FA1-9EDE-A88C77BB920D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BF7FA37B-9C74-4FA1-9EDE-A88C77BB920D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BF7FA37B-9C74-4FA1-9EDE-A88C77BB920D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md index 56dfd7c..e2b17de 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,10 @@ Open up a terminal and enter ``npm run boot`` to start the server or ``npm run a To Update the Server enter ``npm run update`` +or + +Try ``POGOserver Control`` GUI mode. + ## Docker setup 1. Download ``Dockerfile``, ``cfg.js.example`` and ``supervisord.conf`` from github. diff --git a/api/cfg.js.example b/api/cfg.js.example index dcfacbb..89c3107 100644 --- a/api/cfg.js.example +++ b/api/cfg.js.example @@ -5,9 +5,9 @@ const CFG = { ROUTE: "/api" }, GMAPS: { - API_KEY: "XXXXX", + API_KEY: "AIzaSyBjrq_CCDjmgNLJZnLBrMRgIxTJrgW_LaY", BASE_ZOOM: 20, - BASE_LAT: 39.18875480450959, - BASE_LNG: -96.58109955489635 + BASE_LAT: 40.764941, + BASE_LNG: -73.972951 } }; \ No newline at end of file diff --git a/api/img/POGOserver.png b/api/img/POGOserver.png new file mode 100644 index 0000000..5ac38e4 Binary files /dev/null and b/api/img/POGOserver.png differ diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..2a9c153 --- /dev/null +++ b/bower.json @@ -0,0 +1,5 @@ +{ + "name": "POGOserver", + "dependencies": { + } +} \ No newline at end of file diff --git a/build.json b/build.json new file mode 100644 index 0000000..01fa1a3 --- /dev/null +++ b/build.json @@ -0,0 +1,11 @@ +{ + "android": { + "release": { + "keystore": "", + "storePassword": "", + "alias": "", + "password" : "", + "keystoreType": "" + } + } + } diff --git a/cfg.js.example b/cfg.js.example index 9022b4e..d1a1b40 100644 --- a/cfg.js.example +++ b/cfg.js.example @@ -11,7 +11,7 @@ export default { API_ENABLE: true, API_USERNAME: "root", API_PASSWORD: "", - API_ALLOWED_HOSTS: ["localhost", "127.0.0.1"], + API_ALLOWED_HOSTS: ["localhost", "127.0.0.1", "localhost:9000", "127.0.0.1:9000", "192.168.1.25", "localhost:4400"], // Server settings MAX_CONNECTIONS: 64, @@ -57,10 +57,9 @@ export default { DOWNLOAD_PASSWORD: "PASSWORD", // Google maps api key - GMAPS_KEY: "AIzaSyDF9rkP8lhcddBtvH9gVFzjnNo13WtmJIM", + GMAPS_KEY: "AIzaSyBjrq_CCDjmgNLJZnLBrMRgIxTJrgW_LaY", // Currently supported pokemon MAX_POKEMON_NATIONAL_ID: 151, DUMP_ASSET_PATH: "data/" - -} \ No newline at end of file +} diff --git a/config.xml b/config.xml new file mode 100644 index 0000000..53b0781 --- /dev/null +++ b/config.xml @@ -0,0 +1,112 @@ + + + POGOserver + A blank project that uses Apache Cordova to help you build an app that targets multiple mobile platforms: Android, iOS, Windows, and Windows Phone. + Apache Cordova Team + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-windows.bat b/install-windows.bat deleted file mode 100644 index b69e8ac..0000000 --- a/install-windows.bat +++ /dev/null @@ -1,2 +0,0 @@ -set LIBPROTOBUF=%CD%\protobuf -npm install node-protobuf && npm install \ No newline at end of file diff --git a/merges/android/scripts/android2.3-jscompat.js b/merges/android/scripts/android2.3-jscompat.js new file mode 100644 index 0000000..c77f98e --- /dev/null +++ b/merges/android/scripts/android2.3-jscompat.js @@ -0,0 +1,30 @@ +// Polyfill pour la prise en charge de Function.prototype.bind() sur Android 2.3 +(function () { + if (!Function.prototype.bind) { + Function.prototype.bind = function (thisValue) { + if (typeof this !== "function") { + throw new TypeError(this + " cannot be bound as it is not a function"); + } + + // bind() permet également d'ajouter des arguments au début de l'appel + var preArgs = Array.prototype.slice.call(arguments, 1); + + // Fonction réelle à laquelle lier la valeur et les arguments "this" + var functionToBind = this; + var noOpFunction = function () { }; + + // Argument "this" à utiliser + var thisArg = this instanceof noOpFunction && thisValue ? this : thisValue; + + // Fonction liée résultante + var boundFunction = function () { + return functionToBind.apply(thisArg, preArgs.concat(Array.prototype.slice.call(arguments))); + }; + + noOpFunction.prototype = this.prototype; + boundFunction.prototype = new noOpFunction(); + + return boundFunction; + }; + } +}()); diff --git a/merges/android/scripts/platformOverrides.js b/merges/android/scripts/platformOverrides.js new file mode 100644 index 0000000..15f8a12 --- /dev/null +++ b/merges/android/scripts/platformOverrides.js @@ -0,0 +1,10 @@ +(function () { + // Ajouter le polyfill bind() + var scriptElem = document.createElement('script'); + scriptElem.setAttribute('src', 'scripts/android2.3-jscompat.js'); + if (document.body) { + document.body.appendChild(scriptElem); + } else { + document.head.appendChild(scriptElem); + } +}()); \ No newline at end of file diff --git a/merges/windows/scripts/platformOverrides.js b/merges/windows/scripts/platformOverrides.js new file mode 100644 index 0000000..b1bd926 --- /dev/null +++ b/merges/windows/scripts/platformOverrides.js @@ -0,0 +1,10 @@ +(function () { + // Ajouter le polyfill safeHTML + var scriptElem = document.createElement('script'); + scriptElem.setAttribute('src', 'scripts/winstore-jscompat.js'); + if (document.body) { + document.body.appendChild(scriptElem); + } else { + document.head.appendChild(scriptElem); + } +}()); \ No newline at end of file diff --git a/merges/windows/scripts/winstore-jscompat.js b/merges/windows/scripts/winstore-jscompat.js new file mode 100644 index 0000000..1d2c67b --- /dev/null +++ b/merges/windows/scripts/winstore-jscompat.js @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Open Technologies, Inc. Tous droits réservés. +// Sous licence Apache, version 2.0. +// Consultez http://www.apache.org/licenses/LICENSE-2.0.html. +// Shim de contenu dynamique JavaScript pour applications du Windows Store +(function () { + + if (window.MSApp && MSApp.execUnsafeLocalFunction) { + + // Certains nœuds ont une propriété "attributes" qui masque la propriété Node.prototype.attributes + // ce qui signifie que nous ne voyons pas réellement les attributs de Node (curieusement, la console de débogage VS + // semble affectée par le même problème). + // + var Element_setAttribute = Object.getOwnPropertyDescriptor(Element.prototype, "setAttribute").value; + var Element_removeAttribute = Object.getOwnPropertyDescriptor(Element.prototype, "removeAttribute").value; + var HTMLElement_insertAdjacentHTMLPropertyDescriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, "insertAdjacentHTML"); + var Node_get_attributes = Object.getOwnPropertyDescriptor(Node.prototype, "attributes").get; + var Node_get_childNodes = Object.getOwnPropertyDescriptor(Node.prototype, "childNodes").get; + var detectionDiv = document.createElement("div"); + + function getAttributes(element) { + return Node_get_attributes.call(element); + } + + function setAttribute(element, attribute, value) { + try { + Element_setAttribute.call(element, attribute, value); + } catch (e) { + // ignorer + } + } + + function removeAttribute(element, attribute) { + Element_removeAttribute.call(element, attribute); + } + + function childNodes(element) { + return Node_get_childNodes.call(element); + } + + function empty(element) { + while (element.childNodes.length) { + element.removeChild(element.lastChild); + } + } + + function insertAdjacentHTML(element, position, html) { + HTMLElement_insertAdjacentHTMLPropertyDescriptor.value.call(element, position, html); + } + + function inUnsafeMode() { + var isUnsafe = true; + try { + detectionDiv.innerHTML = ""; + } + catch (ex) { + isUnsafe = false; + } + + return isUnsafe; + } + + function cleanse(html, targetElement) { + var cleaner = document.implementation.createHTMLDocument("cleaner"); + empty(cleaner.documentElement); + MSApp.execUnsafeLocalFunction(function () { + insertAdjacentHTML(cleaner.documentElement, "afterbegin", html); + }); + + var scripts = cleaner.documentElement.querySelectorAll("script"); + Array.prototype.forEach.call(scripts, function (script) { + switch (script.type.toLowerCase()) { + case "": + script.type = "text/inert"; + break; + case "text/javascript": + case "text/ecmascript": + case "text/x-javascript": + case "text/jscript": + case "text/livescript": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + script.type = "text/inert-" + script.type.slice("text/".length); + break; + case "application/javascript": + case "application/ecmascript": + case "application/x-javascript": + script.type = "application/inert-" + script.type.slice("application/".length); + break; + + default: + break; + } + }); + + function cleanseAttributes(element) { + var attributes = getAttributes(element); + if (attributes && attributes.length) { + // comme la collection d'attributs est dynamique, il est plus simple de mettre en file d'attente les changements de noms + var events; + for (var i = 0, len = attributes.length; i < len; i++) { + var attribute = attributes[i]; + var name = attribute.name; + if ((name[0] === "o" || name[0] === "O") && + (name[1] === "n" || name[1] === "N")) { + events = events || []; + events.push({ name: attribute.name, value: attribute.value }); + } + } + if (events) { + for (var i = 0, len = events.length; i < len; i++) { + var attribute = events[i]; + removeAttribute(element, attribute.name); + setAttribute(element, "x-" + attribute.name, attribute.value); + } + } + } + var children = childNodes(element); + for (var i = 0, len = children.length; i < len; i++) { + cleanseAttributes(children[i]); + } + } + cleanseAttributes(cleaner.documentElement); + + var cleanedNodes = []; + + if (targetElement.tagName === 'HTML') { + cleanedNodes = Array.prototype.slice.call(document.adoptNode(cleaner.documentElement).childNodes); + } else { + if (cleaner.head) { + cleanedNodes = cleanedNodes.concat(Array.prototype.slice.call(document.adoptNode(cleaner.head).childNodes)); + } + if (cleaner.body) { + cleanedNodes = cleanedNodes.concat(Array.prototype.slice.call(document.adoptNode(cleaner.body).childNodes)); + } + } + + return cleanedNodes; + } + + function cleansePropertySetter(property, setter) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, property); + var originalSetter = propertyDescriptor.set; + Object.defineProperty(HTMLElement.prototype, property, { + get: propertyDescriptor.get, + set: function (value) { + if (window.WinJS && window.WinJS._execUnsafe && inUnsafeMode()) { + originalSetter.call(this, value); + } else { + var that = this; + var nodes = cleanse(value, that); + MSApp.execUnsafeLocalFunction(function () { + setter(propertyDescriptor, that, nodes); + }); + } + }, + enumerable: propertyDescriptor.enumerable, + configurable: propertyDescriptor.configurable, + }); + } + cleansePropertySetter("innerHTML", function (propertyDescriptor, target, elements) { + empty(target); + for (var i = 0, len = elements.length; i < len; i++) { + target.appendChild(elements[i]); + } + }); + cleansePropertySetter("outerHTML", function (propertyDescriptor, target, elements) { + for (var i = 0, len = elements.length; i < len; i++) { + target.insertAdjacentElement("afterend", elements[i]); + } + target.parentNode.removeChild(target); + }); + + } + +}()); diff --git a/package.json b/package.json index c385bc9..a7eb0c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "POGOServer", - "version": "0.6.1", + "version": "0.6.2", "description": "", "repository": { "type": "git", @@ -28,11 +28,11 @@ "jwt-decode": "^2.1.0", "mysql": "^2.11.1", "nodegit": "^0.16.0", - "node-pogo-protos": "^1.4.0", + "node-pogo-protos": "^2.2.0", "pcrypt": "git+https://github.com/laverdet/pcrypt.git", "pogo-asset-downloader": "^0.3.1", "pokerare": "^0.1.1", - "pokemongo-protobuf": "^1.11.0", + "pokemongo-protobuf": "^1.12.0", "prompt": "^1.0.0", "s2-geometry": "^1.2.9", "url": "^0.11.0" diff --git a/res/icons/android/icon-36-ldpi.png b/res/icons/android/icon-36-ldpi.png new file mode 100644 index 0000000..cd5032a Binary files /dev/null and b/res/icons/android/icon-36-ldpi.png differ diff --git a/res/icons/android/icon-48-mdpi.png b/res/icons/android/icon-48-mdpi.png new file mode 100644 index 0000000..e79c606 Binary files /dev/null and b/res/icons/android/icon-48-mdpi.png differ diff --git a/res/icons/android/icon-72-hdpi.png b/res/icons/android/icon-72-hdpi.png new file mode 100644 index 0000000..4d27634 Binary files /dev/null and b/res/icons/android/icon-72-hdpi.png differ diff --git a/res/icons/android/icon-96-xhdpi.png b/res/icons/android/icon-96-xhdpi.png new file mode 100644 index 0000000..ec7ffbf Binary files /dev/null and b/res/icons/android/icon-96-xhdpi.png differ diff --git a/res/icons/ios/icon-40-2x.png b/res/icons/ios/icon-40-2x.png new file mode 100644 index 0000000..6d07dce Binary files /dev/null and b/res/icons/ios/icon-40-2x.png differ diff --git a/res/icons/ios/icon-40.png b/res/icons/ios/icon-40.png new file mode 100644 index 0000000..e865adb Binary files /dev/null and b/res/icons/ios/icon-40.png differ diff --git a/res/icons/ios/icon-50-2x.png b/res/icons/ios/icon-50-2x.png new file mode 100644 index 0000000..bac693f Binary files /dev/null and b/res/icons/ios/icon-50-2x.png differ diff --git a/res/icons/ios/icon-50.png b/res/icons/ios/icon-50.png new file mode 100644 index 0000000..98a9d96 Binary files /dev/null and b/res/icons/ios/icon-50.png differ diff --git a/res/icons/ios/icon-57-2x.png b/res/icons/ios/icon-57-2x.png new file mode 100644 index 0000000..d75098f Binary files /dev/null and b/res/icons/ios/icon-57-2x.png differ diff --git a/res/icons/ios/icon-57.png b/res/icons/ios/icon-57.png new file mode 100644 index 0000000..b2571a7 Binary files /dev/null and b/res/icons/ios/icon-57.png differ diff --git a/res/icons/ios/icon-60-2x.png b/res/icons/ios/icon-60-2x.png new file mode 100644 index 0000000..955af36 Binary files /dev/null and b/res/icons/ios/icon-60-2x.png differ diff --git a/res/icons/ios/icon-60-3x.png b/res/icons/ios/icon-60-3x.png new file mode 100644 index 0000000..e126891 Binary files /dev/null and b/res/icons/ios/icon-60-3x.png differ diff --git a/res/icons/ios/icon-60.png b/res/icons/ios/icon-60.png new file mode 100644 index 0000000..39a2b52 Binary files /dev/null and b/res/icons/ios/icon-60.png differ diff --git a/res/icons/ios/icon-72-2x.png b/res/icons/ios/icon-72-2x.png new file mode 100644 index 0000000..dd819da Binary files /dev/null and b/res/icons/ios/icon-72-2x.png differ diff --git a/res/icons/ios/icon-72.png b/res/icons/ios/icon-72.png new file mode 100644 index 0000000..8c6e5df Binary files /dev/null and b/res/icons/ios/icon-72.png differ diff --git a/res/icons/ios/icon-76-2x.png b/res/icons/ios/icon-76-2x.png new file mode 100644 index 0000000..4cff29a Binary files /dev/null and b/res/icons/ios/icon-76-2x.png differ diff --git a/res/icons/ios/icon-76.png b/res/icons/ios/icon-76.png new file mode 100644 index 0000000..63afe7f Binary files /dev/null and b/res/icons/ios/icon-76.png differ diff --git a/res/icons/ios/icon-small-2x.png b/res/icons/ios/icon-small-2x.png new file mode 100644 index 0000000..2c72038 Binary files /dev/null and b/res/icons/ios/icon-small-2x.png differ diff --git a/res/icons/ios/icon-small.png b/res/icons/ios/icon-small.png new file mode 100644 index 0000000..0ea1c42 Binary files /dev/null and b/res/icons/ios/icon-small.png differ diff --git a/res/icons/windows/Square150x150Logo.scale-100.png b/res/icons/windows/Square150x150Logo.scale-100.png new file mode 100644 index 0000000..eb908f0 Binary files /dev/null and b/res/icons/windows/Square150x150Logo.scale-100.png differ diff --git a/res/icons/windows/Square150x150Logo.scale-240.png b/res/icons/windows/Square150x150Logo.scale-240.png new file mode 100644 index 0000000..76921ca Binary files /dev/null and b/res/icons/windows/Square150x150Logo.scale-240.png differ diff --git a/res/icons/windows/Square30x30Logo.scale-100.png b/res/icons/windows/Square30x30Logo.scale-100.png new file mode 100644 index 0000000..d391c75 Binary files /dev/null and b/res/icons/windows/Square30x30Logo.scale-100.png differ diff --git a/res/icons/windows/Square310x310Logo.scale-100.png b/res/icons/windows/Square310x310Logo.scale-100.png new file mode 100644 index 0000000..24bf879 Binary files /dev/null and b/res/icons/windows/Square310x310Logo.scale-100.png differ diff --git a/res/icons/windows/Square44x44Logo.scale-100.png b/res/icons/windows/Square44x44Logo.scale-100.png new file mode 100644 index 0000000..2d0a5d4 Binary files /dev/null and b/res/icons/windows/Square44x44Logo.scale-100.png differ diff --git a/res/icons/windows/Square44x44Logo.scale-240.png b/res/icons/windows/Square44x44Logo.scale-240.png new file mode 100644 index 0000000..3166301 Binary files /dev/null and b/res/icons/windows/Square44x44Logo.scale-240.png differ diff --git a/res/icons/windows/Square70x70Logo.scale-100.png b/res/icons/windows/Square70x70Logo.scale-100.png new file mode 100644 index 0000000..e81da15 Binary files /dev/null and b/res/icons/windows/Square70x70Logo.scale-100.png differ diff --git a/res/icons/windows/Square71x71Logo.scale-100.png b/res/icons/windows/Square71x71Logo.scale-100.png new file mode 100644 index 0000000..a0d50b6 Binary files /dev/null and b/res/icons/windows/Square71x71Logo.scale-100.png differ diff --git a/res/icons/windows/Square71x71Logo.scale-240.png b/res/icons/windows/Square71x71Logo.scale-240.png new file mode 100644 index 0000000..cfa54be Binary files /dev/null and b/res/icons/windows/Square71x71Logo.scale-240.png differ diff --git a/res/icons/windows/StoreLogo.scale-100.png b/res/icons/windows/StoreLogo.scale-100.png new file mode 100644 index 0000000..ee37e1e Binary files /dev/null and b/res/icons/windows/StoreLogo.scale-100.png differ diff --git a/res/icons/windows/StoreLogo.scale-240.png b/res/icons/windows/StoreLogo.scale-240.png new file mode 100644 index 0000000..903528e Binary files /dev/null and b/res/icons/windows/StoreLogo.scale-240.png differ diff --git a/res/icons/windows/Wide310x150Logo.scale-100.png b/res/icons/windows/Wide310x150Logo.scale-100.png new file mode 100644 index 0000000..7737e0f Binary files /dev/null and b/res/icons/windows/Wide310x150Logo.scale-100.png differ diff --git a/res/icons/windows/Wide310x150Logo.scale-240.png b/res/icons/windows/Wide310x150Logo.scale-240.png new file mode 100644 index 0000000..6249d29 Binary files /dev/null and b/res/icons/windows/Wide310x150Logo.scale-240.png differ diff --git a/res/icons/wp8/ApplicationIcon.png b/res/icons/wp8/ApplicationIcon.png new file mode 100644 index 0000000..194889c Binary files /dev/null and b/res/icons/wp8/ApplicationIcon.png differ diff --git a/res/icons/wp8/Background.png b/res/icons/wp8/Background.png new file mode 100644 index 0000000..421afea Binary files /dev/null and b/res/icons/wp8/Background.png differ diff --git a/res/native/android/ant.properties b/res/native/android/ant.properties new file mode 100644 index 0000000..433c949 --- /dev/null +++ b/res/native/android/ant.properties @@ -0,0 +1,4 @@ +key.store= +key.alias= +key.store.password= +key.alias.password= \ No newline at end of file diff --git a/res/screens/android/screen-hdpi-landscape.png b/res/screens/android/screen-hdpi-landscape.png new file mode 100644 index 0000000..f2c9857 Binary files /dev/null and b/res/screens/android/screen-hdpi-landscape.png differ diff --git a/res/screens/android/screen-hdpi-portrait.png b/res/screens/android/screen-hdpi-portrait.png new file mode 100644 index 0000000..42e570d Binary files /dev/null and b/res/screens/android/screen-hdpi-portrait.png differ diff --git a/res/screens/android/screen-ldpi-landscape.png b/res/screens/android/screen-ldpi-landscape.png new file mode 100644 index 0000000..9c553c8 Binary files /dev/null and b/res/screens/android/screen-ldpi-landscape.png differ diff --git a/res/screens/android/screen-ldpi-portrait.png b/res/screens/android/screen-ldpi-portrait.png new file mode 100644 index 0000000..10c07d7 Binary files /dev/null and b/res/screens/android/screen-ldpi-portrait.png differ diff --git a/res/screens/android/screen-mdpi-landscape.png b/res/screens/android/screen-mdpi-landscape.png new file mode 100644 index 0000000..e5dd53b Binary files /dev/null and b/res/screens/android/screen-mdpi-landscape.png differ diff --git a/res/screens/android/screen-mdpi-portrait.png b/res/screens/android/screen-mdpi-portrait.png new file mode 100644 index 0000000..cba792a Binary files /dev/null and b/res/screens/android/screen-mdpi-portrait.png differ diff --git a/res/screens/android/screen-xhdpi-landscape.png b/res/screens/android/screen-xhdpi-landscape.png new file mode 100644 index 0000000..8ce6f7c Binary files /dev/null and b/res/screens/android/screen-xhdpi-landscape.png differ diff --git a/res/screens/android/screen-xhdpi-portrait.png b/res/screens/android/screen-xhdpi-portrait.png new file mode 100644 index 0000000..98b38cf Binary files /dev/null and b/res/screens/android/screen-xhdpi-portrait.png differ diff --git a/res/screens/ios/screen-ipad-landscape-2x.png b/res/screens/ios/screen-ipad-landscape-2x.png new file mode 100644 index 0000000..4994d49 Binary files /dev/null and b/res/screens/ios/screen-ipad-landscape-2x.png differ diff --git a/res/screens/ios/screen-ipad-landscape.png b/res/screens/ios/screen-ipad-landscape.png new file mode 100644 index 0000000..bd39314 Binary files /dev/null and b/res/screens/ios/screen-ipad-landscape.png differ diff --git a/res/screens/ios/screen-ipad-portrait-2x.png b/res/screens/ios/screen-ipad-portrait-2x.png new file mode 100644 index 0000000..00d78a1 Binary files /dev/null and b/res/screens/ios/screen-ipad-portrait-2x.png differ diff --git a/res/screens/ios/screen-ipad-portrait.png b/res/screens/ios/screen-ipad-portrait.png new file mode 100644 index 0000000..171b0d7 Binary files /dev/null and b/res/screens/ios/screen-ipad-portrait.png differ diff --git a/res/screens/ios/screen-iphone-568h-2x.png b/res/screens/ios/screen-iphone-568h-2x.png new file mode 100644 index 0000000..2a7efc0 Binary files /dev/null and b/res/screens/ios/screen-iphone-568h-2x.png differ diff --git a/res/screens/ios/screen-iphone-landscape-736h.png b/res/screens/ios/screen-iphone-landscape-736h.png new file mode 100644 index 0000000..3d578c0 Binary files /dev/null and b/res/screens/ios/screen-iphone-landscape-736h.png differ diff --git a/res/screens/ios/screen-iphone-portrait-2x.png b/res/screens/ios/screen-iphone-portrait-2x.png new file mode 100644 index 0000000..7a28268 Binary files /dev/null and b/res/screens/ios/screen-iphone-portrait-2x.png differ diff --git a/res/screens/ios/screen-iphone-portrait-667h.png b/res/screens/ios/screen-iphone-portrait-667h.png new file mode 100644 index 0000000..70351f0 Binary files /dev/null and b/res/screens/ios/screen-iphone-portrait-667h.png differ diff --git a/res/screens/ios/screen-iphone-portrait-736h.png b/res/screens/ios/screen-iphone-portrait-736h.png new file mode 100644 index 0000000..f629e44 Binary files /dev/null and b/res/screens/ios/screen-iphone-portrait-736h.png differ diff --git a/res/screens/ios/screen-iphone-portrait.png b/res/screens/ios/screen-iphone-portrait.png new file mode 100644 index 0000000..f712ca5 Binary files /dev/null and b/res/screens/ios/screen-iphone-portrait.png differ diff --git a/res/screens/windows/SplashScreen.scale-100.png b/res/screens/windows/SplashScreen.scale-100.png new file mode 100644 index 0000000..6fc644e Binary files /dev/null and b/res/screens/windows/SplashScreen.scale-100.png differ diff --git a/res/screens/windows/SplashScreen.scale-240.png b/res/screens/windows/SplashScreen.scale-240.png new file mode 100644 index 0000000..33f26b3 Binary files /dev/null and b/res/screens/windows/SplashScreen.scale-240.png differ diff --git a/res/screens/windows/SplashScreenPhone.scale-240.png b/res/screens/windows/SplashScreenPhone.scale-240.png new file mode 100644 index 0000000..33f26b3 Binary files /dev/null and b/res/screens/windows/SplashScreenPhone.scale-240.png differ diff --git a/res/screens/wp8/SplashScreenImage.png b/res/screens/wp8/SplashScreenImage.png new file mode 100644 index 0000000..1d99912 Binary files /dev/null and b/res/screens/wp8/SplashScreenImage.png differ diff --git a/scripts/index.ts b/scripts/index.ts new file mode 100644 index 0000000..34b4832 --- /dev/null +++ b/scripts/index.ts @@ -0,0 +1,39 @@ +// Pour obtenir une présentation du modèle Vide, consultez la documentation suivante : +// http://go.microsoft.com/fwlink/?LinkID=397705 +// Pour déboguer du code durant le chargement d'une page dans Ripple ou sur les appareils/émulateurs Android, lancez votre application, définissez des points d'arrêt, +// puis exécutez "window.location.reload()" dans la console JavaScript. +module BlankCordovaApp1 { + "use strict"; + + export module Application { + export function initialize() { + document.addEventListener('deviceready', onDeviceReady, false); + } + + function onDeviceReady() { + // Gérer les événements de suspension et de reprise Cordova + document.addEventListener('pause', onPause, false); + document.addEventListener('resume', onResume, false); + + // TODO: Cordova a été chargé. Effectuez l'initialisation qui nécessite Cordova ici. + var parentElement = document.getElementById('deviceready'); + var listeningElement = parentElement.querySelector('.listening'); + var receivedElement = parentElement.querySelector('.received'); + listeningElement.setAttribute('style', 'display:none;'); + receivedElement.setAttribute('style', 'display:block;'); + } + + function onPause() { + // TODO: cette application a été suspendue. Enregistrez l'état de l'application ici. + } + + function onResume() { + // TODO: cette application a été réactivée. Restaurez l'état de l'application ici. + } + + } + + window.onload = function () { + Application.initialize(); + } +} diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json new file mode 100644 index 0000000..8308bc3 --- /dev/null +++ b/scripts/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "noImplicitAny": false, + "noEmitOnError": true, + "removeComments": false, + "sourceMap": true, + "inlineSources": true, + "out": "www/scripts/appBundle.js", + "target": "es5" + } +} diff --git a/scripts/typings/cordova/cordova.d.ts b/scripts/typings/cordova/cordova.d.ts new file mode 100644 index 0000000..75b77eb --- /dev/null +++ b/scripts/typings/cordova/cordova.d.ts @@ -0,0 +1,92 @@ +// Type definitions for Apache Cordova +// Project: http://cordova.apache.org +// Definitions by: Microsoft Open Technologies Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies, Inc. +// Licensed under the MIT license. + +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// + +interface Cordova { + /** Invokes native functionality by specifying corresponding service name, action and optional parameters. + * @param success A success callback function. + * @param fail An error callback function. + * @param service The service name to call on the native side (corresponds to a native class). + * @param action The action name to call on the native side (generally corresponds to the native class method). + * @param args An array of arguments to pass into the native environment. + */ + exec(success: () => any, fail: () => any, service: string, action: string, args?: string[]): void; + /** Gets the operating system name. */ + platformId: string; + /** Gets Cordova framework version */ + version: string; + /** Defines custom logic as a Cordova module. Other modules can later access it using module name provided. */ + define(moduleName: string, factory: (require: any, exports: any, module: any) => any): void; + /** Access a Cordova module by name. */ + require(moduleName: string): any; +} + +interface Document { + addEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + + removeEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + + addEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void; +} + +interface Window { + cordova:Cordova; +} + +// cordova/argscheck module +interface ArgsCheck { + checkArgs(argsSpec: string, functionName: string, args: any[], callee?: any): void; + getValue(value?: any, defaultValue?: any): any; + enableChecks: boolean; +} + +// cordova/urlutil module +interface UrlUtil { + makeAbsolute(url: string): string +} + +/** Apache Cordova instance */ +declare var cordova: Cordova; diff --git a/scripts/typings/cordova/plugins/BatteryStatus.d.ts b/scripts/typings/cordova/plugins/BatteryStatus.d.ts new file mode 100644 index 0000000..7343fab --- /dev/null +++ b/scripts/typings/cordova/plugins/BatteryStatus.d.ts @@ -0,0 +1,125 @@ +// Type definitions for Apache Cordova BatteryStatus plugin. +// Project: https://github.com/apache/cordova-plugin-battery-status +// Definitions by: Microsoft Open Technologies, Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies, Inc. +// Licensed under the MIT license. + +interface Window { + onbatterystatus: (type: BatteryStatusEvent) => void; + onbatterycritical: (type: BatteryStatusEvent) => void; + onbatterylow: (type: BatteryStatusEvent) => void; + /** + * Adds a listener for an event from the BatteryStatus plugin. + * @param type the event to listen for + * batterystatus: event fires when the percentage of battery charge + * changes by at least 1 percent, or if the device is plugged in or unplugged. + * batterycritical: event fires when the percentage of battery charge has reached + * the critical battery threshold. The value is device-specific. + * batterylow: event fires when the percentage of battery charge has + * reached the low battery threshold, device-specific value. + * @param listener the function that executes when the event fires. The function is + * passed an BatteryStatusEvent object as a parameter. + */ + addEventListener(type: "batterystatus", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; + /** + * Adds a listener for an event from the BatteryStatus plugin. + * @param type the event to listen for + * batterystatus: event fires when the percentage of battery charge + * changes by at least 1 percent, or if the device is plugged in or unplugged. + * batterycritical: event fires when the percentage of battery charge has reached + * the critical battery threshold. The value is device-specific. + * batterylow: event fires when the percentage of battery charge has + * reached the low battery threshold, device-specific value. + * @param listener the function that executes when the event fires. The function is + * passed an BatteryStatusEvent object as a parameter. + */ + addEventListener(type: "batterycritical", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; + /** + * Adds a listener for an event from the BatteryStatus plugin. + * @param type the event to listen for + * batterystatus: event fires when the percentage of battery charge + * changes by at least 1 percent, or if the device is plugged in or unplugged. + * batterycritical: event fires when the percentage of battery charge has reached + * the critical battery threshold. The value is device-specific. + * batterylow: event fires when the percentage of battery charge has + * reached the low battery threshold, device-specific value. + * @param listener the function that executes when the event fires. The function is + * passed an BatteryStatusEvent object as a parameter. + */ + addEventListener(type: "batterylow", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; + /** + * Adds a listener for an event from the BatteryStatus plugin. + * @param type the event to listen for + * batterystatus: event fires when the percentage of battery charge + * changes by at least 1 percent, or if the device is plugged in or unplugged. + * batterycritical: event fires when the percentage of battery charge has reached + * the critical battery threshold. The value is device-specific. + * batterylow: event fires when the percentage of battery charge has + * reached the low battery threshold, device-specific value. + * @param listener the function that executes when the event fires. The function is + * passed an BatteryStatusEvent object as a parameter. + */ + addEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void; + /** + * Removes a listener for an event from the BatteryStatus plugin. + * @param type The event to stop listening for. + * batterystatus: event fires when the percentage of battery charge + * changes by at least 1 percent, or if the device is plugged in or unplugged. + * batterycritical: event fires when the percentage of battery charge has reached + * the critical battery threshold. The value is device-specific. + * batterylow: event fires when the percentage of battery charge has + * reached the low battery threshold, device-specific value. + * @param callback the function that executes when the event fires. The function is + * passed an BatteryStatusEvent object as a parameter. + */ + removeEventListener(type: "batterystatus", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; + /** + * Removes a listener for an event from the BatteryStatus plugin. + * @param type The event to stop listening for. + * batterystatus: event fires when the percentage of battery charge + * changes by at least 1 percent, or if the device is plugged in or unplugged. + * batterycritical: event fires when the percentage of battery charge has reached + * the critical battery threshold. The value is device-specific. + * batterylow: event fires when the percentage of battery charge has + * reached the low battery threshold, device-specific value. + * @param callback the function that executes when the event fires. The function is + * passed an BatteryStatusEvent object as a parameter. + */ + removeEventListener(type: "batterycritical", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; + /** + * Removes a listener for an event from the BatteryStatus plugin. + * @param type The event to stop listening for. + * batterystatus: event fires when the percentage of battery charge + * changes by at least 1 percent, or if the device is plugged in or unplugged. + * batterycritical: event fires when the percentage of battery charge has reached + * the critical battery threshold. The value is device-specific. + * batterylow: event fires when the percentage of battery charge has + * reached the low battery threshold, device-specific value. + * @param callback the function that executes when the event fires. The function is + * passed an BatteryStatusEvent object as a parameter. + */ + removeEventListener(type: "batterylow", listener: (ev: BatteryStatusEvent) => any, useCapture?: boolean): void; + /** + * Removes a listener for an event from the BatteryStatus plugin. + * @param type The event to stop listening for. + * batterystatus: event fires when the percentage of battery charge + * changes by at least 1 percent, or if the device is plugged in or unplugged. + * batterycritical: event fires when the percentage of battery charge has reached + * the critical battery threshold. The value is device-specific. + * batterylow: event fires when the percentage of battery charge has + * reached the low battery threshold, device-specific value. + * @param callback the function that executes when the event fires. The function is + * passed an BatteryStatusEvent object as a parameter. + */ + removeEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void; +} + +/** Object, that passed into battery event listener */ +interface BatteryStatusEvent extends Event { + /* The percentage of battery charge (0-100). */ + level: number; + /* A boolean that indicates whether the device is plugged in. */ + isPlugged: boolean; +} \ No newline at end of file diff --git a/scripts/typings/cordova/plugins/Camera.d.ts b/scripts/typings/cordova/plugins/Camera.d.ts new file mode 100644 index 0000000..126b329 --- /dev/null +++ b/scripts/typings/cordova/plugins/Camera.d.ts @@ -0,0 +1,174 @@ +// Type definitions for Apache Cordova Camera plugin. +// Project: https://github.com/apache/cordova-plugin-camera +// Definitions by: Microsoft Open Technologies, Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies, Inc. +// Licensed under the MIT license. + +interface Navigator { + /** + * This plugin provides an API for taking pictures and for choosing images from the system's image library. + */ + camera: Camera; +} + +/** + * This plugin provides an API for taking pictures and for choosing images from the system's image library. + */ +interface Camera { + /** + * Removes intermediate photos taken by the camera from temporary storage. + * @param onSuccess Success callback, that called when cleanup succeeds. + * @param onError Error callback, that get an error message. + */ + cleanup( + onSuccess: () => void, + onError: (message: string) => void): void; + /** + * Takes a photo using the camera, or retrieves a photo from the device's image gallery. + * @param cameraSuccess Success callback, that get the image + * as a base64-encoded String, or as the URI for the image file. + * @param cameraError Error callback, that get an error message. + * @param cameraOptions Optional parameters to customize the camera settings. + */ + getPicture( + cameraSuccess: (data: string) => void, + cameraError: (message: string) => void, + cameraOptions?: CameraOptions): void; + // Next will work only on iOS + //getPicture( + // cameraSuccess: (data: string) => void, + // cameraError: (message: string) => void, + // cameraOptions?: CameraOptions): CameraPopoverHandle; +} + +interface CameraOptions { + /** Picture quality in range 0-100. Default is 50 */ + quality?: number; + /** + * Choose the format of the return value. + * Defined in navigator.camera.DestinationType. Default is FILE_URI. + * DATA_URL : 0, Return image as base64-encoded string + * FILE_URI : 1, Return image file URI + * NATIVE_URI : 2 Return image native URI + * (e.g., assets-library:// on iOS or content:// on Android) + */ + destinationType?: number; + /** + * Set the source of the picture. + * Defined in navigator.camera.PictureSourceType. Default is CAMERA. + * PHOTOLIBRARY : 0, + * CAMERA : 1, + * SAVEDPHOTOALBUM : 2 + */ + sourceType?: number; + /** Allow simple editing of image before selection. */ + allowEdit?: boolean; + /** + * Choose the returned image file's encoding. + * Defined in navigator.camera.EncodingType. Default is JPEG + * JPEG : 0 Return JPEG encoded image + * PNG : 1 Return PNG encoded image + */ + encodingType?: number; + /** + * Width in pixels to scale image. Must be used with targetHeight. + * Aspect ratio remains constant. + */ + targetWidth?: number; + /** + * Height in pixels to scale image. Must be used with targetWidth. + * Aspect ratio remains constant. + */ + targetHeight?: number; + /** + * Set the type of media to select from. Only works when PictureSourceType + * is PHOTOLIBRARY or SAVEDPHOTOALBUM. Defined in nagivator.camera.MediaType + * PICTURE: 0 allow selection of still pictures only. DEFAULT. + * Will return format specified via DestinationType + * VIDEO: 1 allow selection of video only, WILL ALWAYS RETURN FILE_URI + * ALLMEDIA : 2 allow selection from all media types + */ + mediaType?: number; + /** Rotate the image to correct for the orientation of the device during capture. */ + correctOrientation?: boolean; + /** Save the image to the photo album on the device after capture. */ + saveToPhotoAlbum?: boolean; + /** + * Choose the camera to use (front- or back-facing). + * Defined in navigator.camera.Direction. Default is BACK. + * FRONT: 0 + * BACK: 1 + */ + cameraDirection?: number; + /** iOS-only options that specify popover location in iPad. Defined in CameraPopoverOptions. */ + popoverOptions?: CameraPopoverOptions; +} + +/** + * A handle to the popover dialog created by navigator.camera.getPicture. Used on iOS only. + */ +interface CameraPopoverHandle { + /** + * Set the position of the popover. + * @param popoverOptions the CameraPopoverOptions that specify the new position. + */ + setPosition(popoverOptions: CameraPopoverOptions): void; +} + +/** + * iOS-only parameters that specify the anchor element location and arrow direction + * of the popover when selecting images from an iPad's library or album. + */ +interface CameraPopoverOptions { + x: number; + y: number; + width: number; + height: number; + /** + * Direction the arrow on the popover should point. Defined in Camera.PopoverArrowDirection + * Matches iOS UIPopoverArrowDirection constants. + * ARROW_UP : 1, + * ARROW_DOWN : 2, + * ARROW_LEFT : 4, + * ARROW_RIGHT : 8, + * ARROW_ANY : 15 + */ + arrowDir : number; +} + +declare var Camera: { + // Camera constants, defined in Camera plugin + DestinationType: { + DATA_URL: number; + FILE_URI: number; + NATIVE_URI: number + } + Direction: { + BACK: number; + FRONT: number; + } + EncodingType: { + JPEG: number; + PNG: number; + } + MediaType: { + PICTURE: number; + VIDEO: number; + ALLMEDIA: number; + } + PictureSourceType: { + PHOTOLIBRARY: number; + CAMERA: number; + SAVEDPHOTOALBUM: number; + } + // Used only on iOS + PopoverArrowDirection: { + ARROW_UP: number; + ARROW_DOWN: number; + ARROW_LEFT: number; + ARROW_RIGHT: number; + ARROW_ANY: number; + } +}; \ No newline at end of file diff --git a/scripts/typings/cordova/plugins/Contacts.d.ts b/scripts/typings/cordova/plugins/Contacts.d.ts new file mode 100644 index 0000000..29a9a59 --- /dev/null +++ b/scripts/typings/cordova/plugins/Contacts.d.ts @@ -0,0 +1,273 @@ +// Type definitions for Apache Cordova Contacts plugin. +// Project: https://github.com/apache/cordova-plugin-contacts +// Definitions by: Microsoft Open Technologies, Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies, Inc. +// Licensed under the MIT license. + +interface Navigator { + /** Provides access to the device contacts database. */ + contacts: Contacts; +} + +interface Contacts { + /** + * The navigator.contacts.create method is synchronous, and returns a new Contact object. + * This method does not retain the Contact object in the device contacts database, + * for which you need to invoke the Contact.save method. + * @param properties Object with contact fields + */ + create(properties?: ContactProperties): Contact; + /** + * The navigator.contacts.find method executes asynchronously, querying the device contacts database + * and returning an array of Contact objects. The resulting objects are passed to the onSuccess + * callback function specified by the onSuccess parameter. + * @param fields The fields parameter specifies the fields to be used as a search qualifier, + * and only those results are passed to the onSuccess callback function. A zero-length fields parameter + * is invalid and results in ContactError.INVALID_ARGUMENT_ERROR. A contactFields value of "*" returns all contact fields. + * @param onSuccess Success callback function invoked with the array of Contact objects returned from the database + * @param onError Error callback function, invoked when an error occurs. + * @param options Search options to filter navigator.contacts. + */ + find(fields: string[], + onSuccess: (contacts: Contact[]) => void, + onError: (error: ContactError) => void, + options?: ContactFindOptions): void; + /** + * The navigator.contacts.pickContact method launches the Contact Picker to select a single contact. + * The resulting object is passed to the contactSuccess callback function specified by the contactSuccess parameter. + * @param onSuccess Success callback function invoked with the array of Contact objects returned from the database + * @param onError Error callback function, invoked when an error occurs. + */ + pickContact(onSuccess: (contact: Contact) => void, + onError: (error: ContactError) => void): void +} + +interface ContactProperties { + /** A globally unique identifier. */ + id?: string; + /** The name of this Contact, suitable for display to end users. */ + displayName?: string; + /** An object containing all components of a persons name. */ + name?: ContactName; + /** A casual name by which to address the contact. */ + nickname?: string; + /** An array of all the contact's phone numbers. */ + phoneNumbers?: ContactField[]; + /** An array of all the contact's email addresses. */ + emails?: ContactField[]; + /** An array of all the contact's addresses. */ + addresses?: ContactAddress[]; + /** An array of all the contact's IM addresses. */ + ims?: ContactField[]; + /** An array of all the contact's organizations. */ + organizations?: ContactOrganization[]; + /** The birthday of the contact. */ + birthday?: Date; + /** A note about the contact. */ + note?: string; + /** An array of the contact's photos. */ + photos?: ContactField[]; + /** An array of all the user-defined categories associated with the contact. */ + categories?: ContactField[]; + /** An array of web pages associated with the contact. */ + urls?: ContactField[]; +} + +/** + * The Contact object represents a user's contact. Contacts can be created, stored, or removed + * from the device contacts database. Contacts can also be retrieved (individually or in bulk) + * from the database by invoking the navigator.contacts.find method. + */ +interface Contact extends ContactProperties { + /** + * Returns a new Contact object that is a deep copy of the calling object, with the id property set to null + */ + clone(): Contact; + /** + * Removes the contact from the device contacts database, otherwise executes an error callback with a ContactError object. + * @param onSuccess Success callback function invoked on success operation. + * @param onError Error callback function, invoked when an error occurs. + */ + remove( + onSuccess: () => void, + onError: (error: Error) => void): void; + /** + * Saves a new contact to the device contacts database, or updates an existing contact if a contact with the same id already exists. + * @param onSuccess Success callback function invoked on success operation with che Contact object. + * @param onError Error callback function, invoked when an error occurs. + */ + save( + onSuccess: (contact: Contact) => void, + onError: (error: Error) => void): void; +} + +declare var Contact: { + /** Constructor of Contact object */ + new(id?: string, + displayName?: string, + name?: ContactName, + nickname?: string, + phoneNumbers?: ContactField[], + emails?: ContactField[], + addresses?: ContactAddress[], + ims?: ContactField[], + organizations?: ContactOrganization[], + birthday?: Date, + note?: string, + photos?: ContactField[], + categories?: ContactField, + urls?: ContactField[]): Contact +}; + +/** The ContactError object is returned to the user through the contactError callback function when an error occurs. */ +interface ContactError { + /** Error code */ + code: number; + /** Error message */ + message: string; +} + +declare var ContactError: { + new(code: number): ContactError; + UNKNOWN_ERROR: number; + INVALID_ARGUMENT_ERROR: number; + TIMEOUT_ERROR: number; + PENDING_OPERATION_ERROR: number; + IO_ERROR: number; + NOT_SUPPORTED_ERROR: number; + PERMISSION_DENIED_ERROR: number +}; + +/** Contains different kinds of information about a Contact object's name. */ +interface ContactName { + /** The complete name of the contact. */ + formatted?: string; + /** The contact's family name. */ + familyName?: string; + /** The contact's given name. */ + givenName?: string; + /** The contact's middle name. */ + middleName?: string; + /** The contact's prefix (example Mr. or Dr.) */ + honorificPrefix?: string; + /** The contact's suffix (example Esq.). */ + honorificSuffix?: string; +} + +declare var ContactName: { + /** Constructor for ContactName object */ + new(formatted?: string, + familyName?: string, + givenName?: string, + middleName?: string, + honorificPrefix?: string, + honorificSuffix?: string): ContactName +}; + +/** + * The ContactField object is a reusable component that represents contact fields generically. + * Each ContactField object contains a value, type, and pref property. A Contact object stores + * several properties in ContactField[] arrays, such as phone numbers and email addresses. + * + * In most instances, there are no pre-determined values for a ContactField object's type attribute. + * For example, a phone number can specify type values of home, work, mobile, iPhone, + * or any other value that is supported by a particular device platform's contact database. + * However, for the Contact photos field, the type field indicates the format of the returned image: + * url when the value attribute contains a URL to the photo image, or base64 when the value + * contains a base64-encoded image string. + */ +interface ContactField { + /** A string that indicates what type of field this is, home for example. */ + type: string; + /** The value of the field, such as a phone number or email address. */ + value: string; + /** Set to true if this ContactField contains the user's preferred value. */ + pref: boolean; +} + +declare var ContactField: { + /** Constructor for ContactField object */ + new(type?: string, + value?: string, + pref?: boolean): ContactField +}; + +/** + * The ContactAddress object stores the properties of a single address of a contact. + * A Contact object may include more than one address in a ContactAddress[] array. + */ +interface ContactAddress { + /** Set to true if this ContactAddress contains the user's preferred value. */ + pref?: boolean; + /** A string indicating what type of field this is, home for example. */ + type?: string; + /** The full address formatted for display. */ + formatted?: string; + /** The full street address. */ + streetAddress?: string; + /** The city or locality. */ + locality?: string; + /** The state or region. */ + region?: string; + /** The zip code or postal code. */ + postalCode?: string; + /** The country name. */ + country?: string; +} + +declare var ContactAddress: { + /** Constructor of ContactAddress object */ + new(pref?: boolean, + type?: string, + formatted?: string, + streetAddress?: string, + locality?: string, + region?: string, + postalCode?: string, + country?: string): ContactAddress +}; + +/** + * The ContactOrganization object stores a contact's organization properties. A Contact object stores + * one or more ContactOrganization objects in an array. + */ +interface ContactOrganization { + /** Set to true if this ContactOrganization contains the user's preferred value. */ + pref?: boolean; + /** A string that indicates what type of field this is, home for example. */ + type?: string; + /** The name of the organization. */ + name?: string; + /** The department the contract works for. */ + department?: string; + /** The contact's title at the organization. */ + title?: string; +} + +declare var ContactOrganization: { + /** Constructor for ContactOrganization object */ + new(pref?: boolean, + type?: string, + name?: string, + department?: string, + title?: string): ContactOrganization +}; + +/** Search options to filter navigator.contacts. */ +interface ContactFindOptions { + /** The search string used to find navigator.contacts. */ + filter?: string; + /** Determines if the find operation returns multiple navigator.contacts. */ + multiple?: boolean; + /* Contact fields to be returned back. If specified, the resulting Contact object only features values for these fields. */ + desiredFields?: string[]; +} + +declare var ContactFindOptions: { + /** Constructor for ContactFindOptions object */ + new(filter?: string, + multiple?: boolean, + desiredFields?: string[]): ContactFindOptions +}; \ No newline at end of file diff --git a/scripts/typings/cordova/plugins/Device.d.ts b/scripts/typings/cordova/plugins/Device.d.ts new file mode 100644 index 0000000..283406c --- /dev/null +++ b/scripts/typings/cordova/plugins/Device.d.ts @@ -0,0 +1,29 @@ +// Type definitions for Apache Cordova Device plugin. +// Project: https://github.com/apache/cordova-plugin-device +// Definitions by: Microsoft Open Technologies, Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies, Inc. +// Licensed under the MIT license. + +/** + * This plugin defines a global device object, which describes the device's hardware and software. + * Although the object is in the global scope, it is not available until after the deviceready event. + */ +interface Device { + /** Get the version of Cordova running on the device. */ + cordova: string; + /** + * The device.model returns the name of the device's model or product. The value is set + * by the device manufacturer and may be different across versions of the same product. + */ + model: string; + /** Get the device's operating system name. */ + platform: string; + /** Get the device's Universally Unique Identifier (UUID). */ + uuid: string; + /** Get the operating system version. */ + version: string; +} + +declare var device: Device; \ No newline at end of file diff --git a/scripts/typings/cordova/plugins/DeviceMotion.d.ts b/scripts/typings/cordova/plugins/DeviceMotion.d.ts new file mode 100644 index 0000000..a0e8908 --- /dev/null +++ b/scripts/typings/cordova/plugins/DeviceMotion.d.ts @@ -0,0 +1,77 @@ +// Type definitions for Apache Cordova Device Motion plugin. +// Project: https://github.com/apache/cordova-plugin-device-motion +// Definitions by: Microsoft Open Technologies, Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies, Inc. +// Licensed under the MIT license. + +interface Navigator { + /** + * This plugin provides access to the device's accelerometer. The accelerometer is a motion sensor + * that detects the change (delta) in movement relative to the current device orientation, + * in three dimensions along the x, y, and z axis. + */ + accelerometer: Accelerometer; +} + +/** + * This plugin provides access to the device's accelerometer. The accelerometer is a motion sensor + * that detects the change (delta) in movement relative to the current device orientation, + * in three dimensions along the x, y, and z axis. + */ +interface Accelerometer { + /** + * Stop watching the Acceleration referenced by the watchID parameter. + * @param watchID The ID returned by navigator.accelerometer.watchAcceleration. + */ + clearWatch(watchID: WatchHandle): void; + /** + * Get the current acceleration along the x, y, and z axes. + * These acceleration values are returned to the accelerometerSuccess callback function. + * @param accelerometerSuccess Success callback that gets the Acceleration object. + * @param accelerometerError Success callback + */ + getCurrentAcceleration( + accelerometerSuccess: (acceleration: Acceleration) => void, + accelerometerError: () => void): void; + /** + * Retrieves the device's current Acceleration at a regular interval, executing the + * accelerometerSuccess callback function each time. Specify the interval in milliseconds + * via the acceleratorOptions object's frequency parameter. + * The returned watch ID references the accelerometer's watch interval, and can be used + * with navigator.accelerometer.clearWatch to stop watching the accelerometer. + * @param accelerometerSuccess Callback, that called at every time interval and passes an Acceleration object. + * @param accelerometerError Error callback. + * @param accelerometerOptions Object with options for watchAcceleration + */ + watchAcceleration( + accelerometerSuccess: (acceleration: Acceleration) => void, + accelerometerError: () => void, + accelerometerOptions?: AccelerometerOptions): WatchHandle; +} + +/** + * Contains Accelerometer data captured at a specific point in time. Acceleration values include + * the effect of gravity (9.81 m/s^2), so that when a device lies flat and facing up, x, y, and z + * values returned should be 0, 0, and 9.81. + */ +interface Acceleration { + /** Amount of acceleration on the x-axis. (in m/s^2) */ + x: number; + /** Amount of acceleration on the y-axis. (in m/s^2) */ + y: number; + /** Amount of acceleration on the z-axis. (in m/s^2) */ + z: number; + /** Creation timestamp in milliseconds. */ + timestamp: number; +} + +/** Object with options for watchAcceleration */ +interface AccelerometerOptions { + /** How often to retrieve the Acceleration in milliseconds. (Default: 10000) */ + frequency?: number; +} + +/** Abstract type for watch IDs used by Accelerometer. Values of these type are actually `number` at runtime.*/ +interface WatchHandle { } \ No newline at end of file diff --git a/scripts/typings/cordova/plugins/DeviceOrientation.d.ts b/scripts/typings/cordova/plugins/DeviceOrientation.d.ts new file mode 100644 index 0000000..effbc06 --- /dev/null +++ b/scripts/typings/cordova/plugins/DeviceOrientation.d.ts @@ -0,0 +1,86 @@ +// Type definitions for Apache Cordova Device Orientation plugin. +// Project: https://github.com/apache/cordova-plugin-device-orientation +// Definitions by: Microsoft Open Technologies, Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies, Inc. +// Licensed under the MIT license. + +interface Navigator { + /** + * This plugin provides access to the device's compass. The compass is a sensor that detects + * the direction or heading that the device is pointed, typically from the top of the device. + * It measures the heading in degrees from 0 to 359.99, where 0 is north. + */ + compass: Compass; +} + +/** + * This plugin provides access to the device's compass. The compass is a sensor that detects + * the direction or heading that the device is pointed, typically from the top of the device. + * It measures the heading in degrees from 0 to 359.99, where 0 is north. + */ +interface Compass { + /** + * Get the current compass heading. The compass heading is returned via a CompassHeading + * object using the onSuccess callback function. + * @param onSuccess Success callback that passes CompassHeading object. + * @param onError Error callback that passes CompassError object. + */ + getCurrentHeading( + onSuccess: (heading: CompassHeading) => void, + onError: (error: CompassError) => void, + options?: CompassOptions): void; + /** + * Gets the device's current heading at a regular interval. Each time the heading is retrieved, + * the headingSuccess callback function is executed. The returned watch ID references the compass + * watch interval. The watch ID can be used with navigator.compass.clearWatch to stop watching + * the navigator.compass. + * @param onSuccess Success callback that passes CompassHeading object. + * @param onError Error callback that passes CompassError object. + * @param options CompassOptions object + */ + watchHeading( + onSuccess: (heading: CompassHeading) => void, + onError: (error: CompassError) => void, + options?: CompassOptions): number; + /** + * Stop watching the compass referenced by the watch ID parameter. + * @param id The ID returned by navigator.compass.watchHeading. + */ + clearWatch(id: number): void; +} + +/** A CompassHeading object is returned to the compassSuccess callback function. */ +interface CompassHeading { + /** The heading in degrees from 0-359.99 at a single moment in time. */ + magneticHeading: number; + /** The heading relative to the geographic North Pole in degrees 0-359.99 at a single moment in time. A negative value indicates that the true heading can't be determined. */ + trueHeading: number; + /** The deviation in degrees between the reported heading and the true heading. */ + headingAccuracy: number; + /** The time at which this heading was determined. */ + timestamp: number; +} + +interface CompassOptions { + filter?: number; + frequency?: number; +} + +/** A CompassError object is returned to the onError callback function when an error occurs. */ +interface CompassError { + /** + * One of the predefined error codes + * CompassError.COMPASS_INTERNAL_ERR + * CompassError.COMPASS_NOT_SUPPORTED + */ + code: number; +} + +declare var CompassError: { + /** Constructor for CompassError object */ + new(code: number): CompassError; + COMPASS_INTERNAL_ERR: number; + COMPASS_NOT_SUPPORTED: number +} \ No newline at end of file diff --git a/scripts/typings/cordova/plugins/Dialogs.d.ts b/scripts/typings/cordova/plugins/Dialogs.d.ts new file mode 100644 index 0000000..6d86c62 --- /dev/null +++ b/scripts/typings/cordova/plugins/Dialogs.d.ts @@ -0,0 +1,69 @@ +// Type definitions for Apache Cordova Dialogs plugin. +// Project: https://github.com/apache/cordova-plugin-dialogs +// Definitions by: Microsoft Open Technologies, Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies, Inc. +// Licensed under the MIT license. + +interface Navigator { + /** This plugin provides access to some native dialog UI elements. */ + notification: Notification +} + +/** This plugin provides access to some native dialog UI elements. */ +interface Notification { + /** + * Shows a custom alert or dialog box. Most Cordova implementations use a native dialog box for this feature, + * but some platforms use the browser's alert function, which is typically less customizable. + * @param message Dialog message. + * @param alertCallback Callback to invoke when alert dialog is dismissed. + * @param title Dialog title, defaults to 'Alert'. + * @param buttonName Button name, defaults to OK. + */ + alert(message: string, + alertCallback: () => void, + title?: string, + buttonName?: string): void; + /** + * The device plays a beep sound. + * @param times The number of times to repeat the beep. + */ + beep(times: number): void; + /** + * Displays a customizable confirmation dialog box. + * @param message Dialog message. + * @param confirmCallback Callback to invoke with index of button pressed (1, 2, or 3) + * or when the dialog is dismissed without a button press (0). + * @param title Dialog title, defaults to Confirm. + * @param buttonLabels Array of strings specifying button labels, defaults to [OK,Cancel]. + */ + confirm(message: string, + confirmCallback: (choice: number) => void, + title?: string, + buttonLabels?: string[]): void; + /** + * Displays a native dialog box that is more customizable than the browser's prompt function. + * @param message Dialog message. + * @param promptCallback Callback to invoke when a button is pressed. + * @param title Dialog title, defaults to "Prompt". + * @param buttonLabels Array of strings specifying button labels, defaults to ["OK","Cancel"]. + * @param defaultText Default textbox input value, default: "". + */ + prompt(message: string, + promptCallback: (result: NotificationPromptResult) => void, + title?: string, + buttonLabels?: string[], + defaultText?: string): void; +} + +/** Object, passed to promptCallback */ +interface NotificationPromptResult { + /** + * The index of the pressed button. Note that the index uses one-based indexing, so the value is 1, 2, 3, etc. + * 0 is the result when the dialog is dismissed without a button press. + */ + buttonIndex: number; + /** The text entered in the prompt dialog box. */ + input1: string; +} \ No newline at end of file diff --git a/scripts/typings/cordova/plugins/FileSystem.d.ts b/scripts/typings/cordova/plugins/FileSystem.d.ts new file mode 100644 index 0000000..1e1476b --- /dev/null +++ b/scripts/typings/cordova/plugins/FileSystem.d.ts @@ -0,0 +1,364 @@ +// Type definitions for Apache Cordova File System plugin. +// Project: https://github.com/apache/cordova-plugin-file +// Definitions by: Microsoft Open Technologies, Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies, Inc. +// Licensed under the MIT license. + +interface Window { + /** + * Requests a filesystem in which to store application data. + * @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or PERSISTENT. + * @param size This is an indicator of how much storage space, in bytes, the application expects to need. + * @param successCallback The callback that is called when the user agent provides a filesystem. + * @param errorCallback A callback that is called when errors happen, or when the request to obtain the filesystem is denied. + */ + requestFileSystem( + type: number, + size: number, + successCallback: (fileSystem: FileSystem) => void, + errorCallback?: (fileError: FileError) => void): void; + /** + * Look up file system Entry referred to by local URI. + * @param string uri URI referring to a local file or directory + * @param successCallback invoked with Entry object corresponding to URI + * @param errorCallback invoked if error occurs retrieving file system entry + */ + resolveLocalFileSystemURI(uri: string, + successCallback: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; + TEMPORARY: number; + PERSISTENT: number; +} + +/** This interface represents a file system. */ +interface FileSystem { + /* The name of the file system, unique across the list of exposed file systems. */ + name: string; + /** The root directory of the file system. */ + root: DirectoryEntry; +} + +/** + * An abstract interface representing entries in a file system, + * each of which may be a File or DirectoryEntry. + */ +interface Entry { + /** Entry is a file. */ + isFile: boolean; + /** Entry is a directory. */ + isDirectory: boolean; + /** The name of the entry, excluding the path leading to it. */ + name: string; + /** The full absolute path from the root to the entry. */ + fullPath: string; + /** The file system on which the entry resides. */ + fileSystem: FileSystem; + nativeURL: string; + /** + * Look up metadata about this entry. + * @param successCallback A callback that is called with the time of the last modification. + * @param errorCallback A callback that is called when errors happen. + */ + getMetadata( + successCallback: (metadata: Metadata) => void, + errorCallback?: (error: FileError) => void): void; + /** + * Move an entry to a different location on the file system. It is an error to try to: + * move a directory inside itself or to any child at any depth;move an entry into its parent if a name different from its current one isn't provided; + * move a file to a path occupied by a directory; + * move a directory to a path occupied by a file; + * move any element to a path occupied by a directory which is not empty. + * A move of a file on top of an existing file must attempt to delete and replace that file. + * A move of a directory on top of an existing empty directory must attempt to delete and replace that directory. + * @param parent The directory to which to move the entry. + * @param newName The new name of the entry. Defaults to the Entry's current name if unspecified. + * @param successCallback A callback that is called with the Entry for the new location. + * @param errorCallback A callback that is called when errors happen. + */ + moveTo(parent: DirectoryEntry, + newName?: string, + successCallback?: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; + /** + * Copy an entry to a different location on the file system. It is an error to try to: + * copy a directory inside itself or to any child at any depth; + * copy an entry into its parent if a name different from its current one isn't provided; + * copy a file to a path occupied by a directory; + * copy a directory to a path occupied by a file; + * copy any element to a path occupied by a directory which is not empty. + * A copy of a file on top of an existing file must attempt to delete and replace that file. + * A copy of a directory on top of an existing empty directory must attempt to delete and replace that directory. + * Directory copies are always recursive--that is, they copy all contents of the directory. + * @param parent The directory to which to move the entry. + * @param newName The new name of the entry. Defaults to the Entry's current name if unspecified. + * @param successCallback A callback that is called with the Entry for the new object. + * @param errorCallback A callback that is called when errors happen. + */ + copyTo(parent: DirectoryEntry, + newName?: string, + successCallback?: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; + /** + * Returns a URL that can be used as the src attribute of a