ReactOS  0.4.14-dev-49-gfb4591c
loaddlg.cpp File Reference
#include "rapps.h"
#include <shlobj_undoc.h>
#include <shlguid_undoc.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <wininet.h>
#include <shellutils.h>
#include <rosctrls.h>
#include <windowsx.h>
#include "rosui.h"
#include "dialogs.h"
#include "misc.h"
Include dependency graph for loaddlg.cpp:

Go to the source code of this file.

Classes

struct  DownloadInfo
 
struct  DownloadParam
 
class  CDownloaderProgress
 
class  CDowloadingAppsListView
 
class  CDownloadManager
 

Enumerations

enum  DownloadStatus {
  DLSTATUS_WAITING = IDS_STATUS_WAITING, DLSTATUS_DOWNLOADING = IDS_STATUS_DOWNLOADING, DLSTATUS_WAITING_INSTALL = IDS_STATUS_DOWNLOADED, DLSTATUS_INSTALLING = IDS_STATUS_INSTALLING,
  DLSTATUS_INSTALLED = IDS_STATUS_INSTALLED, DLSTATUS_FINISHED = IDS_STATUS_FINISHED
}
 

Functions

ATL::CStringW LoadStatusString (DownloadStatus StatusParam)
 
VOID MessageBox_LoadString (HWND hMainWnd, INT StringID)
 
BOOL DownloadListOfApplications (const ATL::CSimpleArray< CAvailableApplicationInfo > &AppsList, BOOL bIsModal)
 
BOOL DownloadApplication (CAvailableApplicationInfo *pAppInfo, BOOL bIsModal)
 
VOID DownloadApplicationsDB (LPCWSTR lpUrl)
 

Variables

BOOL UrlHasBeenCopied
 

Enumeration Type Documentation

◆ DownloadStatus

Enumerator
DLSTATUS_WAITING 
DLSTATUS_DOWNLOADING 
DLSTATUS_WAITING_INSTALL 
DLSTATUS_INSTALLING 
DLSTATUS_INSTALLED 
DLSTATUS_FINISHED 

Definition at line 55 of file loaddlg.cpp.

Function Documentation

◆ DownloadApplication()

BOOL DownloadApplication ( CAvailableApplicationInfo pAppInfo,
BOOL  bIsModal 
)

Definition at line 885 of file loaddlg.cpp.

886 {
887  if (!pAppInfo)
888  return FALSE;
889 
890  CDownloadManager::Download(*pAppInfo, bIsModal);
891  return TRUE;
892 }
#define TRUE
Definition: types.h:120
static VOID Download(const DownloadInfo &DLInfo, BOOL bIsModal=FALSE)
Definition: loaddlg.cpp:369

Referenced by CMainWindow::OnCommand().

◆ DownloadApplicationsDB()

VOID DownloadApplicationsDB ( LPCWSTR  lpUrl)

Definition at line 894 of file loaddlg.cpp.

895 {
896  static DownloadInfo DatabaseDLInfo;
897  DatabaseDLInfo.szUrl = lpUrl;
898  DatabaseDLInfo.szName.LoadStringW(IDS_DL_DIALOG_DB_DISP);
899  CDownloadManager::Download(DatabaseDLInfo, TRUE);
900 }
#define TRUE
Definition: types.h:120
#define IDS_DL_DIALOG_DB_DISP
Definition: resource.h:206
static VOID Download(const DownloadInfo &DLInfo, BOOL bIsModal=FALSE)
Definition: loaddlg.cpp:369
ATL::CStringW szUrl
Definition: loaddlg.cpp:80
ATL::CStringW szName
Definition: loaddlg.cpp:81

Referenced by CAvailableApps::UpdateAppsDB().

◆ DownloadListOfApplications()

BOOL DownloadListOfApplications ( const ATL::CSimpleArray< CAvailableApplicationInfo > &  AppsList,
BOOL  bIsModal 
)

Definition at line 868 of file loaddlg.cpp.

869 {
870  if (AppsList.GetSize() == 0)
871  return FALSE;
872 
873  // Initialize shared variables
874  for (INT i = 0; i < AppsList.GetSize(); ++i)
875  {
876  CDownloadManager::Add(AppsList[i]); // implicit conversion to DownloadInfo
877  }
878 
879  // Create a dialog and issue a download process
881 
882  return TRUE;
883 }
#define TRUE
Definition: types.h:120
static VOID LaunchDownloadDialog(BOOL)
Definition: loaddlg.cpp:848
int GetSize() const
Definition: atlsimpcoll.h:104
int32_t INT
Definition: typedefs.h:56
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static VOID Add(DownloadInfo info)
Definition: loaddlg.cpp:364

Referenced by CMainWindow::OnCommand(), and UseCmdParameters().

◆ LoadStatusString()

ATL::CStringW LoadStatusString ( DownloadStatus  StatusParam)

Definition at line 65 of file loaddlg.cpp.

66 {
67  ATL::CStringW szString;
68  szString.LoadStringW(StatusParam);
69  return szString;
70 }

Referenced by CDowloadingAppsListView::AddRow(), CDowloadingAppsListView::SetDownloadStatus(), and CDownloadManager::ThreadFunc().

◆ MessageBox_LoadString()

VOID MessageBox_LoadString ( HWND  hMainWnd,
INT  StringID 
)
inline

Definition at line 332 of file loaddlg.cpp.

333 {
334  ATL::CStringW szMsgText;
335  if (szMsgText.LoadStringW(StringID))
336  {
338  }
339 }
smooth NULL
Definition: ftsmooth.c:416
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
PCXSTR GetString() const
Definition: atlsimpstr.h:361
HWND hMainWnd
Definition: magnifier.c:32
#define MB_ICONERROR
Definition: winuser.h:781
#define MB_OK
Definition: winuser.h:784

Referenced by CDownloadManager::ThreadFunc().

Variable Documentation

◆ UrlHasBeenCopied

BOOL UrlHasBeenCopied

Definition at line 460 of file loaddlg.cpp.

Referenced by CDownloadManager::ThreadFunc(), and CDownloadManager::UpdateProgress().