sbBaseDeviceRequestDupeCheck Class Reference

Public Types


Static Public Member Functions

static bool CompareItems (sbIMediaItem *aLeft, sbIMediaItem *aRight)
static bool CompareRequestItems (sbBaseDevice::TransferRequest *aRequest1, sbBaseDevice::TransferRequest *aRequest2)
static bool DupeCheck (sbBaseDevice::TransferRequest *aQueueRequest, sbBaseDevice::TransferRequest *aNewRequest, bool &aIsDupe)

Detailed Description

Static helper class for convenience

Definition at line 83 of file sbDeviceRequestThreadQueue.cpp.

Member Typedef Documentation

Member Function Documentation

static bool sbBaseDeviceRequestDupeCheck::CompareItems ( sbIMediaItem aLeft,
sbIMediaItem aRight 

This compares two items, handling null values, returning true if they are equal

Definition at line 92 of file sbDeviceRequestThreadQueue.cpp.

Here is the caller graph for this function:

static bool sbBaseDeviceRequestDupeCheck::CompareRequestItems ( sbBaseDevice::TransferRequest aRequest1,
sbBaseDevice::TransferRequest aRequest2 

This compares both the list and item of aRequest and mRequest

aRequestthe other request to be compared
True if the two requests refer to the same item and list

Definition at line 106 of file sbDeviceRequestThreadQueue.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool sbBaseDeviceRequestDupeCheck::DupeCheck ( sbBaseDevice::TransferRequest aQueueRequest,
sbBaseDevice::TransferRequest aNewRequest,
bool &  aIsDupe 

This is the primary function that does the work. It compares the two requests and if they are a dupe returns true in aIsDupe. The return value is whether the caller should continue through the queue or not.

aQueueRequestthe request that is on the queue
aNewRequestThe request that is about to be added to the queue
aIsDupeout parameter denoting whether the new request is a dupe of the request on the queue
Returns false if the caller should stop and not continue with the rest of the items on the queue. For instance if we see new playlist request and we have a delete request we're adding for that same playlist, then it's not a dupe, but there's no need to look further.

Definition at line 135 of file sbDeviceRequestThreadQueue.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following file: