[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: I would like to extend the interface of SubWCRevCOM. Would that be okay for you?

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Sun, 03 Feb 2008 08:35:01 +0100

Michael Hegmann wrote:

> As we are mainly writing MS Office papers I have coded a pretty small
> Add-In for Word and Excel to get the TSVN status and the locking
> status of the active document.
> Depending on the status the user can choose whether to commit the
> document keeping the lock or to commit it releasing the lock.
>
> For getting the status of the document I extended the interface of
> SubWCRevCOM by the following functions:
>
> [propget, helpstring("TRUE if the file or folder is under SVN
> version control")]
> HRESULT IsSvnItem([out, retval]VARIANT_BOOL* svn_item);
>
> [propget, helpstring("TRUE if locking is generally required for the
> requested file / folder")]
> HRESULT NeedsLocking([out, retval]VARIANT_BOOL* needs_locking);
>
> [propget, helpstring("TRUE if the file or folder is locked")]
> HRESULT IsLocked([out, retval]VARIANT_BOOL* locked);
>
> [propget, helpstring("Returns the owner of the lock")]
> HRESULT LockOwner([out, retval]BSTR* owner);
>
>
> Question 1:
> Could you please tell me whether these interface extensions are okay
> for you and whether I can commit them?

They seem ok. Just send your patch.

> Question 2:
> In the existing interface of SubWCRevCOM VARIANTs are used instead of
> BSTRs. Could anybody please tell me the reasons for doing so? Should I
> use VARIANTs instead of BSTRs, too?

Yes, please use VARIANTs. The reason is that some scripting languages
can deal much better with VARIANTs than with BSTRs. And since it's not
much work to implement the whole thing with VARIANTs, just do it.

> Question 3:
> If you are okay with the extended interface, should I extend the
> interface of SubWCRev, too?

Yes please. They're both "SubWCRev", just one exposes the COM interface.
So I'd like to keep the features consistent for both.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net

Received on 2008-02-03 08:35:23 CET

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.