summaryrefslogtreecommitdiff
path: root/src/mcd-master.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove Conditions interfaceSimon McVittie2013-10-141-1/+0
| | | | | | | | | I was never sure about the design, and the supporting code was removed when I refactored connectivity for 5.16. If it's needed in future, we can bring it back, hopefully with a simpler design (fd.o #24896). Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69600
* McdConnection: use tp_simple_client_factory_ensure_connectionSimon McVittie2013-09-101-1/+1
| | | | | | | | This means we need to pass the client factory through the McdManager from the McdMaster, so, do. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55391 Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
* Remove the remains of McdTransportPluginSimon McVittie2013-09-041-46/+0
| | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* _mcd_master_account_replace_transport: inline into caller and simplifySimon McVittie2013-09-041-53/+0
| | | | | | | | | There's only one transport plugin, it only has one transport, and its state is basically boolean, so we can delete a lot of code. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* mcd_master_connect_automatic_accounts: move to McdAccountManagerSimon McVittie2013-09-041-21/+0
| | | | | | | | Iterating over all accounts? Looks like a job for the account manager. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* McdAccount: respond to connectivity status changesSimon McVittie2013-09-041-108/+0
| | | | | | | | | Instead of proxying through the transport plugin and the McdMaster, just watch the McdConnectivityMonitor. Much simpler! Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* Move "waiting for connectivity" functionality into McdAccountSimon McVittie2013-09-041-53/+0
| | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* Put the connectivity monitor in the McdAccountManagerSimon McVittie2013-09-041-1/+2
| | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* Remove the concept of binding accounts to transportsSimon McVittie2013-09-041-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | We only have one transport now, so there are two options: either the account is a special one that "needs dispatch" and also bypasses the transport check (in practice this means cellular accounts), or it is connected via the Internet. Binding accounts to transports never made a vast amount of sense. If we have many parallel Internet connections (e.g. wired + wifi + cellular + VPN), Mission Control can't know which one a Connection is relying on - only the connection manager can know that - so we have to err on the side of disconnecting everything on a connectivity change anyway. A possible refinement in future Tp versions would be a way for a CM to tell MC "this connection does its own connectivity-monitoring, so don't kick it when we get disconnected". For now, we assume that everything needs the Internet, unless it's one of the accounts that wouldn't previously have been bound to a connection (i.e. _mcd_account_needs_dispatch() returns FALSE). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* McdMaster: remove support for writing account-manager propertySimon McVittie2013-09-031-8/+2
| | | | | | | | Nothing constructs a McdMaster with a non-default McdAccountManager. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* Remove support for checking conditions on accountsSimon McVittie2013-09-031-27/+6
| | | | | | | | | We no longer have API for external transport providers, and we've never defined any conditions on the transport provider we do have. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* mcd_master_create_manager: unvirtualizeSimon McVittie2013-09-031-12/+3
| | | | | | | | | There's no point in this being virtual: there are no subclasses, and it isn't API any more. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* McdMaster: use modern idiom for privSimon McVittie2013-09-031-28/+21
| | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* McdAccountManager: have a TpSimpleClientFactorySimon McVittie2012-10-081-2/+6
| | | | | | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55391 Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
* replace sealed struct members with getters and use TpProtocolSimon McVittie2012-10-081-3/+3
| | | | | | | | Originally two patches for 'next' by Jonny Lamb. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55391 Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
* McdMaster: remove unused variable left over from old-style pluginsSimon McVittie2012-09-071-1/+0
| | | | | | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54633
* McdMaster: fail to build if umask() is missingSimon McVittie2012-08-281-0/+6
| | | | | | | | | We ought to be able to rely on umask() for files created since 5.2.2, at least on Unix. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54151
* McdDispatcher: don't be a McdMissionSimon McVittie2012-05-081-11/+1
| | | | | | | | The dispatcher subscribes to the master's abort signal rather than implementing any of the McdMission virtual methods, so nothing in McdMission is actually doing anything for it. This means we can get rid of McdProxy, so, do.
* Flatten McdPlugin into McdMasterSimon McVittie2012-05-081-9/+8
| | | | | This older plugin API exposes enough MC internals that there's no point trying to support it out-of-tree.
* mcd_master_get_dispatcher, mcd_plugin_get_dispatcher: removeSimon McVittie2012-05-081-30/+0
|
* Remove McdController and inline its shutdown method into McdMasterSimon McVittie2012-05-081-4/+47
|
* Remove unused support for a magical auto-away flag set by embeddersSimon McVittie2012-05-081-79/+0
| | | | | Less code, fewer bugs. Also, people should have stopped embedding MC by now, and an earlier patch in this series made it impossible.
* Remove deprecated support for old-style (mcd) pluginsSimon McVittie2012-05-081-95/+0
| | | | Only in-tree code can use mcd_* functions now.
* Display a string representation of McdTransportStatus in debug messageGuillaume Desmottes2012-02-021-2/+21
| | | | | This will make my life much easier when trying to debug issues from users' logs.
* Changes need to cross compile MC for windowsSiraj Razick2011-12-221-0/+4
| | | | we need to include io.h to make unmask work when cross compiling
* Build on systems without gettextAlvaro Soliverez2011-11-211-1/+0
| | | | | | Modified from an original patch by Derek Foreman https://bugs.freedesktop.org/show_bug.cgi?id=42508
* Use _unref instead of _free _destroy when possible.unrefXavier Claessens2011-11-161-2/+2
| | | | | | | | | | | Replace g_(ptr_)array_free (foo, TRUE) and g_hash_table_destroy with respectively g_(ptr_)array_unref (foo) and g_hash_table_unref. I used this command to generate this patch: for f in `find -name "*.c"`; do sed -i $f -re 's/g_ptr_array_free \(([^ ,]+), TRUE\)/g_ptr_array_unref \(\1\)/'; done See Danielle's blog for explanation of possible bug _free can do: http://blogs.gnome.org/danni/2011/11/16/mistakes-with-g_value_set_boxed/
* Master: Always bind connection to a transportWill Thompson2011-09-281-2/+1
| | | | | | | | | | | | | | | | | Previously, when a connection was brought online in response to an event other than a transport becoming connected, it would always be bound to a transport (if any transport plugins are loaded, obviously), regardless of whether the dictionary o' conditions was empty or not. However, when a transport coming online caused a connection to be brought up, that connection would not be bound to the transport that caused it to come online if the conditions were empty (which they generally are). For reasons I can't quite fathom, this actually doesn't seem to have affected anything: it could be because monitor_state_changed_cb in McdKludgeTransport also binds waiting connections to the transport that came online. But this seems like a sensible change for sanity and consistency reasons.
* Account: add would_like_to_connect method.Will Thompson2011-09-281-7/+1
| | | | This consolidates logic previously duplicated between two code paths.
* Master: instantiate an McdKludgeTransportWill Thompson2011-09-281-0/+3
|
* Master: poison singleton pointer when disposedWill Thompson2011-09-231-0/+12
| | | | | | | | | | | | | | | | Previously, when the 'default' instance of McdMaster (i.e., the singleton) was disposed, the 'default_master' variable was left pointing to it. This is basically fine in practice, since the McdMaster is meant to survive for the lifetime of the connection. But I hit a weird crash (caused by the test suite's version of MC waiting 5 seconds after the McdMaster is destroyed before closing, which interacts badly with the reconnection timeout being less than 5 seconds) and it would have been much clearer what was happening if 'default_master' had held a known-bad address rather than a possibly-valid pointer to a freed object. This doesn't change the behaviour of the code in any significant way: we'll still crash in this situation. But as far as I can tell the bug is harmless.
* Remove libmcclientWill Thompson2011-09-011-2/+0
| | | | | | | This entails doing a little more code generation for the daemon: some bits depended on generated code from libmcclient, and there was an error enum used in exactly one place. But broadly speaking this just deletes a tonne of code and documentation.
* Remove Compat.Profile supportWill Thompson2011-08-311-1/+0
|
* If there are no transport plugins, the decision always has to be "Yes"Vivek Dasmohapatra2011-07-201-3/+14
|
* Accounts flagged as always-dispatch don't need a transport.Vivek Dasmohapatra2011-06-081-0/+7
|
* _mcd_master_account_replace_transport would accept "no connection" as a ↵Vivek Dasmohapatra2011-06-011-24/+29
| | | | successful replacement if no account conditions were specified, forcing unwanted reconnections
* _mcd_account_connect_with_auto_presence: take a parameter for user-initiated ↵Simon McVittie2011-05-191-2/+2
| | | | or not
* Delete mcd_master_add_connection_parameter()Will Thompson2010-10-121-41/+0
| | | | This is not used anywhere, which is good, because it doesn't work.
* various shared classes: use tp_clear_object, tp_clear_pointerSimon McVittie2010-09-091-11/+3
|
* Move the plugin loader init in the master to its _init functionVivek Dasmohapatra2010-03-241-5/+5
|
* Load plugins before any other components are initialised.Vivek Dasmohapatra2010-03-091-3/+5
|
* Add a simple loader for plugins using mission-control-pluginsSimon McVittie2010-02-011-0/+4
|
* Rename --enable-plugins (etc.) to --enable-mcd-plugins (etc.)Simon McVittie2010-02-011-15/+15
|
* McdMaster: remove no-op connect, disconnect methodsSimon McVittie2009-09-161-21/+0
|
* McdMaster: detach idle/low-memory from McdMission flagsSimon McVittie2009-09-161-86/+49
|
* McdMaster: if umask is available, create dirs/files with 0700/0600 permissionsSimon McVittie2009-09-071-0/+12
|
* Rename _mcd_master_account_conditions_satisfied to ↵Simon McVittie2009-08-131-3/+3
| | | | | | | _mcd_master_account_replace_transport It has the startling side-effect of binding the account to the selected transport, so the old name was rather misleading.
* fd.o #22332: libmissioncontrol-server: remove unnecessary gconf dependencySimon McVittie2009-07-011-1/+0
| | | | | | | | | libmissioncontrol-server no longer has anything to do with GConf. In the case where plugins are enabled, this requires promoting the GModule dependency from libmissioncontrol-server.la to libmcd-convenience.la: previously, libmcd-convenience.la implicitly had a GModule dependency anyway, via GConf, which masked this mistake.
* McdMaster: remove now-unused TransportData typedefSimon McVittie2009-06-251-6/+0
|
* McdMaster: inline disconnect_account_transportSimon McVittie2009-06-251-33/+22
|