I am new to C++/oops concept (have basic understanding of classes
though) and am having a hard time following the huge Android codebase
- currently looking into middleware code. I am kind of confused by
this notation used in the Android media framework - can any one please
tell what does a notation such as sp<MediaPlayerBase> means here? Also
what is using android::sp means here? I cant see where exactly sp
defined in the android code.

This is in frameworks\base\media\libmedia\MediaPlayerService.cpp but
similar notation is used at several other places as well.

status_t MediaPlayerService::Client::setDataSource(
       const char *url, const KeyedVector<String8, String8> *headers)
----------- some code ....
---------- some code .....
sp<MediaPlayerBase> p = createPlayer(playerType);

Where createPlayer is defined as

sp<MediaPlayerBase>
MediaPlayerService::Client::createPlayer(player_type playerType)
{
// function code ....
}

also sp is defined as
using android::sp

Is this related to Templates in C++ ?

Thanks.
p.s. Sorry for cross-posting with comp.lang.c++ - it may be more of
just a c++ question than related to android.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to