VirtualBox

Changeset 37632 in vbox


Ignore:
Timestamp:
Jun 24, 2011 1:38:09 PM (14 years ago)
Author:
vboxsync
Message:

Main/GuestCtrl: Not implemented yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp

    r37589 r37632  
    28742874                                  ULONG aFlags, IProgress **aProgress)
    28752875{
     2876    ReturnComNotImplemented();
     2877}
     2878
     2879STDMETHODIMP Guest::CopyToGuest(IN_BSTR aSource, IN_BSTR aDest,
     2880                                IN_BSTR aUserName, IN_BSTR aPassword,
     2881                                ULONG aFlags, IProgress **aProgress)
     2882{
    28762883#ifndef VBOX_WITH_GUEST_CONTROL
    28772884    ReturnComNotImplemented();
     
    29082915
    29092916        rc = progress->init(static_cast<IGuest*>(this),
    2910                             Bstr(tr("Copying file from guest to host")).raw(),
    2911                             TRUE /* aCancelable */);
    2912         if (FAILED(rc)) throw rc;
    2913 
    2914         /* Initialize our worker task. */
    2915         TaskGuest *pTask = new TaskGuest(TaskGuest::CopyFileFromGuest, this, progress);
    2916         AssertPtr(pTask);
    2917         std::auto_ptr<TaskGuest> task(pTask);
    2918 
    2919         /* Assign data - aSource is the source file on the guest,
    2920          * aDest reflects the full path on the host. */
    2921         task->strSource   = (Utf8Str(aSource));
    2922         task->strDest     = (Utf8Str(aDest));
    2923         task->strUserName = (Utf8Str(aUserName));
    2924         task->strPassword = (Utf8Str(aPassword));
    2925         task->uFlags      = aFlags;
    2926 
    2927         rc = task->startThread();
    2928         if (FAILED(rc)) throw rc;
    2929 
    2930         /* Don't destruct on success. */
    2931         task.release();
    2932     }
    2933     catch (HRESULT aRC)
    2934     {
    2935         rc = aRC;
    2936     }
    2937 
    2938     if (SUCCEEDED(rc))
    2939     {
    2940         /* Return progress to the caller. */
    2941         progress.queryInterfaceTo(aProgress);
    2942     }
    2943     return rc;
    2944 #endif /* VBOX_WITH_GUEST_CONTROL */
    2945 }
    2946 
    2947 STDMETHODIMP Guest::CopyToGuest(IN_BSTR aSource, IN_BSTR aDest,
    2948                                 IN_BSTR aUserName, IN_BSTR aPassword,
    2949                                 ULONG aFlags, IProgress **aProgress)
    2950 {
    2951 #ifndef VBOX_WITH_GUEST_CONTROL
    2952     ReturnComNotImplemented();
    2953 #else /* VBOX_WITH_GUEST_CONTROL */
    2954     CheckComArgStrNotEmptyOrNull(aSource);
    2955     CheckComArgStrNotEmptyOrNull(aDest);
    2956     CheckComArgStrNotEmptyOrNull(aUserName);
    2957     CheckComArgStrNotEmptyOrNull(aPassword);
    2958     CheckComArgOutPointerValid(aProgress);
    2959 
    2960     AutoCaller autoCaller(this);
    2961     if (FAILED(autoCaller.rc())) return autoCaller.rc();
    2962 
    2963     /* Validate flags. */
    2964     if (aFlags != CopyFileFlag_None)
    2965     {
    2966         if (   !(aFlags & CopyFileFlag_Recursive)
    2967             && !(aFlags & CopyFileFlag_Update)
    2968             && !(aFlags & CopyFileFlag_FollowLinks))
    2969         {
    2970             return setError(E_INVALIDARG, tr("Unknown flags (%#x)"), aFlags);
    2971         }
    2972     }
    2973 
    2974     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    2975 
    2976     HRESULT rc = S_OK;
    2977 
    2978     ComObjPtr<Progress> progress;
    2979     try
    2980     {
    2981         /* Create the progress object. */
    2982         progress.createObject();
    2983 
    2984         rc = progress->init(static_cast<IGuest*>(this),
    29852917                            Bstr(tr("Copying file from host to guest")).raw(),
    29862918                            TRUE /* aCancelable */);
     
    30222954STDMETHODIMP Guest::DirectoryClose(ULONG aHandle)
    30232955{
    3024 #ifndef VBOX_WITH_GUEST_CONTROL
    30252956    ReturnComNotImplemented();
    3026 #else /* VBOX_WITH_GUEST_CONTROL */
    3027     using namespace guestControl;
    3028 
    3029     return VBOX_E_NOT_SUPPORTED;
    3030 #endif
    30312957}
    30322958
     
    31653091                                  ULONG *aHandle)
    31663092{
    3167 #ifndef VBOX_WITH_GUEST_CONTROL
    31683093    ReturnComNotImplemented();
    3169 #else /* VBOX_WITH_GUEST_CONTROL */
    3170     using namespace guestControl;
    3171 
    3172     return VBOX_E_NOT_SUPPORTED;
    3173 #endif
    31743094}
    31753095
    31763096STDMETHODIMP Guest::DirectoryRead(ULONG aHandle, IGuestDirEntry **aDirEntry)
    31773097{
    3178 #ifndef VBOX_WITH_GUEST_CONTROL
    31793098    ReturnComNotImplemented();
    3180 #else /* VBOX_WITH_GUEST_CONTROL */
    3181     using namespace guestControl;
    3182 
    3183     return VBOX_E_NOT_SUPPORTED;
    3184 #endif
    31853099}
    31863100
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette