summaryrefslogtreecommitdiff
path: root/XMPCommon/source/IErrorNotifier_I.cpp
blob: 601771d77ead933b039785eaaff0f2940c802b10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
// Copyright 2015 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it.
// =================================================================================================

#include "XMPCommon/Interfaces/IErrorNotifier_I.h"
#include "XMPCommon/ImplHeaders/DefaultErrorNotifierImpl.h"


namespace XMP_COMPONENT_INT_NAMESPACE {

	static DefaultErrorNotifierImpl sDefaultErrorNotifier;
	static pIErrorNotifier sErrorNotifier( &sDefaultErrorNotifier );

	pIErrorNotifier IErrorNotifier_I::GetErrorNotifier() {
		return sErrorNotifier;
	}

	pIErrorNotifier IErrorNotifier_I::SetErrorNotifier( pIErrorNotifier ErrorNotifier ) {
		pIErrorNotifier old = sErrorNotifier;
		if ( ErrorNotifier ) sErrorNotifier = ErrorNotifier;
		else sErrorNotifier = &sDefaultErrorNotifier;
		return old;
	}

}