Sorry for the long somewhat unclear title, couldn't think how to word the problem I'm having. So basically I have a package structure with two reasonable alternatives (as far as I can see) but both involve a repetition on the second level.
For example, my top level packages could include tcp
and bluetooth
and then each of those would need a sink
and source
sub-package; alternatively sinks
and sources
could be top level packages and each of those have a tcp
and bluetooth
sub-package. The way around I originally started down was the first example, however now I need a source
and sink
interface for reusability, which would be strange to put only in one sub-package and import from, say, tcp
into bluetooth
; however having a copy in each would be pretty terrible practice I'm sure everyone would agree!
One additional complication is that sources and sinks in my project will not be consigned purely to connection technologies, as a local playback device is also counted as a sink to a class that sends it data.