summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-04-19sw-canvas: Get rid of unsused SW_CANVAS_IMAGE_CACHEHEADmasterPavel Grunt2-4/+0
See spice-common commit edac1b36b572cbd8988c44341185a9f51ea3eeb5 Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-15char-device: Remove RedCharDeviceClass::{un, }ref_msg_to_clientChristophe Fergeau5-69/+7
Now that client messages are always RedPipeItem, we don't need virtual functions to know how to ref/unref them.
2016-04-15char-device: Replace RedCharDeviceMsgToClient with PipeItemChristophe Fergeau5-41/+38
Now that all derived classes use a type deriving from PipeItem for their RedCharDeviceMsgToClient, we can make this explicit in the RedCharDeviceClass vfuncs, and remove the RedCharDeviceMsgToClient typedef.
2016-04-15dcc: Use refcounting for MonitorsConfigItemJonathon Jongsma1-15/+10
2016-04-15StreamClipItem: use base class refcountingJonathon Jongsma4-30/+20
PipeItem already implements refcounting. Use it.
2016-04-15DrawablePipeItem: use base class for refcountingJonathon Jongsma3-24/+11
Since PipeItem already implements refcounting, there's no need to re-implement it here.
2016-04-15dcc: use PipeItem refcounting for ImageItemJonathon Jongsma4-19/+9
Since the base class now implements refcounting, there's no need to re-invent it here.
2016-04-15SpiceVmcPipeItem: use base PipeItem for ref countingChristophe Fergeau1-20/+5
This allows to reuse pipe_item_{ref, unref} rather than reimplementing them in spicevmc.c
2016-04-15smartcard: Use base PipeItem for MsgItem refcountingChristophe Fergeau1-23/+12
This allows to reuse pipe_item_{ref, unref} rather than reimplementing them in smartcard.c
2016-04-15reds: Derive VDIPortReadBuf from PipeItemChristophe Fergeau1-36/+38
Since PipeItem is already refcounted, this allows to remove various layers of ref/unref helpers from reds.c, and use the generic pipe_item_{ref, unref} instead.
2016-04-15Add reference counting to PipeItem classChristophe Fergeau5-18/+102
A user-defined callback is called when the refcount drops to 0. Reference counting is manually coded for several classes deriving from PipeItem, so this change will help to share this code, and allow to remove some ref/unref virtual functions in some interfaces when we can assume every instance derives from this base class. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-12red-channel: make red_client_{ref,unref} thread safeFrediano Ziglio1-2/+2
These function are called on both sides of dispatcher so the increment/decrement of the counter is done in multiple threads. This caused the counter to not get incremented correctly and freed the structure too early, leaving a dangling pointer in the other thread. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1253375. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-11char-device: Fix el6 compilationChristophe Fergeau1-1/+0
One more duplicate typedef, once in reds.c and another time in reds-private.h RedsState::agent_dev is defined in reds-private.h but only used in reds.c, so longer term this could all be moved back to reds.c
2016-04-07Move RedCharDeviceCallbacks into RedCharDeviceClassChristophe Fergeau5-113/+94
This structure holding virtual function pointers was kept until now as a RedCharDevice member in order to make the GObject conversion easier. Now that all RedCharDevice children are converted to GObject, it can be moved into RedCharDeviceClass.
2016-04-07reds: Remove red_char_device_new()Christophe Fergeau2-50/+1
Nothing is using it anymore now that CharDevice classes are gobjectified.
2016-04-06reds: Make VDIPortState a GObjectChristophe Fergeau1-89/+159
This inherits from RedCharDevice. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2016-04-06Rename VDIPortState to RedCharDeviceVDIPortJonathon Jongsma2-215/+215
Consistent with internal naming conventions, and prepares for conversion to GObject
2016-04-06smartcard: Turn RedCharDeviceSmartcard into a GObjectChristophe Fergeau2-58/+100
This inherits from RedCharDevice. Once all char device states are converted, we can turn the associated vfuncs into RedCharDeviceClass vfuncs. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2016-04-06Rename SmartCardDeviceState to RedCharDeviceSmartcardJonathon Jongsma1-130/+130
More consistent with naming conventions, and prepares for converting this type to a GObject which inherits from RedCharDevice.
2016-04-06Update spice-common submoduleChristophe Fergeau1-0/+0
Mostly to get fixes for older glib versions (both at compile time and runtime). Changes this brings in: Christophe Fergeau (4): tests: Fix glib version check log: Clamp SPICE_DEBUG_LEVEL if it's too high log: Use SPICE_CONSTRUCTOR_FUNC log: Make sure glib threading is initialized Eduardo Lima (Etrunko) (2): Fix build in systems with Glib version older than 2.38 Add check for openssl
2016-04-06qxl: Remove duplicate QXLState typedefChristophe Fergeau1-2/+1
We can directly include spice-qxl.h in red-qxl.h as it already gets it indirectly anyway. >
2016-04-06reds: Move RedsState typedef to red-common.hChristophe Fergeau6-19/+13
This allows to stop using struct RedsState * rather than RedsState * in headers which cannot include reds.h. This also allows to remove the duplicate RedsState typedef in reds.h and reds-stream.h which is causing issues with older gcc versions.
2016-04-06char-device: Fix property name in red_char_device_new()Christophe Fergeau1-1/+1
This method will be removed in a subsequent commit, but for now it's causing breakage since it's setting "reds" instead of "spice-server"
2016-04-05audio: Improve snd_receive type-safetyChristophe Fergeau1-4/+3
We can pass it a SndChannel rather than an opaque void* data pointer which we then blindly cast. This came to light through a -Wshadow warning as there was a local variable 'data' in addition to the 'data' parameter.
2016-04-05char-device: Remove duplicate typedefChristophe Fergeau1-2/+1
2016-04-05gobject: Add g_type_init() for older glibsChristophe Fergeau1-0/+3
Older glib versions require g_type_init() to be called before using GObject.
2016-04-02reds: Prepare to make VDIPortState a GObjectChristophe Fergeau1-195/+200
This inherits from RedCharDevice. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-02reds: Make VDIPortState private to reds.cChristophe Fergeau2-111/+114
VDIPortState and VDIReadBuf don't really need to be defined in a header file as they are only used in reds.c Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-02spicevmc: Introduce RedCharDeviceSpiceVmc GObjectChristophe Fergeau1-14/+66
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-02char-device: Make RedCharDevice a GObjectChristophe Fergeau2-92/+304
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-01Rename some missing names related to RedCharDeviceFrediano Ziglio3-5/+5
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-04-01Rename SpiceCharDeviceCallbacks to RedCharDeviceCallbacksFrediano Ziglio5-8/+8
The structure is an internal one so should not have the Spice prefix but use the Red one. Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-04-01doc: Be more explicit about virgl requirementsChristophe Fergeau1-1/+9
This is an attempt at listing the versions of the various packages which needs to be up to date for a functional virgl + spice.
2016-04-01mjpeg: Add missing space to debug stringChristophe Fergeau1-1/+1
2016-04-01build-sys: Update libtool versioning for 0.13.1Christophe Fergeau1-2/+2
2016-04-01Update NEWS for 0.13.1Christophe Fergeau1-1/+13
2016-04-01Rename RedCharDevice functionsJonathon Jongsma5-324/+324
make the function names match the type names. So spice_char_device_state_* becomes red_char_device_* and spice_char_device_* also becomes red_char_device_*. Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-01Rename SpiceCharDeviceClientState to RedCharDeviceClientJonathon Jongsma1-54/+54
Make it consistent with the renamed RedCharDevice and the convention of using 'Red' namespaces for internal types Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-01Rename SpiceCharDeviceState to RedCharDeviceJonathon Jongsma8-148/+155
This is more consistent with internal type naming convention, and it paves the way for a new char device GObject heirarchy Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-01Rename SpiceCharDeviceWriteBuffer to RedCharDeviceWriteBufferJonathon Jongsma6-54/+54
Internal types should use 'Red' namespace for consistency Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-01Rename SpiceCharDeviceMsgToClient to RedCharDeviceMsgToClientJonathon Jongsma5-44/+44
Internal types should use Red namespace for consistency Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-03-31char-device: Avoid use-after-freeChristophe Fergeau1-0/+1
Reset pointer after freeing the structure pointing to it. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-30smartcard: Prepare to turn SmartcardState into a GObjectChristophe Fergeau1-69/+73
Move all internal data into a private struct so that it won't be exposed when we move SmartCardDeviceState into the header. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-30Convert Dispatcher and MainDispatcher to GObjectsJonathon Jongsma5-136/+399
Allows more explicit inheritance relationship, and numerous other advantages. Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-03-29char-device: Move instance data to SpiceCharDeviceState::privChristophe Fergeau1-148/+152
Create a structure to hold private data. This helps to make patch for GObject smaller. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-03-29dispatcher: move channel final initialization to red-workerFrediano Ziglio3-39/+31
CursorChannel and DisplayChannel was initialized half in red_worker_new and half in red_dispatcher_init using some accessor for RedWorker (red_worker_get_cursor_channel and red_worker_get_display_channel). Moving directly into red_worker_new make easier to follow code path. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-03-24qxl: use Dispatcher in channel callbacksFrediano Ziglio1-19/+19
There is no need callbacks knows about internal QXLState. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-03-24server: More clearly identify channels that support multiple clientsFrancois Gouget1-10/+9
Rename the function to channel_supports_multiple_clients() as channel_is_secondary() is unclear and was coded to return the opposite of what was originally intended. Also there are few channel types and whether they support multiple clients is totally static so we might as well delegate the check to the compiler. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2016-03-24do not compile dump_bitmap if not necessaryFrediano Ziglio1-0/+2
This function is used only for debugging Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-03-24doc: Add virgl documentationChristophe Fergeau1-0/+56
Document how to use virgl with QEMU/libvirt virt-manager documentation still needs to be added.