> On Fri, 2008-09-26 at 13:29 -0400, Joly, Robert (CAR:9D30) wrote: > > > On Fri, 2008-09-26 at 09:52 -0400, Joly, Robert (CAR:9D30) wrote: > > > > I agree the return codes should be improved upon. Let me > > > take another > > > > crack at it. The descriptions I provide below explain > what each > > > > return code means from the point-of-view of the redirector > > > plugin (i.e. > > > > represents what would be found in the interface > comments). As a > > > > result, it does not discuss the whole business of > 'authority level' > > > > since this is a concern for the RedirtectServer and not the > > > plug-ins themselves. > > > > > > > > SUCCESS_LOOKUP_DONE = the request was of interest to the > > > > redirector and it asserts that the content of the > returned Contact > > > list meets its > > > > requirements. > > > > > > > > LOOKUP_SUCCESS_SKIPPED = the request was of no interest to the > > > > redirector and as a result did not modify in any way > the content > > > > of the returned Contact list. > > > > > > > > LOOKUP_ERROR = the redirector reported an error. The passed > > > > ErrorDescriptor may be used to customize how that error will be > > > > communicated back to the originator via a SIP response > > > > > > > > LOOKUP_SUSPEND = the redirector needs the request to be > > > suspended for > > > > asynchronous processing. > > > > > > I like your descriptions, but the names need a bit of > work so that > > > they reflect what the result is... what do you think of (for the > > > same 4 as above, in order): > > > > > > LOOKUP_FOUND_CONTACTS > > > LOOKUP_NO_CONTACTS > > > > There is a subtlety here that is lost with the 'NO_CONTACTS' > > terminology but I'm not convinced that the subtlety is > important in the first place. > > Let me state what it is and you can decide. In the description of > > SUCCESS_LOOKUP_DONE, I purposely avoided mentioning that the > > redirector 'edits' the contact list. The return code is not saying > > that it has provided any additional contacts, it is just > saying that > > it is satisfied with the Contact list. This effectively allows the > > plug-in to bring a contact list to its authority level even > if itself > > didn't contribute (or > > found) new contacts as part of the look-up. The redirector > authplugin > > is one such example where it does not find any contacts - it simply > > modifies them as needed. Having that plug-in return a > > "LOOKUP_FOUND_CONTACTS" may be counter-intuitive. It is > possible to > > imagine an even more dramatic theoretical example whereby a plug-in > > does not even edit any existing contacts but just wants to > 'bless' the > > current list with its authority level. In this case using > > "LOOKUP_FOUND_CONTACTS" would be very confusing. > > It's worth it to get the right names: > > how about: > > LOOKUP_ERROR > LOOKUP_SEARCH_PENDING > LOOKUP_CONTACTS_UNCHANGED > LOOKUP_CONTACTS_MODIFIED
That works for me. > (and while we're talking nits here, I think we could do > without the LOOKUP_ prefix and use the class that defines > them to qualify the names, but I know I'm getting out on the > fringes of what ex-C-programmers are comfortable with here) I agree. _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
