ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/UUlib.pm
(Generate patch)

Comparing Convert-UUlib/UUlib.pm (file contents):
Revision 1.5 by root, Sun Mar 31 20:19:09 2002 UTC vs.
Revision 1.6 by root, Sun Mar 31 21:42:35 2002 UTC

29 B64ENCODED BH_ENCODED PT_ENCODED QP_ENCODED 29 B64ENCODED BH_ENCODED PT_ENCODED QP_ENCODED
30 XX_ENCODED UU_ENCODED YENC_ENCODED 30 XX_ENCODED UU_ENCODED YENC_ENCODED
31); 31);
32 32
33@_funcs = qw( 33@_funcs = qw(
34 Initialize CleanUp GetOption SetOption strerror 34 Initialize CleanUp GetOption SetOption strerror SetMsgCallback
35 SetMsgCallback SetBusyCallback SetFileCallback 35 SetBusyCallback SetFileCallback SetFNameFilter SetFileNameCallback
36 SetFNameFilter FNameFilter LoadFile GetFileListItem 36 FNameFilter LoadFile GetFileListItem RenameFile DecodeToTemp
37 RenameFile DecodeToTemp RemoveTemp DecodeFile 37 RemoveTemp DecodeFile InfoFile Smerge QuickDecode EncodeMulti
38 InfoFile Smerge QuickDecode EncodeMulti EncodePartial 38 EncodePartial EncodeToStream EncodeToFile E_PrepSingle
39 EncodeToStream EncodeToFile E_PrepSingle E_PrepPartial 39 E_PrepPartial
40 40
41 straction strencoding strmsglevel 41 straction strencoding strmsglevel
42); 42);
43 43
44@EXPORT = @_consts; 44@EXPORT = @_consts;
226 RET_CANCEL RET_CONT RET_EXISTS RET_ILLVAL RET_IOERR 226 RET_CANCEL RET_CONT RET_EXISTS RET_ILLVAL RET_IOERR
227 RET_NODATA RET_NOEND RET_NOMEM RET_OK RET_UNSUP 227 RET_NODATA RET_NOEND RET_NOMEM RET_OK RET_UNSUP
228 228
229Encoding types: 229Encoding types:
230 230
231 B64ENCODED BH_ENCODED PT_ENCODED 231 B64ENCODED BH_ENCODED PT_ENCODED QP_ENCODED XX_ENCODED
232 QP_ENCODED XX_ENCODED UU_ENCODED 232 UU_ENCODED YENC_ENCODED
233 233
234=head1 Exported functions 234=head1 Exported functions
235 235
236Initializing and cleanup (Initialize is automatically called when the 236Initializing and cleanup (Initialize is automatically called when the
237module is loaded and allocates quite a bit of memory. CleanUp releases 237module is loaded and allocates quite a bit of memory. CleanUp releases
299 int EncodeToStream () ; 299 int EncodeToStream () ;
300 int EncodeToFile () ; 300 int EncodeToFile () ;
301 int E_PrepSingle () ; 301 int E_PrepSingle () ;
302 int E_PrepPartial () ; 302 int E_PrepPartial () ;
303 303
304=head2 EXTENSION FUNCTIONS
305
306Functions found in this module but not documented in the uulib documentation:
307
308=over 4
309
310=item SetFileNameCallback $cb
311
312Sets (or queries) the FileNameCallback, which is called whenever the
313decoding library can't find a filename and wants to extract a filename
314from the subject line of a posting. The callback will be called with
315two arguments, the subject line and the current candidate for the
316filename. The latter argument can be C<undef>, which means that no
317filename could be found (and likely no one exists, so it is safe to also
318return C<undef> in this case). If it doesn't return anything (not even
319C<undef>!), then nothing happens, so this is a no-op callback:
320
321 sub cb {
322 return ();
323 }
324
325If it returns C<undef>, then this indicates that no filename could be
326found. In all other cases, the return value is taken to be the filename.
327
328This is a slightly more useful callback:
329
330 sub cb {
331 return unless $_[1]; # skip "Re:"-plies et al.
332 my ($subject, $filename) = @_;
333 # if we find some *.rar, take it
334 return $1 if $subject =~ /(\w+\.rar)/;
335 # otherwise just pass what we have
336 return ();
337 }
338
339=back
340
304=head1 AUTHOR 341=head1 AUTHOR
305 342
306Marc Lehmann <pcg@goof.com>, the original uulib library was written by 343Marc Lehmann <pcg@goof.com>, the original uulib library was written by
307Frank Pilhofer <fp@informatik.uni-frankfurt.de>. 344Frank Pilhofer <fp@informatik.uni-frankfurt.de>.
308 345

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines