Hi Alan,

> > > Right now, the broker is arranged as a main program 
> (qpidd.cpp) that
> > > links with a shared library (libqpidbroker, and common). The
main
> > > program is in cpp/src/qpidd.cpp and the libqpidbroker code is
> > > primarily in cpp/src/qpid/broker
> > > 
> > > The qpidd.cpp program has a significant chunk of 
> posix-specific code
> > > that has to change for Windows. In particular, options 
> processing and
> > > daemon usage. I was thinking to do this:
> > > 
> > > - Split the posix-specific code out to qpidd_posix.cpp, and make
a
> > > qpidd_windows.cpp with the Windows-specific pieces.
> > > 
> > > - The split may be helped by something like qpidd.h so 
> the different
> > > platforms implement the same class/API.
> > > 
> > > At this point, I'm wondering if the qpidd.cpp and related 
> files should
> > > go down into cpp/src/qpid/broker, or if you want to keep them in
> > > cpp/src still. Any thoughts?
> > 
> > The rule for file placement as it stands is currently that 
> files follow
> > their namespace. So given that qpidd.cpp really contains 
> main() which
> > can't be in any namespace it should be in cpp/src.
> > 
> > I think the correct solution to this problem is to figure out the
> > correct platform dependent/platform independent code split 
> and make the
> > platform code appropriate facitilities in qpp/qpid/sys. 
> However in the
> > meantime splitting qpidd.cpp and leaving the resultant 
> files in cpp/src
> > would be fine until we figure out the best final resting 
> places for the
> > code.
> > 
> > My opinion only, Gordon or Alan might have different ideas.
> 
> Steve, I thought boost::program_options was portable to Windows, am
I
> wrong?

No, that's correct.

> The options themselves may be different on different 
> platforms at
> some point, so perhaps we should separate out the QpidOptions 
> class and split its implementation.

Yes, that's what I meant. Similar to the logging options (where syslog
makes no sense on Windows), some options are platform-specific.

> The Daemon class is already under broker, and could move to sys.
> 
> What else is posix specific in qpidd.cpp?

The idea of a daemon is posix-ish, so it's not (I think) planned to do
a Daemon for Windows. It may have other stuff added that makes no
sense for Linux, such as the ability to run as a Windows service.

-Steve


Reply via email to