Merge 324297db0d into 0f73b8805e
142
.gitattributes
vendored
|
|
@ -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
|
||||
|
|
|
|||
266
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
6
POGOserver Control/App.config
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
38
POGOserver Control/My Project/Application.Designer.vb
generated
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 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é.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
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
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
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
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.POGOserver_Control.POGOserver
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
10
POGOserver Control/My Project/Application.myapp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>POGOserver</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
POGOserver Control/My Project/AssemblyInfo.vb
Normal file
|
|
@ -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
|
||||
|
||||
<Assembly: AssemblyTitle("POGOserver Control")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("POGOserver Control")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
<Assembly: Guid("53a6cb25-7fab-4f55-b850-c87ffeca3880")>
|
||||
|
||||
' 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 :
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("0.6.2.0")>
|
||||
<Assembly: AssemblyFileVersion("0.6.2.0")>
|
||||
63
POGOserver Control/My Project/Resources.Designer.vb
generated
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 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é.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
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.
|
||||
'''<summary>
|
||||
''' Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
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
|
||||
|
||||
'''<summary>
|
||||
''' Remplace la propriété CurrentUICulture du thread actuel pour toutes
|
||||
''' les recherches de ressources à l'aide de cette classe de ressource fortement typée.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
POGOserver Control/My Project/Resources.resx
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
73
POGOserver Control/My Project/Settings.Designer.vb
generated
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 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é.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
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
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
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
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
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
|
||||
7
POGOserver Control/My Project/Settings.settings
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
76
POGOserver Control/My Project/app.manifest
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- Options du manifeste de contrôle de compte d'utilisateur
|
||||
Si vous souhaitez modifier le niveau du contrôle de compte d'utilisateur Windows, remplacez le
|
||||
nœud requestedExecutionLevel par l'une des propositions suivantes.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
La spécification de l'élément requestedExecutionLevel désactive la virtualisation de fichiers et du Registre.
|
||||
Supprimez cet élément si votre application a besoin de la virtualisation pour des
|
||||
raisons de compatibilité descendante.
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Liste des versions de Windows pour lesquelles cette application a été testée, et sur
|
||||
lesquelles elle doit fonctionner. Supprimez les marques de commentaire des éléments appropriés, et Windows va
|
||||
automatiquement sélectionner l'environnement le plus compatible. -->
|
||||
|
||||
<!-- Windows Vista -->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||
|
||||
<!-- Windows 7 -->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||
|
||||
<!-- Windows 8 -->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||
|
||||
<!-- Windows 8.1 -->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- Indique que l'application prend en charge DPI et qu'elle n'est pas automatiquement mise à l'échelle par Windows à un niveau de
|
||||
DPI plus élevé. Les applications Windows Presentation Foundation (WPF) prennent automatiquement en charge DPI et n'ont pas besoin
|
||||
d'opter pour ce choix. Les applications Windows Forms qui ciblent .NET Framework 4.6 et qui optent pour ce paramètre, doivent
|
||||
également affecter la valeur 'true' au paramètre 'EnableWindowsFormsHighDpiAutoResizing' dans leur fichier app.config. -->
|
||||
<!--
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
-->
|
||||
|
||||
<!-- Activer les thèmes pour les contrôles et boîtes de dialogue communes de Windows (Windows XP et version ultérieure) -->
|
||||
<!--
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
</assembly>
|
||||
169
POGOserver Control/POGOserver Control.vbproj
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{BF7FA37B-9C74-4FA1-9EDE-A88C77BB920D}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>POGOserver_Control.My.MyApplication</StartupObject>
|
||||
<RootNamespace>POGOserver_Control</RootNamespace>
|
||||
<AssemblyName>POGOserver Control</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publier\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>POGOserver Control.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>POGOserver Control.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>POGOserver.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="POGOserver-Main.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="POGOserver-Main.Designer.vb">
|
||||
<DependentUpon>POGOserver-Main.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="POGOserver-Main.resx">
|
||||
<DependentUpon>POGOserver-Main.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\app.manifest" />
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="POGOserver.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 et x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
104
POGOserver Control/POGOserver-Main.Designer.vb
generated
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class POGOserver
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form remplace la méthode Dispose pour nettoyer la liste des composants.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
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.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
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
|
||||
145
POGOserver Control/POGOserver-Main.resx
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
41
POGOserver Control/POGOserver-Main.vb
Normal file
|
|
@ -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
|
||||
BIN
POGOserver Control/POGOserver.ico
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
109
POGOserver.jsproj
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Android">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Android</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|iOS">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>iOS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows-AnyCPU">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows-AnyCPU</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows-x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows-x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows-x86">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows-x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows-ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows-ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows Phone 8">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows Phone 8</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows Phone (Universal)">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows Phone (Universal)</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Android">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Android</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|iOS">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>iOS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows-AnyCPU">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows-AnyCPU</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows-x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows-x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows-x86">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows-x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows-ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows-ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows Phone 8">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows Phone 8</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows Phone (Universal)">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows Phone (Universal)</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{4a0dddb5-7a95-4fbf-97cc-616d07737a77}" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>623ed577-0a06-4a07-a70b-d179fbccc78d</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0'">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TypeScriptCompileOnSaveEnabled>false</TypeScriptCompileOnSaveEnabled>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ApacheCordovaTools\vs-mda-targets\Microsoft.TypeScript.MDA.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets" />
|
||||
<PropertyGroup>
|
||||
<ProjectUISubcaption>Tools for Apache Cordova</ProjectUISubcaption>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetPlatformIdentifier>MDD</TargetPlatformIdentifier>
|
||||
</PropertyGroup>
|
||||
<Target Name="EnsureBuildPrerequisites">
|
||||
<!-- These errors will trigger if building from inside Visual Studio and requirements could not be determined -->
|
||||
<Error Condition="$(MDAPropertiesEvaluated) == 'true' And $(NodeJsDir) == ''" Text="Path to NodeJs could not be determined. Please check that NodeJs has been installed." />
|
||||
<Error Condition="$(MDAPropertiesEvaluated) == 'true' And $(MDAVsixDir) == ''" Text="Path to the Visual Studio Extension for Tools for Apache Cordova could not be determined. Please check that the extension has been installed." />
|
||||
<!-- These errors will trigger if building from outside Visual Studio (e.g. command line) and environment variables have not been set -->
|
||||
<Error Condition="$(MDAPropertiesEvaluated) == '' And $(NodeJsDir) == ''" Text="Path to NodeJs has not been specified. Please check that NodeJs has been installed and set the NodeJsDir environment variable before building." />
|
||||
<Error Condition="$(MDAPropertiesEvaluated) == '' And $(MDAVsixDir) == ''" Text="Path to Visual Studio Extension for Tools for Apache Cordova has not been specified. Please install it and set the MDAVsixDir environment variable before building." />
|
||||
<!-- Sanity check that things exist in the specified places. These are more likely to fail if building outside Visual Studio and the required environment variables have not been set, or set incorrectly. -->
|
||||
<Error Condition="!Exists('$(NodeJsDir)') Or !Exists('$(NodeJsDir)\node.exe')" Text="The specified NodeJs directory $(NodeJsDir) either does not exist, or does not contain node.exe. Please check that NodeJs has been installed, and set the NodeJsDir variable to the correct directory." />
|
||||
<Error Condition="!Exists('$(MDAVsixDir)') Or !Exists('$(MDAVsixDir)\packages\vs-tac')" Text="The specified directory to the Visual Studio extension $(MDAVsixDir)\node.exe either does not exist, or does not contain a packages\vs-tac sub-directory. Please check that the extension directory exists and set the MDAVsixDir variable to the correct directory." />
|
||||
<!-- Installs (if necessary) the supporting Nodejs module -->
|
||||
<Exec Command=""$(MDAVsixDir)"\packages\vs-tac\install "$(NodeJsDir)" "$(MDAVsixDir)"\packages\vs-tac" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Import Project="_apacheCordovaProjectSourceItems.Targets" Condition="Exists('_apacheCordovaProjectSourceItems.Targets')" />
|
||||
</Project>
|
||||
34
POGOserver.sln
Normal file
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
};
|
||||
BIN
api/img/POGOserver.png
Normal file
|
After Width: | Height: | Size: 650 B |
5
bower.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name": "POGOserver",
|
||||
"dependencies": {
|
||||
}
|
||||
}
|
||||
11
build.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"android": {
|
||||
"release": {
|
||||
"keystore": "",
|
||||
"storePassword": "",
|
||||
"alias": "",
|
||||
"password" : "",
|
||||
"keystoreType": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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/"
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
112
config.xml
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<widget xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:vs="http://schemas.microsoft.com/appx/2014/htmlapps" id="io.cordova.pogoserver" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" defaultlocale="fr-FR" windows-packageVersion="1.0.0.0">
|
||||
<name>POGOserver</name>
|
||||
<description>A blank project that uses Apache Cordova to help you build an app that targets multiple mobile platforms: Android, iOS, Windows, and Windows Phone.</description>
|
||||
<author href="http://cordova.io" email="dev@cordova.apache.org">Apache Cordova Team</author>
|
||||
<content src="index.html" />
|
||||
<access origin="*" />
|
||||
<vs:features />
|
||||
<preference name="SplashScreen" value="screen" />
|
||||
<preference name="windows-target-version" value="8.1" />
|
||||
<!-- Support for Cordova 5.0.0 plugin system -->
|
||||
<plugin name="cordova-plugin-whitelist" version="1" />
|
||||
<allow-intent href="http://*/*" />
|
||||
<allow-intent href="https://*/*" />
|
||||
<allow-intent href="tel:*" />
|
||||
<allow-intent href="sms:*" />
|
||||
<allow-intent href="mailto:*" />
|
||||
<allow-intent href="geo:*" />
|
||||
<platform name="android">
|
||||
<allow-intent href="market:*" />
|
||||
</platform>
|
||||
<platform name="ios">
|
||||
<allow-intent href="itms:*" />
|
||||
<allow-intent href="itms-apps:*" />
|
||||
</platform>
|
||||
<platform name="android">
|
||||
<icon src="res/icons/android/icon-36-ldpi.png" density="ldpi" />
|
||||
<icon src="res/icons/android/icon-48-mdpi.png" density="mdpi" />
|
||||
<icon src="res/icons/android/icon-72-hdpi.png" density="hdpi" />
|
||||
<icon src="res/icons/android/icon-96-xhdpi.png" density="xhdpi" />
|
||||
</platform>
|
||||
<platform name="ios">
|
||||
<!-- iOS 8.0+ -->
|
||||
<!-- iPhone 6 Plus -->
|
||||
<icon src="res/icons/ios/icon-60-3x.png" width="180" height="180" />
|
||||
<!-- iOS 7.0+ -->
|
||||
<!-- iPhone / iPod Touch -->
|
||||
<icon src="res/icons/ios/icon-60.png" width="60" height="60" />
|
||||
<icon src="res/icons/ios/icon-60-2x.png" width="120" height="120" />
|
||||
<!-- iPad -->
|
||||
<icon src="res/icons/ios/icon-76.png" width="76" height="76" />
|
||||
<icon src="res/icons/ios/icon-76-2x.png" width="152" height="152" />
|
||||
<!-- iOS 6.1 -->
|
||||
<!-- Spotlight Icon -->
|
||||
<icon src="res/icons/ios/icon-40.png" width="40" height="40" />
|
||||
<icon src="res/icons/ios/icon-40-2x.png" width="80" height="80" />
|
||||
<!-- iPhone / iPod Touch -->
|
||||
<icon src="res/icons/ios/icon-57.png" width="57" height="57" />
|
||||
<icon src="res/icons/ios/icon-57-2x.png" width="114" height="114" />
|
||||
<!-- iPad -->
|
||||
<icon src="res/icons/ios/icon-72.png" width="72" height="72" />
|
||||
<icon src="res/icons/ios/icon-72-2x.png" width="144" height="144" />
|
||||
<!-- iPhone Spotlight and Settings Icon -->
|
||||
<icon src="res/icons/ios/icon-small.png" width="29" height="29" />
|
||||
<icon src="res/icons/ios/icon-small-2x.png" width="58" height="58" />
|
||||
<!-- iPad Spotlight and Settings Icon -->
|
||||
<icon src="res/icons/ios/icon-50.png" width="50" height="50" />
|
||||
<icon src="res/icons/ios/icon-50-2x.png" width="100" height="100" />
|
||||
</platform>
|
||||
<platform name="windows">
|
||||
<icon src="res/icons/windows/Square150x150Logo.scale-100.png" width="150" height="150" />
|
||||
<icon src="res/icons/windows/Square150x150Logo.scale-240.png" width="360" height="360" />
|
||||
<icon src="res/icons/windows/Square30x30Logo.scale-100.png" width="30" height="30" />
|
||||
<icon src="res/icons/windows/Square310x310Logo.scale-100.png" width="310" height="310" />
|
||||
<icon src="res/icons/windows/Square44x44Logo.scale-100.png" width="44" height="44" />
|
||||
<icon src="res/icons/windows/Square44x44Logo.scale-240.png" width="106" height="106" />
|
||||
<icon src="res/icons/windows/Square70x70Logo.scale-100.png" width="70" height="70" />
|
||||
<icon src="res/icons/windows/Square71x71Logo.scale-100.png" width="71" height="71" />
|
||||
<icon src="res/icons/windows/Square71x71Logo.scale-240.png" width="170" height="170" />
|
||||
<icon src="res/icons/windows/StoreLogo.scale-100.png" width="50" height="50" />
|
||||
<icon src="res/icons/windows/StoreLogo.scale-240.png" width="120" height="120" />
|
||||
<icon src="res/icons/windows/Wide310x150Logo.scale-100.png" width="310" height="150" />
|
||||
<icon src="res/icons/windows/Wide310x150Logo.scale-240.png" width="744" height="360" />
|
||||
</platform>
|
||||
<platform name="wp8">
|
||||
<icon src="res/icons/wp8/ApplicationIcon.png" width="99" height="99" />
|
||||
<icon src="res/icons/wp8/Background.png" width="159" height="159" />
|
||||
</platform>
|
||||
<platform name="android">
|
||||
<splash src="res/screens/android/screen-hdpi-landscape.png" density="land-hdpi" />
|
||||
<splash src="res/screens/android/screen-ldpi-landscape.png" density="land-ldpi" />
|
||||
<splash src="res/screens/android/screen-mdpi-landscape.png" density="land-mdpi" />
|
||||
<splash src="res/screens/android/screen-xhdpi-landscape.png" density="land-xhdpi" />
|
||||
<splash src="res/screens/android/screen-hdpi-portrait.png" density="port-hdpi" />
|
||||
<splash src="res/screens/android/screen-ldpi-portrait.png" density="port-ldpi" />
|
||||
<splash src="res/screens/android/screen-mdpi-portrait.png" density="port-mdpi" />
|
||||
<splash src="res/screens/android/screen-xhdpi-portrait.png" density="port-xhdpi" />
|
||||
</platform>
|
||||
<platform name="ios">
|
||||
<splash src="res/screens/ios/screen-iphone-portrait.png" width="320" height="480" />
|
||||
<splash src="res/screens/ios/screen-iphone-portrait-2x.png" width="640" height="960" />
|
||||
<splash src="res/screens/ios/screen-ipad-portrait.png" width="768" height="1024" />
|
||||
<splash src="res/screens/ios/screen-ipad-portrait-2x.png" width="1536" height="2048" />
|
||||
<splash src="res/screens/ios/screen-ipad-landscape.png" width="1024" height="768" />
|
||||
<splash src="res/screens/ios/screen-ipad-landscape-2x.png" width="2048" height="1536" />
|
||||
<splash src="res/screens/ios/screen-iphone-568h-2x.png" width="640" height="1136" />
|
||||
<splash src="res/screens/ios/screen-iphone-portrait-667h.png" width="750" height="1334" />
|
||||
<splash src="res/screens/ios/screen-iphone-portrait-736h.png" width="1242" height="2208" />
|
||||
<splash src="res/screens/ios/screen-iphone-landscape-736h.png" width="2208" height="1242" />
|
||||
</platform>
|
||||
<platform name="windows">
|
||||
<splash src="res/screens/windows/SplashScreen.scale-100.png" width="620" height="300" />
|
||||
<splash src="res/screens/windows/SplashScreen.scale-240.png" width="1152" height="1920" />
|
||||
<splash src="res/screens/windows/SplashScreenPhone.scale-240.png" width="1152" height="1920" />
|
||||
</platform>
|
||||
<platform name="wp8">
|
||||
<splash src="res/screens/wp8/SplashScreenImage.png" width="768" height="1280" />
|
||||
</platform>
|
||||
<vs:platformSpecificValues>
|
||||
<vs:platformSpecificWidget platformName="windows" version="1.0.0.0" />
|
||||
</vs:platformSpecificValues>
|
||||
</widget>
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
set LIBPROTOBUF=%CD%\protobuf
|
||||
npm install node-protobuf && npm install
|
||||
30
merges/android/scripts/android2.3-jscompat.js
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
}());
|
||||
10
merges/android/scripts/platformOverrides.js
Normal file
|
|
@ -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);
|
||||
}
|
||||
}());
|
||||
10
merges/windows/scripts/platformOverrides.js
Normal file
|
|
@ -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);
|
||||
}
|
||||
}());
|
||||
176
merges/windows/scripts/winstore-jscompat.js
Normal file
|
|
@ -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 = "<test/>";
|
||||
}
|
||||
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);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}());
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
BIN
res/icons/android/icon-36-ldpi.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
res/icons/android/icon-48-mdpi.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
res/icons/android/icon-72-hdpi.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
res/icons/android/icon-96-xhdpi.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
res/icons/ios/icon-40-2x.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
res/icons/ios/icon-40.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
res/icons/ios/icon-50-2x.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
res/icons/ios/icon-50.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
res/icons/ios/icon-57-2x.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
res/icons/ios/icon-57.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
res/icons/ios/icon-60-2x.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
res/icons/ios/icon-60-3x.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
res/icons/ios/icon-60.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
res/icons/ios/icon-72-2x.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
res/icons/ios/icon-72.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
res/icons/ios/icon-76-2x.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
res/icons/ios/icon-76.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
res/icons/ios/icon-small-2x.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
res/icons/ios/icon-small.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
res/icons/windows/Square150x150Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 639 B |
BIN
res/icons/windows/Square150x150Logo.scale-240.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
res/icons/windows/Square30x30Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 213 B |
BIN
res/icons/windows/Square310x310Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
res/icons/windows/Square44x44Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 951 B |
BIN
res/icons/windows/Square44x44Logo.scale-240.png
Normal file
|
After Width: | Height: | Size: 753 B |
BIN
res/icons/windows/Square70x70Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
res/icons/windows/Square71x71Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
res/icons/windows/Square71x71Logo.scale-240.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
res/icons/windows/StoreLogo.scale-100.png
Normal file
|
After Width: | Height: | Size: 309 B |
BIN
res/icons/windows/StoreLogo.scale-240.png
Normal file
|
After Width: | Height: | Size: 902 B |
BIN
res/icons/windows/Wide310x150Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
res/icons/windows/Wide310x150Logo.scale-240.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
res/icons/wp8/ApplicationIcon.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
res/icons/wp8/Background.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
4
res/native/android/ant.properties
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
key.store=
|
||||
key.alias=
|
||||
key.store.password=
|
||||
key.alias.password=
|
||||
BIN
res/screens/android/screen-hdpi-landscape.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
res/screens/android/screen-hdpi-portrait.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
res/screens/android/screen-ldpi-landscape.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
res/screens/android/screen-ldpi-portrait.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
res/screens/android/screen-mdpi-landscape.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
res/screens/android/screen-mdpi-portrait.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
res/screens/android/screen-xhdpi-landscape.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
res/screens/android/screen-xhdpi-portrait.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
res/screens/ios/screen-ipad-landscape-2x.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
res/screens/ios/screen-ipad-landscape.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
res/screens/ios/screen-ipad-portrait-2x.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
res/screens/ios/screen-ipad-portrait.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
res/screens/ios/screen-iphone-568h-2x.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
res/screens/ios/screen-iphone-landscape-736h.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
res/screens/ios/screen-iphone-portrait-2x.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
res/screens/ios/screen-iphone-portrait-667h.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
res/screens/ios/screen-iphone-portrait-736h.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
res/screens/ios/screen-iphone-portrait.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
res/screens/windows/SplashScreen.scale-100.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
res/screens/windows/SplashScreen.scale-240.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
res/screens/windows/SplashScreenPhone.scale-240.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
res/screens/wp8/SplashScreenImage.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
39
scripts/index.ts
Normal file
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
11
scripts/tsconfig.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"noImplicitAny": false,
|
||||
"noEmitOnError": true,
|
||||
"removeComments": false,
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"out": "www/scripts/appBundle.js",
|
||||
"target": "es5"
|
||||
}
|
||||
}
|
||||
92
scripts/typings/cordova/cordova.d.ts
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
// Type definitions for Apache Cordova
|
||||
// Project: http://cordova.apache.org
|
||||
// Definitions by: Microsoft Open Technologies Inc. <http://msopentech.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
//
|
||||
// Copyright (c) Microsoft Open Technologies, Inc.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
/// <reference path="plugins/BatteryStatus.d.ts"/>
|
||||
/// <reference path="plugins/Camera.d.ts"/>
|
||||
/// <reference path="plugins/Contacts.d.ts"/>
|
||||
/// <reference path="plugins/Device.d.ts"/>
|
||||
/// <reference path="plugins/DeviceMotion.d.ts"/>
|
||||
/// <reference path="plugins/DeviceOrientation.d.ts"/>
|
||||
/// <reference path="plugins/Dialogs.d.ts"/>
|
||||
/// <reference path="plugins/FileSystem.d.ts"/>
|
||||
/// <reference path="plugins/FileTransfer.d.ts"/>
|
||||
/// <reference path="plugins/Globalization.d.ts"/>
|
||||
/// <reference path="plugins/InAppBrowser.d.ts"/>
|
||||
/// <reference path="plugins/Media.d.ts"/>
|
||||
/// <reference path="plugins/MediaCapture.d.ts"/>
|
||||
/// <reference path="plugins/NetworkInformation.d.ts"/>
|
||||
/// <reference path="plugins/Push.d.ts"/>
|
||||
/// <reference path="plugins/Splashscreen.d.ts"/>
|
||||
/// <reference path="plugins/StatusBar.d.ts"/>
|
||||
/// <reference path="plugins/Vibration.d.ts"/>
|
||||
/// <reference path="plugins/WebSQL.d.ts"/>
|
||||
|
||||
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;
|
||||
125
scripts/typings/cordova/plugins/BatteryStatus.d.ts
vendored
Normal file
|
|
@ -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. <http://msopentech.com>
|
||||
// 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;
|
||||
}
|
||||
174
scripts/typings/cordova/plugins/Camera.d.ts
vendored
Normal file
|
|
@ -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. <http://msopentech.com>
|
||||
// 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;
|
||||
}
|
||||
};
|
||||
273
scripts/typings/cordova/plugins/Contacts.d.ts
vendored
Normal file
|
|
@ -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. <http://msopentech.com>
|
||||
// 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
|
||||
};
|
||||
29
scripts/typings/cordova/plugins/Device.d.ts
vendored
Normal file
|
|
@ -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. <http://msopentech.com>
|
||||
// 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;
|
||||
77
scripts/typings/cordova/plugins/DeviceMotion.d.ts
vendored
Normal file
|
|
@ -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. <http://msopentech.com>
|
||||
// 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 { }
|
||||
86
scripts/typings/cordova/plugins/DeviceOrientation.d.ts
vendored
Normal file
|
|
@ -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. <http://msopentech.com>
|
||||
// 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
|
||||
}
|
||||
69
scripts/typings/cordova/plugins/Dialogs.d.ts
vendored
Normal file
|
|
@ -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. <http://msopentech.com>
|
||||
// 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;
|
||||
}
|
||||
364
scripts/typings/cordova/plugins/FileSystem.d.ts
vendored
Normal file
|
|
@ -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. <http://msopentech.com>
|
||||
// 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 <video> or <audio> tag.
|
||||
* If that is not possible, construct a cdvfile:// URL.
|
||||
* @return string URL
|
||||
*/
|
||||
toURL(): string;
|
||||
/**
|
||||
* Return a URL that can be passed across the bridge to identify this entry.
|
||||
* @return string URL that can be passed across the bridge to identify this entry
|
||||
*/
|
||||
toInternalURL(): string;
|
||||
/**
|
||||
* Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. It is an error to attempt to delete the root directory of a filesystem.
|
||||
* @param successCallback A callback that is called on success.
|
||||
* @param errorCallback A callback that is called when errors happen.
|
||||
*/
|
||||
remove(successCallback: () => void,
|
||||
errorCallback?: (error: FileError) => void): void;
|
||||
/**
|
||||
* Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent is itself.
|
||||
* @param successCallback A callback that is called with the time of the last modification.
|
||||
* @param errorCallback A callback that is called when errors happen.
|
||||
*/
|
||||
getParent(successCallback: (entry: Entry) => void,
|
||||
errorCallback?: (error: FileError) => void): void;
|
||||
}
|
||||
|
||||
/** This interface supplies information about the state of a file or directory. */
|
||||
interface Metadata {
|
||||
/** This is the time at which the file or directory was last modified. */
|
||||
modificationTime: Date;
|
||||
/** The size of the file, in bytes. This must return 0 for directories. */
|
||||
size: number;
|
||||
}
|
||||
|
||||
/** This interface represents a directory on a file system. */
|
||||
interface DirectoryEntry extends Entry {
|
||||
/**
|
||||
* Creates a new DirectoryReader to read Entries from this Directory.
|
||||
*/
|
||||
createReader(): DirectoryReader;
|
||||
/**
|
||||
* Creates or looks up a file.
|
||||
* @param path Either an absolute path or a relative path from this DirectoryEntry
|
||||
* to the file to be looked up or created.
|
||||
* It is an error to attempt to create a file whose immediate parent does not yet exist.
|
||||
* @param options If create and exclusive are both true, and the path already exists, getFile must fail.
|
||||
* If create is true, the path doesn't exist, and no other error occurs, getFile must create it as a zero-length file and return a corresponding FileEntry.
|
||||
* If create is not true and the path doesn't exist, getFile must fail.
|
||||
* If create is not true and the path exists, but is a directory, getFile must fail.
|
||||
* Otherwise, if no other error occurs, getFile must return a FileEntry corresponding to path.
|
||||
* @param successCallback A callback that is called to return the File selected or created.
|
||||
* @param errorCallback A callback that is called when errors happen.
|
||||
*/
|
||||
getFile(path: string, options?: Flags,
|
||||
successCallback?: (entry: FileEntry) => void,
|
||||
errorCallback?: (error: FileError) => void): void;
|
||||
/**
|
||||
* Creates or looks up a directory.
|
||||
* @param path Either an absolute path or a relative path from this DirectoryEntry
|
||||
* to the directory to be looked up or created.
|
||||
* It is an error to attempt to create a directory whose immediate parent does not yet exist.
|
||||
* @param options If create and exclusive are both true and the path already exists, getDirectory must fail.
|
||||
* If create is true, the path doesn't exist, and no other error occurs, getDirectory must create and return a corresponding DirectoryEntry.
|
||||
* If create is not true and the path doesn't exist, getDirectory must fail.
|
||||
* If create is not true and the path exists, but is a file, getDirectory must fail.
|
||||
* Otherwise, if no other error occurs, getDirectory must return a DirectoryEntry corresponding to path.
|
||||
* @param successCallback A callback that is called to return the Directory selected or created.
|
||||
* @param errorCallback A callback that is called when errors happen.
|
||||
*/
|
||||
getDirectory(path: string, options?: Flags,
|
||||
successCallback?: (entry: DirectoryEntry) => void,
|
||||
errorCallback?: (error: FileError) => void): void;
|
||||
/**
|
||||
* Deletes a directory and all of its contents, if any. In the event of an error (e.g. trying
|
||||
* to delete a directory that contains a file that cannot be removed), some of the contents
|
||||
* of the directory may be deleted. It is an error to attempt to delete the root directory of a filesystem.
|
||||
* @param successCallback A callback that is called on success.
|
||||
* @param errorCallback A callback that is called when errors happen.
|
||||
*/
|
||||
removeRecursively(successCallback: () => void,
|
||||
errorCallback?: (error: FileError) => void): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* This dictionary is used to supply arguments to methods
|
||||
* that look up or create files or directories.
|
||||
*/
|
||||
interface Flags {
|
||||
/** Used to indicate that the user wants to create a file or directory if it was not previously there. */
|
||||
create?: boolean;
|
||||
/** By itself, exclusive must have no effect. Used with create, it must cause getFile and getDirectory to fail if the target path already exists. */
|
||||
exclusive?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* This interface lets a user list files and directories in a directory. If there are
|
||||
* no additions to or deletions from a directory between the first and last call to
|
||||
* readEntries, and no errors occur, then:
|
||||
* A series of calls to readEntries must return each entry in the directory exactly once.
|
||||
* Once all entries have been returned, the next call to readEntries must produce an empty array.
|
||||
* If not all entries have been returned, the array produced by readEntries must not be empty.
|
||||
* The entries produced by readEntries must not include the directory itself ["."] or its parent [".."].
|
||||
*/
|
||||
interface DirectoryReader {
|
||||
/**
|
||||
* Read the next block of entries from this directory.
|
||||
* @param successCallback Called once per successful call to readEntries to deliver the next
|
||||
* previously-unreported set of Entries in the associated Directory.
|
||||
* If all Entries have already been returned from previous invocations
|
||||
* of readEntries, successCallback must be called with a zero-length array as an argument.
|
||||
* @param errorCallback A callback indicating that there was an error reading from the Directory.
|
||||
*/
|
||||
readEntries(
|
||||
successCallback: (entries: Entry[]) => void,
|
||||
errorCallback?: (error: FileError) => void): void;
|
||||
}
|
||||
|
||||
/** This interface represents a file on a file system. */
|
||||
interface FileEntry extends Entry {
|
||||
/**
|
||||
* Creates a new FileWriter associated with the file that this FileEntry represents.
|
||||
* @param successCallback A callback that is called with the new FileWriter.
|
||||
* @param errorCallback A callback that is called when errors happen.
|
||||
*/
|
||||
createWriter(successCallback: (
|
||||
writer: FileWriter) => void,
|
||||
errorCallback?: (error: FileError) => void): void;
|
||||
/**
|
||||
* Returns a File that represents the current state of the file that this FileEntry represents.
|
||||
* @param successCallback A callback that is called with the File.
|
||||
* @param errorCallback A callback that is called when errors happen.
|
||||
*/
|
||||
file(successCallback: (file: File) => void,
|
||||
errorCallback?: (error: FileError) => void): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* This interface provides methods to monitor the asynchronous writing of blobs
|
||||
* to disk using progress events and event handler attributes.
|
||||
*/
|
||||
interface FileSaver extends EventTarget {
|
||||
/** Terminate file operation */
|
||||
abort(): void;
|
||||
/**
|
||||
* The FileSaver object can be in one of 3 states. The readyState attribute, on getting,
|
||||
* must return the current state, which must be one of the following values:
|
||||
* INIT
|
||||
* WRITING
|
||||
* DONE
|
||||
*/
|
||||
readyState: number;
|
||||
/** Handler for writestart events. */
|
||||
onwritestart: (event: ProgressEvent) => void;
|
||||
/** Handler for progress events. */
|
||||
onprogress: (event: ProgressEvent) => void;
|
||||
/** Handler for write events. */
|
||||
onwrite: (event: ProgressEvent) => void;
|
||||
/** Handler for abort events. */
|
||||
onabort: (event: ProgressEvent) => void;
|
||||
/** Handler for error events. */
|
||||
onerror: (event: ProgressEvent) => void;
|
||||
/** Handler for writeend events. */
|
||||
onwriteend: (event: ProgressEvent) => void;
|
||||
/** The last error that occurred on the FileSaver. */
|
||||
error: Error;
|
||||
}
|
||||
|
||||
/**
|
||||
* This interface expands on the FileSaver interface to allow for multiple write
|
||||
* actions, rather than just saving a single Blob.
|
||||
*/
|
||||
interface FileWriter extends FileSaver {
|
||||
/**
|
||||
* The byte offset at which the next write to the file will occur. This always less or equal than length.
|
||||
* A newly-created FileWriter will have position set to 0.
|
||||
*/
|
||||
position: number;
|
||||
/**
|
||||
* The length of the file. If the user does not have read access to the file,
|
||||
* this will be the highest byte offset at which the user has written.
|
||||
*/
|
||||
length: number;
|
||||
/**
|
||||
* Write the supplied data to the file at position.
|
||||
* @param {Blob} data The blob to write.
|
||||
*/
|
||||
write(data: Blob): void;
|
||||
/**
|
||||
* The file position at which the next write will occur.
|
||||
* @param offset If nonnegative, an absolute byte offset into the file.
|
||||
* If negative, an offset back from the end of the file.
|
||||
*/
|
||||
seek(offset: number): void;
|
||||
/**
|
||||
* Changes the length of the file to that specified. If shortening the file, data beyond the new length
|
||||
* will be discarded. If extending the file, the existing data will be zero-padded up to the new length.
|
||||
* @param size The size to which the length of the file is to be adjusted, measured in bytes.
|
||||
*/
|
||||
truncate(size: number): void;
|
||||
}
|
||||
|
||||
/* FileWriter states */
|
||||
declare var FileWriter: {
|
||||
INIT: number;
|
||||
WRITING: number;
|
||||
DONE: number
|
||||
};
|
||||
|
||||
interface FileError {
|
||||
/** Error code */
|
||||
code: number;
|
||||
}
|
||||
|
||||
declare var FileError: {
|
||||
new (code: number): FileError;
|
||||
NOT_FOUND_ERR: number;
|
||||
SECURITY_ERR: number;
|
||||
ABORT_ERR: number;
|
||||
NOT_READABLE_ERR: number;
|
||||
ENCODING_ERR: number;
|
||||
NO_MODIFICATION_ALLOWED_ERR: number;
|
||||
INVALID_STATE_ERR: number;
|
||||
SYNTAX_ERR: number;
|
||||
INVALID_MODIFICATION_ERR: number;
|
||||
QUOTA_EXCEEDED_ERR: number;
|
||||
TYPE_MISMATCH_ERR: number;
|
||||
PATH_EXISTS_ERR: number;
|
||||
};
|
||||
|
||||
/*
|
||||
* Constants defined in fileSystemPaths
|
||||
*/
|
||||
interface Cordova {
|
||||
file: {
|
||||
/* Read-only directory where the application is installed. */
|
||||
applicationDirectory: string;
|
||||
/* Root of app's private writable storage */
|
||||
applicationStorageDirectory: string;
|
||||
/* Where to put app-specific data files. */
|
||||
dataDirectory: string;
|
||||
/* Cached files that should survive app restarts. Apps should not rely on the OS to delete files in here. */
|
||||
cacheDirectory: string;
|
||||
/* Android: the application space on external storage. */
|
||||
externalApplicationStorageDirectory: string;
|
||||
/* Android: Where to put app-specific data files on external storage. */
|
||||
externalDataDirectory: string;
|
||||
/* Android: the application cache on external storage. */
|
||||
externalCacheDirectory: string;
|
||||
/* Android: the external storage (SD card) root. */
|
||||
externalRootDirectory: string;
|
||||
/* iOS: Temp directory that the OS can clear at will. */
|
||||
tempDirectory: string;
|
||||
/* iOS: Holds app-specific files that should be synced (e.g. to iCloud). */
|
||||
syncedDataDirectory: string;
|
||||
/* iOS: Files private to the app, but that are meaningful to other applciations (e.g. Office files) */
|
||||
documentsDirectory: string;
|
||||
/* BlackBerry10: Files globally available to all apps */
|
||||
sharedDirectory: string
|
||||
}
|
||||
}
|
||||
|
||||
136
scripts/typings/cordova/plugins/FileTransfer.d.ts
vendored
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
// Type definitions for Apache Cordova FileTransfer plugin.
|
||||
// Project: https://github.com/apache/cordova-plugin-file-transfer
|
||||
// Definitions by: Microsoft Open Technologies, Inc. <http://msopentech.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
//
|
||||
// Copyright (c) Microsoft Open Technologies, Inc.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
/// <reference path="FileSystem.d.ts"/>
|
||||
|
||||
/**
|
||||
* The FileTransfer object provides a way to upload files using an HTTP multi-part POST request,
|
||||
* and to download files as well.
|
||||
*/
|
||||
interface FileTransfer {
|
||||
/** Called with a ProgressEvent whenever a new chunk of data is transferred. */
|
||||
onprogress: (event: ProgressEvent) => void;
|
||||
/**
|
||||
* Sends a file to a server.
|
||||
* @param fileURL Filesystem URL representing the file on the device. For backwards compatibility,
|
||||
* this can also be the full path of the file on the device.
|
||||
* @param server URL of the server to receive the file, as encoded by encodeURI().
|
||||
* @param successCallback A callback that is passed a FileUploadResult object.
|
||||
* @param errorCallback A callback that executes if an error occurs retrieving the FileUploadResult.
|
||||
* Invoked with a FileTransferError object.
|
||||
* @param options Optional parameters.
|
||||
* @param trustAllHosts Optional parameter, defaults to false. If set to true, it accepts all security certificates.
|
||||
* This is useful since Android rejects self-signed security certificates.
|
||||
* Not recommended for production use. Supported on Android and iOS.
|
||||
*/
|
||||
upload(
|
||||
fileURL: string,
|
||||
server: string,
|
||||
successCallback: (result: FileUploadResult) => void,
|
||||
errorCallback: (error: FileTransferError) => void,
|
||||
options?: FileUploadOptions,
|
||||
trustAllHosts?: boolean): void;
|
||||
/**
|
||||
* downloads a file from server.
|
||||
* @param source URL of the server to download the file, as encoded by encodeURI().
|
||||
* @param target Filesystem url representing the file on the device. For backwards compatibility,
|
||||
* this can also be the full path of the file on the device.
|
||||
* @param successCallback A callback that is passed a FileEntry object. (Function)
|
||||
* @param errorCallback A callback that executes if an error occurs when retrieving the fileEntry.
|
||||
* Invoked with a FileTransferError object.
|
||||
* @param options Optional parameters.
|
||||
* @param trustAllHosts Optional parameter, defaults to false. If set to true, it accepts all security certificates.
|
||||
* This is useful since Android rejects self-signed security certificates.
|
||||
* Not recommended for production use. Supported on Android and iOS.
|
||||
*/
|
||||
download(
|
||||
source: string,
|
||||
target: string,
|
||||
successCallback: (fileEntry: FileEntry) => void,
|
||||
errorCallback: (error: FileTransferError) => void,
|
||||
options?: FileDownloadOptions,
|
||||
trustAllHosts?: boolean): void;
|
||||
/**
|
||||
* Aborts an in-progress transfer. The onerror callback is passed a FileTransferError object
|
||||
* which has an error code of FileTransferError.ABORT_ERR.
|
||||
*/
|
||||
abort(): void;
|
||||
}
|
||||
|
||||
declare var FileTransfer: {
|
||||
new (): FileTransfer;
|
||||
};
|
||||
|
||||
/** A FileUploadResult object is passed to the success callback of the FileTransfer object's upload() method. */
|
||||
interface FileUploadResult {
|
||||
/** The number of bytes sent to the server as part of the upload. */
|
||||
bytesSent: number;
|
||||
/** The HTTP response code returned by the server. */
|
||||
responseCode: number;
|
||||
/** The HTTP response returned by the server. */
|
||||
response: string;
|
||||
/** The HTTP response headers by the server. Currently supported on iOS only.*/
|
||||
headers: any;
|
||||
}
|
||||
|
||||
/** Optional parameters for upload method. */
|
||||
interface FileUploadOptions {
|
||||
/** The name of the form element. Defaults to file. */
|
||||
fileKey?: string;
|
||||
/** The file name to use when saving the file on the server. Defaults to image.jpg. */
|
||||
fileName?: string;
|
||||
/** The HTTP method to use - either `PUT` or `POST`. Defaults to `POST`. */
|
||||
httpMethod?: string;
|
||||
/** The mime type of the data to upload. Defaults to image/jpeg. */
|
||||
mimeType?: string;
|
||||
/** A set of optional key/value pairs to pass in the HTTP request. */
|
||||
params?: Object;
|
||||
/** Whether to upload the data in chunked streaming mode. Defaults to true. */
|
||||
chunkedMode?: boolean;
|
||||
/** A map of header name/header values. Use an array to specify more than one value. */
|
||||
headers?: Object[];
|
||||
}
|
||||
|
||||
/** Optional parameters for download method. */
|
||||
interface FileDownloadOptions {
|
||||
/** A map of header name/header values. Use an array to specify more than one value. */
|
||||
headers?: Object[];
|
||||
}
|
||||
|
||||
/** A FileTransferError object is passed to an error callback when an error occurs. */
|
||||
interface FileTransferError {
|
||||
/**
|
||||
* One of the predefined error codes listed below.
|
||||
* FileTransferError.FILE_NOT_FOUND_ERR
|
||||
* FileTransferError.INVALID_URL_ERR
|
||||
* FileTransferError.CONNECTION_ERR
|
||||
* FileTransferError.ABORT_ERR
|
||||
* FileTransferError.NOT_MODIFIED_ERR
|
||||
*/
|
||||
code: number;
|
||||
/** URL to the source. */
|
||||
source: string;
|
||||
/** URL to the target. */
|
||||
target: string;
|
||||
/** HTTP status code. This attribute is only available when a response code is received from the HTTP connection. */
|
||||
http_status: number;
|
||||
/* Response body. This attribute is only available when a response is received from the HTTP connection. */
|
||||
body: string;
|
||||
/* Exception that is thrown by native code */
|
||||
exception: any;
|
||||
}
|
||||
|
||||
declare var FileTransferError: {
|
||||
/** Constructor for FileTransferError object */
|
||||
new (code?: number, source?: string, target?: string, status?: number, body?: any, exception?: any): FileTransferError;
|
||||
FILE_NOT_FOUND_ERR: number;
|
||||
INVALID_URL_ERR: number;
|
||||
CONNECTION_ERR: number;
|
||||
ABORT_ERR: number;
|
||||
NOT_MODIFIED_ERR: number;
|
||||
}
|
||||