1287f7492Sbeveloper /*********************************************************************** 2287f7492Sbeveloper * Copyright (c) 2002 Marcus Overhagen. All Rights Reserved. 3287f7492Sbeveloper * This file may be used under the terms of the OpenBeOS License. 4287f7492Sbeveloper * 5287f7492Sbeveloper * The object returned by BMediaRoster's 6287f7492Sbeveloper * BTimeSource * MakeTimeSourceFor(const media_node & for_node); 7287f7492Sbeveloper * 8287f7492Sbeveloper ***********************************************************************/ 9287f7492Sbeveloper #ifndef _TIME_SOURCE_OBJECT_H_ 10287f7492Sbeveloper #define _TIME_SOURCE_OBJECT_H_ 11287f7492Sbeveloper 12287f7492Sbeveloper #include <TimeSource.h> 13287f7492Sbeveloper 14*d6379053Sbeveloper #define NODE_KIND_USER_MASK 0x00000000FFFFFFFFLL 15*d6379053Sbeveloper #define NODE_KIND_SHADOW_TIMESOURCE 0x0000000100000000LL 16*d6379053Sbeveloper #define NODE_KIND_SYSTEM_TIMESOURCE 0x0000000200000000LL 17*d6379053Sbeveloper 18287f7492Sbeveloper namespace BPrivate { namespace media { 19287f7492Sbeveloper 20287f7492Sbeveloper class TimeSourceObject : public BTimeSource 21287f7492Sbeveloper { 22287f7492Sbeveloper public: 23*d6379053Sbeveloper TimeSourceObject(const media_node &node); 24287f7492Sbeveloper 25287f7492Sbeveloper protected: 26287f7492Sbeveloper virtual status_t TimeSourceOp( 27287f7492Sbeveloper const time_source_op_info & op, 28287f7492Sbeveloper void * _reserved); 29287f7492Sbeveloper 30287f7492Sbeveloper virtual BMediaAddOn* AddOn( 31287f7492Sbeveloper int32 * internal_id) const; 32287f7492Sbeveloper 33835140c8Sbeveloper // override from BMediaNode 34835140c8Sbeveloper virtual status_t DeleteHook(BMediaNode * node); 35835140c8Sbeveloper }; 36835140c8Sbeveloper 37835140c8Sbeveloper class SystemTimeSourceObject : public TimeSourceObject 38835140c8Sbeveloper { 39835140c8Sbeveloper public: 40*d6379053Sbeveloper SystemTimeSourceObject(const media_node &node); 41835140c8Sbeveloper 42835140c8Sbeveloper protected: 43835140c8Sbeveloper // override from BMediaNode 44835140c8Sbeveloper virtual status_t DeleteHook(BMediaNode * node); 45835140c8Sbeveloper 46287f7492Sbeveloper }; 47287f7492Sbeveloper 48287f7492Sbeveloper } } using namespace BPrivate::media; 49287f7492Sbeveloper 50287f7492Sbeveloper #endif 51