Mathias Weber wrote:
> Dirk Meyer wrote:
>> 
>> OK. But do not include it into plugin.py and make an keep it an extra
>> file.
>
> ok you are right.
>
>> ... The
>> functions isApplication and isPlugin are not really needed, you could
>> ask isinstance.
>
> I think isinstance is fine. So I will drop the resource_type.
>
>> Another idea: create the RessourceUser class. Application inherits
>> From this class, Plugin does not. IF you have a plugin that uses
>> ressource you inherit from both Plugin and RessourceUser.
>
> Yes that is better i think.
>
>> 
>> in application/base.py:
>> 
>> class Application(RessourceUser):
>>     def resource_type(self):
>>         return 'application'
>
> I will leave this since we could use isinstance.

OK. BTW, stupid question: why do you want to know if it is a plugin or
not. In a perfect world you just call 'pause' and 'resume' and you
don't care if it is a plugin or not. This would require a small update
on the pause() function of an application. Possible return values of a
pause function would be

True:  plugin/app is paused now, ressources are free
False: unable to pause, ressources still blocked
InProgress object: takes some time


Dischi

-- 
Earn cash in your spare time - blackmail friends.

Attachment: pgpCzMB884TRb.pgp
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to