You can identify the various pieces of the sample code by keeping the following conventions in mind.
RMAPI functions begin with scha_.
DSDL functions begin with scds_.
Callback methods begin with xfnts_.
User-written functions begin with svc_.