fixed some warnings
code style of MMediaFilesManager.* git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20703 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -11,6 +11,7 @@ namespace BPrivate { namespace media {
|
|||||||
|
|
||||||
class ChunkProvider {
|
class ChunkProvider {
|
||||||
public:
|
public:
|
||||||
|
virtual ~ChunkProvider() {};
|
||||||
virtual status_t GetNextChunk(const void **chunkBuffer, size_t *chunkSize,
|
virtual status_t GetNextChunk(const void **chunkBuffer, size_t *chunkSize,
|
||||||
media_header *mediaHeader) = 0;
|
media_header *mediaHeader) = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ PluginManager::~PluginManager()
|
|||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
while (!fPluginList->IsEmpty()) {
|
while (!fPluginList->IsEmpty()) {
|
||||||
plugin_info *info;
|
plugin_info *info = NULL;
|
||||||
fPluginList->Get(fPluginList->CountItems() - 1, &info);
|
fPluginList->Get(fPluginList->CountItems() - 1, &info);
|
||||||
printf("PluginManager: Error, unloading PlugIn %s with usecount %d\n", info->name, info->usecount);
|
printf("PluginManager: Error, unloading PlugIn %s with usecount %d\n", info->name, info->usecount);
|
||||||
delete info->plugin;
|
delete info->plugin;
|
||||||
|
|||||||
@@ -159,9 +159,9 @@ MMediaFilesManager::SaveState()
|
|||||||
if (file.Write(&category_count, sizeof(uint32)) < (int32)sizeof(uint32))
|
if (file.Write(&category_count, sizeof(uint32)) < (int32)sizeof(uint32))
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
BString *type;
|
BString *type = NULL;
|
||||||
Map<BString, entry_ref> *map;
|
Map<BString, entry_ref> *map;
|
||||||
BString *item;
|
BString *item = NULL;
|
||||||
entry_ref *ref;
|
entry_ref *ref;
|
||||||
for (fRegistryMap->Rewind(); fRegistryMap->GetNext(&map);) {
|
for (fRegistryMap->Rewind(); fRegistryMap->GetNext(&map);) {
|
||||||
fRegistryMap->GetCurrentKey(&type);
|
fRegistryMap->GetCurrentKey(&type);
|
||||||
@@ -194,9 +194,9 @@ MMediaFilesManager::Dump()
|
|||||||
/* for each type, the registry map contains a map of item/entry_ref
|
/* for each type, the registry map contains a map of item/entry_ref
|
||||||
*/
|
*/
|
||||||
printf("MMediaFilesManager: registry map follows\n");
|
printf("MMediaFilesManager: registry map follows\n");
|
||||||
BString *type;
|
BString *type = NULL;
|
||||||
Map<BString, entry_ref> *map;
|
Map<BString, entry_ref> *map;
|
||||||
BString *item;
|
BString *item = NULL;
|
||||||
entry_ref *ref;
|
entry_ref *ref;
|
||||||
for (fRegistryMap->Rewind(); fRegistryMap->GetNext(&map);) {
|
for (fRegistryMap->Rewind(); fRegistryMap->GetNext(&map);) {
|
||||||
fRegistryMap->GetCurrentKey(&type);
|
fRegistryMap->GetCurrentKey(&type);
|
||||||
@@ -222,7 +222,7 @@ MMediaFilesManager::RewindTypes(BString ***types, int32 *count)
|
|||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
Map<BString, entry_ref> *map;
|
Map<BString, entry_ref> *map;
|
||||||
BString *type;
|
BString *type = NULL;
|
||||||
|
|
||||||
*count = fRegistryMap->CountItems();
|
*count = fRegistryMap->CountItems();
|
||||||
*types = new BString*[*count];
|
*types = new BString*[*count];
|
||||||
@@ -244,9 +244,9 @@ MMediaFilesManager::RewindRefs(const char* type, BString ***items, int32 *count)
|
|||||||
if (type == NULL || items == NULL || count == NULL)
|
if (type == NULL || items == NULL || count == NULL)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
Map<BString, entry_ref> *map;
|
Map<BString, entry_ref> *map = NULL;
|
||||||
entry_ref *ref;
|
entry_ref *ref;
|
||||||
BString *item;
|
BString *item = NULL;
|
||||||
|
|
||||||
*count = 0;
|
*count = 0;
|
||||||
*items = NULL;
|
*items = NULL;
|
||||||
@@ -273,7 +273,7 @@ MMediaFilesManager::GetRefFor(const char *type,
|
|||||||
entry_ref **out_ref)
|
entry_ref **out_ref)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
Map <BString, entry_ref> *map;
|
Map <BString, entry_ref> *map = NULL;
|
||||||
if (!fRegistryMap->Get(BString(type), &map))
|
if (!fRegistryMap->Get(BString(type), &map))
|
||||||
return B_ENTRY_NOT_FOUND;
|
return B_ENTRY_NOT_FOUND;
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ MMediaFilesManager::LaunchTimer()
|
|||||||
{
|
{
|
||||||
if (!fRunner)
|
if (!fRunner)
|
||||||
fRunner = new BMessageRunner(be_app,
|
fRunner = new BMessageRunner(be_app,
|
||||||
new BMessage(MMEDIAFILESMANAGER_SAVE_TIMER), 3 * 1000000, 1);
|
new BMessage(MMEDIAFILESMANAGER_SAVE_TIMER), 3 * 1000000LL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,12 +40,12 @@ public:
|
|||||||
const char * item,
|
const char * item,
|
||||||
const entry_ref & ref,
|
const entry_ref & ref,
|
||||||
bool save = true);
|
bool save = true);
|
||||||
status_t RemoveRefFor( // This might better be called "ClearRefFor"
|
status_t RemoveRefFor(
|
||||||
const char * type, // but it's too late now...
|
const char * type,
|
||||||
const char * item,
|
const char * item,
|
||||||
const entry_ref & ref);
|
const entry_ref & ref);
|
||||||
|
|
||||||
status_t RemoveItem( // new in 4.1, removes the whole item.
|
status_t RemoveItem(
|
||||||
const char * type,
|
const char * type,
|
||||||
const char * item);
|
const char * item);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user