Skip to content

Commit

Permalink
[sociald] Implement sync scheduling. Contributes to JB#7295
Browse files Browse the repository at this point in the history
This commit adds scheduling support to the sync profiles provided by
sociald.  It also cleans up the project layout somewhat, to better
separate sync profiles for different services.

Contributes to JB#7295
  • Loading branch information
Chris Adams committed Sep 25, 2013
1 parent 798eba9 commit 931d2e5
Show file tree
Hide file tree
Showing 11 changed files with 85 additions and 37 deletions.
8 changes: 7 additions & 1 deletion rpm/sociald.spec
Expand Up @@ -38,7 +38,13 @@ A daemon process which provides data synchronization with various social service
%defattr(-,root,root,-)
/usr/lib/buteo-plugins-qt5/libsociald-client.so
%config %{_sysconfdir}/buteo/profiles/client/sociald.xml
%config %{_sysconfdir}/buteo/profiles/sync/*.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Calendars.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Contacts.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Images.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Notifications.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Posts.xml
%config %{_sysconfdir}/buteo/profiles/sync/twitter.Notifications.xml
%config %{_sysconfdir}/buteo/profiles/sync/twitter.Posts.xml
%{_datadir}/lipstick/notificationcategories/x-nemo.social.facebook.notification.conf
%{_datadir}/lipstick/notificationcategories/x-nemo.social.twitter.mention.conf
%{_datadir}/translations/sociald_eng_en.qm
Expand Down
20 changes: 19 additions & 1 deletion src/facebook/facebook.pri
Expand Up @@ -16,10 +16,28 @@ SOURCES += \
$$PWD/facebookpostsyncadaptor.cpp \
$$PWD/facebookcalendartypesyncadaptor.cpp

OTHER_FILES += \
facebook_sync_profiles.files \
facebook_eventfeed.files \
facebook_notification_category.files

# facebook buteo sync profiles
facebook_sync_profiles.path = /etc/buteo/profiles/sync
facebook_sync_profiles.files = \
$$PWD/../xml/sync/facebook.Calendars.xml \
$$PWD/../xml/sync/facebook.Contacts.xml \
$$PWD/../xml/sync/facebook.Images.xml \
$$PWD/../xml/sync/facebook.Notifications.xml \
$$PWD/../xml/sync/facebook.Posts.xml

# lipstick event feed subview
facebook_eventfeed.files = $$PWD/eventfeed/facebook.qml $$PWD/eventfeed/facebook-update.qml
facebook_eventfeed.path = /usr/share/lipstick/eventfeed/

# lipstick notification category
facebook_notification_category.files = facebook/x-nemo.social.facebook.notification.conf
facebook_notification_category.path = /usr/share/lipstick/notificationcategories/

# translations
FACEBOOK_TS_FILE = $$OUT_PWD/lipstick-jolla-home-facebook.ts
FACEBOOK_EE_QM = $$OUT_PWD/lipstick-jolla-home-facebook_eng_en.qm
Expand All @@ -44,4 +62,4 @@ facebook_engineering_english_install.CONFIG += no_check_exist
QMAKE_EXTRA_TARGETS += facebook_ts facebook_engineering_english
PRE_TARGETDEPS += facebook_ts facebook_engineering_english

INSTALLS += facebook_eventfeed facebook_ts_install facebook_engineering_english_install
INSTALLS += facebook_sync_profiles facebook_eventfeed facebook_notification_category facebook_ts_install facebook_engineering_english_install
35 changes: 15 additions & 20 deletions src/src.pro
Expand Up @@ -27,9 +27,6 @@ target.path += /usr/lib/buteo-plugins-qt5
client.path = /etc/buteo/profiles/client
client.files = xml/sociald.xml

sync.path = /etc/buteo/profiles/sync
sync.files = xml/sync/*

QT += \
network \
dbus \
Expand Down Expand Up @@ -57,24 +54,26 @@ SOURCES += \
$$PWD/syncservice.cpp \
$$PWD/databasemanipulationinterface.cpp

OTHER_FILES += shared_eventfeed.files

MOC_DIR = $$PWD/../.moc
OBJECTS_DIR = $$PWD/../.obj

# lipstick event feed subview shared components
shared_eventfeed.files = $$PWD/eventfeed/SocialAvatar.qml \
$$PWD/eventfeed/SocialBody.qml \
$$PWD/eventfeed/SocialButton.qml \
$$PWD/eventfeed/SocialContent.qml \
$$PWD/eventfeed/SocialMediaRow.qml \
$$PWD/eventfeed/SocialInfoLabel.qml \
$$PWD/eventfeed/SocialComment.qml \
$$PWD/eventfeed/SocialReplyField.qml \
$$PWD/eventfeed/SocialAccountPullDownMenu.qml \
$$PWD/eventfeed/SocialAccountPage.qml \
$$PWD/eventfeed/SocialStatusUpdater.qml
shared_eventfeed.files = \
$$PWD/eventfeed/SocialAvatar.qml \
$$PWD/eventfeed/SocialBody.qml \
$$PWD/eventfeed/SocialButton.qml \
$$PWD/eventfeed/SocialContent.qml \
$$PWD/eventfeed/SocialMediaRow.qml \
$$PWD/eventfeed/SocialInfoLabel.qml \
$$PWD/eventfeed/SocialComment.qml \
$$PWD/eventfeed/SocialReplyField.qml \
$$PWD/eventfeed/SocialAccountPullDownMenu.qml \
$$PWD/eventfeed/SocialAccountPage.qml \
$$PWD/eventfeed/SocialStatusUpdater.qml
shared_eventfeed.path = /usr/share/lipstick/eventfeed/shared/


# translations
TS_FILE = $$OUT_PWD/sociald.ts
EE_QM = $$OUT_PWD/sociald_eng_en.qm
Expand All @@ -99,9 +98,5 @@ engineering_english_install.CONFIG += no_check_exist
QMAKE_EXTRA_TARGETS += ts engineering_english
PRE_TARGETDEPS += ts engineering_english

# lipstick notification categories
notification_categories.files = facebook/x-nemo.social.facebook.notification.conf twitter/x-nemo.social.twitter.mention.conf
notification_categories.path = /usr/share/lipstick/notificationcategories/

INSTALLS += target client sync shared_eventfeed notification_categories ts_install engineering_english_install
INSTALLS += target client shared_eventfeed ts_install engineering_english_install

17 changes: 16 additions & 1 deletion src/twitter/twitter.pri
Expand Up @@ -10,10 +10,25 @@ SOURCES += \
$$PWD/twittermentiontimelinesyncadaptor.cpp \
$$PWD/twitterhometimelinesyncadaptor.cpp

OTHER_FILES += \
twitter_sync_profiles.files \
twitter_eventfeed.files \
twitter_notification_category

# twitter buteo sync profiles
twitter_sync_profiles.path = /etc/buteo/profiles/sync
twitter_sync_profiles.files = \
$$PWD/../xml/sync/twitter.Posts.xml \
$$PWD/../xml/sync/twitter.Notifications.xml

# lipstick event feed subview
twitter_eventfeed.files = $$PWD/eventfeed/twitter.qml $$PWD/eventfeed/twitter-update.qml
twitter_eventfeed.path = /usr/share/lipstick/eventfeed/

# lipstick notification category
twitter_notification_category.files = twitter/x-nemo.social.twitter.mention.conf
twitter_notification_category.path = /usr/share/lipstick/notificationcategories/

# translations
TWITTER_TS_FILE = $$OUT_PWD/lipstick-jolla-home-twitter.ts
TWITTER_EE_QM = $$OUT_PWD/lipstick-jolla-home-twitter_eng_en.qm
Expand All @@ -38,4 +53,4 @@ twitter_engineering_english_install.CONFIG += no_check_exist
QMAKE_EXTRA_TARGETS += twitter_ts twitter_engineering_english
PRE_TARGETDEPS += twitter_ts twitter_engineering_english

INSTALLS += twitter_eventfeed twitter_ts_install twitter_engineering_english_install
INSTALLS += twitter_sync_profiles twitter_eventfeed twitter_notification_category twitter_ts_install twitter_engineering_english_install
6 changes: 4 additions & 2 deletions src/xml/sync/facebook.Calendars.xml
Expand Up @@ -13,8 +13,10 @@
<key name="Sync Direction" value="from-remote" />
</profile>

<key name="destinationtype" value="online" />

<!--This is used by sync-fw to set customized scheduling information for the profile -->
<schedule enabled="false" interval="1" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="">
</schedule>
<schedule enabled="true" interval="" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="0500" />

<key name="category" value="facebook.Calendars" />
</profile>
6 changes: 4 additions & 2 deletions src/xml/sync/facebook.Contacts.xml
Expand Up @@ -13,8 +13,10 @@
<key name="Sync Direction" value="from-remote" />
</profile>

<key name="destinationtype" value="online" />

<!--This is used by sync-fw to set customized scheduling information for the profile -->
<schedule enabled="false" interval="1" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="">
</schedule>
<schedule enabled="true" interval="" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="0500" />

<key name="category" value="facebook.Contacts" />
</profile>
6 changes: 4 additions & 2 deletions src/xml/sync/facebook.Images.xml
Expand Up @@ -13,8 +13,10 @@
<key name="Sync Direction" value="from-remote" />
</profile>

<key name="destinationtype" value="online" />

<!--This is used by sync-fw to set customized scheduling information for the profile -->
<schedule enabled="false" interval="1" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="">
</schedule>
<schedule enabled="true" interval="" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="0500" />

<key name="category" value="facebook.Images" />
</profile>
6 changes: 4 additions & 2 deletions src/xml/sync/facebook.Notifications.xml
Expand Up @@ -13,8 +13,10 @@
<key name="Sync Direction" value="from-remote" />
</profile>

<key name="destinationtype" value="online" />

<!--This is used by sync-fw to set customized scheduling information for the profile -->
<schedule enabled="false" interval="1" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="">
</schedule>
<schedule enabled="true" interval="30" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="" />

<key name="category" value="eventfeed" />
</profile>
6 changes: 4 additions & 2 deletions src/xml/sync/facebook.Posts.xml
Expand Up @@ -13,8 +13,10 @@
<key name="Sync Direction" value="from-remote" />
</profile>

<key name="destinationtype" value="online" />

<!--This is used by sync-fw to set customized scheduling information for the profile -->
<schedule enabled="false" interval="1" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="">
</schedule>
<schedule enabled="true" interval="30" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="" />

<key name="category" value="eventfeed" />
</profile>
6 changes: 4 additions & 2 deletions src/xml/sync/twitter.Notifications.xml
Expand Up @@ -13,8 +13,10 @@
<key name="Sync Direction" value="from-remote" />
</profile>

<key name="destinationtype" value="online" />

<!--This is used by sync-fw to set customized scheduling information for the profile -->
<schedule enabled="false" interval="1" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="">
</schedule>
<schedule enabled="true" interval="30" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="" />

<key name="category" value="eventfeed" />
</profile>
6 changes: 4 additions & 2 deletions src/xml/sync/twitter.Posts.xml
Expand Up @@ -13,8 +13,10 @@
<key name="Sync Direction" value="from-remote" />
</profile>

<key name="destinationtype" value="online" />

<!--This is used by sync-fw to set customized scheduling information for the profile -->
<schedule enabled="false" interval="1" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="">
</schedule>
<schedule enabled="true" interval="30" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="" />

<key name="category" value="eventfeed" />
</profile>

0 comments on commit 931d2e5

Please sign in to comment.