aboutsummaryrefslogtreecommitdiff
path: root/src/engine/externalengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/externalengine.cpp')
-rw-r--r--src/engine/externalengine.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/engine/externalengine.cpp b/src/engine/externalengine.cpp
index d881544c..fffd96bf 100644
--- a/src/engine/externalengine.cpp
+++ b/src/engine/externalengine.cpp
@@ -733,6 +733,38 @@ LExit:
733 return hr; 733 return hr;
734} 734}
735 735
736HRESULT ExternalEngineSetUpdateSource(
737 __in BURN_ENGINE_STATE* pEngineState,
738 __in_z LPCWSTR wzUrl
739 )
740{
741 HRESULT hr = S_OK;
742 BOOL fLeaveCriticalSection = FALSE;
743
744 ::EnterCriticalSection(&pEngineState->userExperience.csEngineActive);
745 fLeaveCriticalSection = TRUE;
746 hr = UserExperienceEnsureEngineInactive(&pEngineState->userExperience);
747 ExitOnFailure(hr, "Engine is active, cannot change engine state.");
748
749 if (wzUrl && *wzUrl)
750 {
751 hr = StrAllocString(&pEngineState->update.sczUpdateSource, wzUrl, 0);
752 ExitOnFailure(hr, "Failed to set feed download URL.");
753 }
754 else // no URL provided means clear out the whole download source.
755 {
756 ReleaseNullStr(pEngineState->update.sczUpdateSource);
757 }
758
759LExit:
760 if (fLeaveCriticalSection)
761 {
762 ::LeaveCriticalSection(&pEngineState->userExperience.csEngineActive);
763 }
764
765 return hr;
766}
767
736// TODO: callers need to provide the original size (at the time of first public release) of the struct instead of the current size. 768// TODO: callers need to provide the original size (at the time of first public release) of the struct instead of the current size.
737HRESULT WINAPI ExternalEngineValidateMessageParameter( 769HRESULT WINAPI ExternalEngineValidateMessageParameter(
738 __in_opt const LPVOID pv, 770 __in_opt const LPVOID pv,