~ubuntu-branches/ubuntu/trusty/content-hub/trusty-proposed

« back to all changes in this revision

Viewing changes to src/com/ubuntu/content/service/registry.h

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Ken VanDine, Ubuntu daily release
  • Date: 2014-03-21 00:46:57 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20140321004657-5w0p7mj1qn9lrrj3
Tags: 0.0+14.04.20140321-0ubuntu1
[ Ken VanDine ]
* Adds support for multiple handler types: source, destination and
  share. Enforce single transfer per peer, if a second transfer
  request is made from a peer that already has an unfinished transfer,
  cancel the previous one. This is needed as long as apps are required
  to be single instance.
* If the transfer isn't persistent, attempt to hardlink instead of
  copying. If the link fails, fallback to a copy.
* If the default source is set to anything other than a click appId
  triplet, fallback to the legacy APP_ID. Changed default source for
  contacts to the legacy APP_ID for address-book-app

[ Ubuntu daily release ]
* New rebuild forced

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#define REGISTRY_H
21
21
 
22
22
#include <QGSettings/QGSettings>
23
 
#include <QDebug>
24
23
#include <com/ubuntu/content/peer.h>
25
24
#include <com/ubuntu/content/type.h>
26
25
#include "detail/peer_registry.h"
34
33
public:
35
34
    Registry();
36
35
    ~Registry();
37
 
    cuc::Peer default_peer_for_type(cuc::Type type);
38
 
    void enumerate_known_peers_for_type(cuc::Type type, const std::function<void(const cuc::Peer&)>& for_each);
 
36
    cuc::Peer default_source_for_type(cuc::Type type);
39
37
    void enumerate_known_peers(const std::function<void(const cuc::Peer&)>& for_each);
40
 
    bool install_default_peer_for_type(cuc::Type type, cuc::Peer peer);
41
 
    bool install_peer_for_type(cuc::Type type, cuc::Peer peer);    
 
38
    void enumerate_known_sources_for_type(cuc::Type type, const std::function<void(const cuc::Peer&)>& for_each);   
 
39
    void enumerate_known_destinations_for_type(cuc::Type type, const std::function<void(const cuc::Peer&)>& for_each);
 
40
    void enumerate_known_shares_for_type(cuc::Type type, const std::function<void(const cuc::Peer&)>& for_each);
 
41
    bool install_default_source_for_type(cuc::Type type, cuc::Peer peer);
 
42
    bool install_source_for_type(cuc::Type type, cuc::Peer peer);    
 
43
    bool install_destination_for_type(cuc::Type type, cuc::Peer peer);
 
44
    bool install_share_for_type(cuc::Type type, cuc::Peer peer);
42
45
    bool remove_peer(cuc::Peer peer);
43
46
 
44
47
private:
45
 
    QScopedPointer<QGSettings> m_defaultPeers;
46
 
    QScopedPointer<QGSettings> m_peers;
 
48
    QScopedPointer<QGSettings> m_defaultSources;
 
49
    QScopedPointer<QGSettings> m_sources;
 
50
    QScopedPointer<QGSettings> m_dests;
 
51
    QScopedPointer<QGSettings> m_shares;
47
52
};
48
53
 
49
54
#endif // REGISTRY_H