I've decided to use glib to
save having to write a load of string handling functions in the short term, and
because I might need lists and trees and things later on, which are also
implemented by glib. As a side benefit, glib implements some sort of streams
object, so that would fit in quite well with your getStream***()
functions.
One ugly side-effect of using glib is that
the user then is forced to use glib code in his code as some of the functions
may return glib allocated string which must be freed with g_free(). Plus if I
get these objects to return the glib streams objects then they will further be
forced to use glib functions, unless I just wrap them all (rather pointless
really).
Oh well.
Alastair.
You appear to be referring to the recommended
cvsclient
architecture:
http://www.gnu.org/software/libcvs-spec/guide/internals/CVSClient/generic.html
>>>>>
"Alastair" == Alastair Growcott <address@hidden>
writes:
Alastair> Since the password scrambling is particular to
the pserver
Alastair> connection method, shouldn't the constructor
for that class take an
Alastair> unscrambled password and manage
the scrambling of it itself. It
Alastair> seems odd to put the
scrambling code in any other class, frankly.
In the latest Perl code it
takes a non-scrambled password. I
haven't updated that document in a
while, I just moved over the
old version. The thing to think about
however, is that the
.cvspass file contains scrambled password, so handing
the
plaintext password to that class means that it has to deal with
the
.cvspass internally. I took the internal course for the
Perl
library.
Alastair> What is the intention of the
CVSConnection classes? It seems a
Alastair> little unclear in many
ways. What does the function
Alastair> getStreamToServer() do? How
about getStreamFromServer()? I expected
Alastair> to see something
like recv() and send() type functions.
In Perl (and Java) you generally
keep streams as objects, since a
lot of the reading and writing functions are
already done for you
that way. Those functions return regular classes,
independent of
connection type, which you can read from or write to.
Perhaps in
C recv() and send() would be better.
Alex
--
https://savannah.gnu.org/projects/libcvs-spec
Access CVS through a library.
PGP: ID: 0x23DC453B FPR: 42D0 66C2
9FF8 553A 373A B819 4C34 93BA 23DC 453B
According to you, why to people
pre-plan their funeral?
-- Question on an unsolicited
survey from a local funeral home.