コード例 #1
0
ファイル: control-reply.php プロジェクト: cheese1/ampache
     # Array (
     #	[scheme] => http
     #	[host] => hostname
     #	[user] => username
     #	[pass] => password
     #	[path] => /path
     #	[query] => arg=value
     #	[fragment] => anchor
     # )
     $reqObjectURL = parse_url($upnpRequest['objectid']);
     switch ($reqObjectURL['scheme']) {
         case 'amp':
             switch ($reqObjectURL['host']) {
                 case 'music':
                     if ($upnpRequest['browseflag'] == 'BrowseMetadata') {
                         $items = Upnp_Api::_musicMetadata($reqObjectURL['path'], $reqObjectURL['query']);
                     } else {
                         list($totMatches, $items) = Upnp_Api::_musicChilds($reqObjectURL['path'], $reqObjectURL['query'], $upnpRequest['startingindex'], $upnpRequest['requestedcount']);
                     }
                     break;
                 case 'video':
                     if ($upnpRequest['browseflag'] == 'BrowseMetadata') {
                         $items = Upnp_Api::_videoMetadata($reqObjectURL['path'], $reqObjectURL['query']);
                     } else {
                         list($totMatches, $items) = Upnp_Api::_videoChilds($reqObjectURL['path'], $reqObjectURL['query'], $upnpRequest['startingindex'], $upnpRequest['requestedcount']);
                     }
                     break;
             }
             break;
     }
 }