- Notifications
You must be signed in to change notification settings - Fork 961
/
Copy pathheader2.h
25 lines (25 loc) · 793 Bytes
/
header2.h
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
namespaceInterfaceDemo
{
public ref classMyMediaPlayer sealed : public IMediaPlayer
{
public:
//IMediaPlayer
virtual event OnStateChanged^ StateChanged;
virtual property Platform::String^ CurrentTitle;
virtual property PlayState CurrentState;
virtualvoidPlay()
{
// …
auto args = ref newMediaPlayerEventArgs();
args->newState = PlayState::Playing;
args->oldState = PlayState::Stopped;
StateChanged(this, args);
}
virtualvoidPause(){/*...*/}
virtualvoidStop(){/*...*/}
virtualvoidForward(float speed){/*...*/}
virtualvoidBack(float speed){/*...*/}
private:
//...
};
}