Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim Dropbox As DropboxV2
Dim token As String
Dim client As DbxClientV2
Dim config As DbxRequestConfig
Dim dbxFiles As DbxUserFilesRequests
Dim dbxSharing As DbxUserSharingRequests
Dim dbxUsers As DbxUserUsersRequests
Dim clientId As String = "yourClientID"
Dim token As String = "yourAccessToken"
Private Button1 As Button
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
config.Initialize("",token,clientId,"de-de",5)
Dim dbxhost As DbxHost
dbxhost.Initialize
client.Initialize("Dropbox",config,token,dbxhost)
dbxFiles = client.files
dbxFiles.setEventname("dbxFiles")
dbxSharing = client.sharing
dbxSharing.setEventname("dbxSharing")
dbxUsers = client.users
dbxUsers.setEventname("dbxUsers")
Dropbox.Initialize("")
dbxFiles.listFolder("/",False,True,False,False,True)
End Sub
Sub dbxFiles_UploadProgress(sessionId As String, path As String, filename As String, uploaded As Long, size As Long)
Log($"${filename} -> ${NumberFormat(uploaded / 1024, 0, 0)} KB /${NumberFormat(size / 1024, 0, 0)} kb -> ${NumberFormat(100 * (uploaded / size), 0, 2) } - Session ${sessionId}"$)
End Sub
Sub dbxFiles_UploadFinished(success As Boolean, metaObj As Object, sessionId As String)
Dim meta As FileMetadata = metaObj
Log($"dbxFiles_UploadFinished(${success} Session ${sessionId} -> ${meta})"$)
End Sub
Sub dbxSharing_listFolders(success As Boolean, folders As List, error As String)
Log($"dbxSharing_listFolders(${success}, ${folders.Size}, ${error})"$)
If folders.Size > 0 Then
For i = 0 To folders.Size-1
Dim meta As SharedFolderMetadata = folders.Get(i)
Log(meta.PathLower&" -> "& meta.Name)
Next
End If
End Sub
Sub dbxSharing_AddFileMember(success As Boolean, members As List, error As String)
Log($"dbxSharing_listFolders(${success}, ${members.Size}, ${error})"$)
End Sub
Sub dbxSharing_listMountableFolders(success As Boolean, folders As List, error As String)
Log($"dbxSharing_listFolders(${success}, ${folders.Size}, ${error})"$)
End Sub
Sub dbxSharing_listReceivedFiles(success As Boolean, receivedFiles As List, error As String)
Log($"dbxSharing_listFolders(${success}, ${receivedFiles.Size}, ${error})"$)
End Sub
Sub dbxSharing_listSharedLinks(success As Boolean, sharedLinks As List, error As String)
Log($"dbxSharing_listFolders(${success}, ${sharedLinks.Size}, ${error})"$)
End Sub
Sub dbxSharing_SharedFolderMetadata(success As Boolean, meta As SharedFolderMetadata, error As String)
Log($"dbxSharing_listFolders(${success}, ${meta.toString}, ${error})"$)
End Sub
Sub dbxFiles_DownloadFinished(success As Boolean, meta As FileMetadata, sessionId As String)
Log($"dbxFiles_DownloadFinished(${success}, ${meta}, ${sessionId})"$)
End Sub
Sub dbxFiles_listFolder(success As Boolean, content As List, error As String)
Log($"dbxFiles_listFolders(${success}, ${content.Size}, ${error})"$)
If content.Size > 0 Then
For i = 0 To content.Size-1
Dim meta As Metadata = content.Get(i)
Log(meta.toString)
Next
End If
End Sub
Sub dbxFiles_CopyBatch(success As Boolean, meta As Map, error As String)
End Sub
Sub dbxFiles_CopyBatchCheck(success As Boolean, meta As Map, error As String)
End Sub
Sub dbxFiles_CopyReference(metainfo As Map)
End Sub
Sub dbxFiles_CreateFolder(success As Boolean, meta As FolderMetadata, error As String)
End Sub
Sub dbxFiles_ListRevisions(success As Boolean, meta As Map, error As String)
End Sub
Sub dbxFiles_MoveBatch(success As Boolean, meta As Map, error As String)
End Sub
Sub dbxFiles_MoveBatchCheck(success As Boolean, meta As Map, error As String)
End Sub
Sub dbxFiles_Restore(success As Boolean, meta As FileMetadata, error As String)
End Sub
Sub dbxUsers_getAccount(account As BasicAccount)
Log($"dbxUsers_getAccount(${account})"$)
End Sub
Sub dbxUsers_getAccountBatch(batch As List)
End Sub
Sub dbxUsers_getCurrentAccount(account As FullAccount)
Log($"dbxUsers_getCurrentAccount(${account})"$)
End Sub