Skip to content

Commit

Permalink
Add the provider and service files for KAccounts
Browse files Browse the repository at this point in the history
  • Loading branch information
mck182 committed Nov 11, 2014
1 parent 3695fb0 commit b4d6304
Show file tree
Hide file tree
Showing 11 changed files with 147 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ set(IS_KTP_INTERNAL_MODULE TRUE)
find_package (TelepathyQt5 REQUIRED)
find_package (KTp REQUIRED)
find_package (KAccounts REQUIRED)
find_package (AccountsFileDir REQUIRED)
find_package (Intltool REQUIRED) #needed to generate service and provider files

# make some more macros available
# include (MacroLibrary)
Expand Down
2 changes: 2 additions & 0 deletions data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
install (DIRECTORY profiles
DESTINATION ${SHARE_INSTALL_PREFIX}/telepathy)

add_subdirectory (kaccounts)
15 changes: 15 additions & 0 deletions data/kaccounts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
file(GLOB service_files_in *.service.in)
foreach(service_file_in ${service_files_in})
get_filename_component(service_filename ${service_file_in} NAME_WE)
set(service_file ${CMAKE_CURRENT_BINARY_DIR}/${service_filename}.service)
execute_process(COMMAND intltool-merge -x -u --no-translations ${service_file_in} ${service_file})
install(FILES ${service_file} DESTINATION ${ACCOUNTS_SERVICES_DIR})
endforeach()

file(GLOB provider_in_files *.provider.in)
foreach(provider_in_file ${provider_in_files})
get_filename_component(provider_filename ${provider_in_file} NAME_WE)
set(provider_file ${CMAKE_CURRENT_BINARY_DIR}/${provider_filename}.provider)
execute_process(COMMAND intltool-merge -x -u --no-translations ${provider_in_file} ${provider_file})
install(FILES ${provider_file} DESTINATION ${ACCOUNTS_PROVIDERS_DIR})
endforeach()
25 changes: 25 additions & 0 deletions data/kaccounts/facebook-im.service.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<service id="facebook-im">
<type>IM</type>
<!-- "Chat" on Facebook - Service name being displayed as a checkbox label to enable/disable this service
Would be nice to use the localized name of this service if it exists/makes sense -->
<_name>Chat</_name>
<icon>facebook-im</icon>
<provider>facebook</provider>
<translations>kaccounts-providers</translations>

<!-- default settings (account settings have precedence over these) -->
<template>
<group name="telepathy">
<setting name="mc-readonly-params" type="b">true</setting>
<setting name="manager">gabble</setting>
<setting name="protocol">jabber</setting>

<setting name="param-account">chat.facebook.com</setting>
<setting name="param-server">chat.facebook.com</setting>
<setting name="param-fallback-servers">chat.facebook.com:443</setting>
</group>
</template>


</service>
30 changes: 30 additions & 0 deletions data/kaccounts/google-im.service.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<service id="google-im">
<type>IM</type>
<!-- Google Hangouts - Service name being displayed as a checkbox label to enable/disable this service
Would be nice to use the localized name of this service if it exists/makes sense -->
<_name>Google Hangouts</_name>
<icon>im-google-talk</icon>
<provider>google</provider>
<translations>kaccounts-providers</translations>

<!-- default settings (account settings have precedence over these) -->
<template>
<group name="telepathy">
<setting name="mc-readonly-params" type="b">true</setting>
<setting name="manager">gabble</setting>
<setting name="protocol">jabber</setting>

<setting name="param-account">google.com</setting>
<setting name="param-server">talk.google.com</setting>
<setting name="param-fallback-servers">
talkx.l.google.com;
talkx.l.google.com:443,oldssl;
talkx.l.google.com:80
</setting>
<setting name="param-extra-certificate-identities">talk.google.com</setting>
<setting name="param-require-encryption">true</setting>
</group>
</template>

</service>
9 changes: 9 additions & 0 deletions data/kaccounts/ktp-haze-icq-im.service.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<service id="ktp-haze-icq-im">
<type>IM</type>
<!-- ICQ Chat - Service name being displayed as a checkbox label to enable/disable this service -->
<_name>Chat</_name>
<icon>im-icq</icon>
<provider>ktp-haze-icq</provider>
<translations>kaccounts-providers</translations>
</service>
15 changes: 15 additions & 0 deletions data/kaccounts/ktp-haze-icq.provider.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<provider id="ktp-haze-icq">
<_name>ICQ</_name>
<icon>im-icq</icon>
<!-- Tooltip text appearing over the button to create this type of account -->
<_description>Chat account in the ICQ network</_description>
<translations>kaccounts-providers</translations>

<template>
<group name="auth">
<setting name="method">password</setting>
<setting name="mechanism">password</setting>
</group>
</template>
</provider>
9 changes: 9 additions & 0 deletions data/kaccounts/ktp-jabber-im.service.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<service id="ktp-jabber-im">
<type>IM</type>
<!-- Jabber/XMPP - Service name being displayed as a checkbox label to enable/disable this service -->
<_name>Chat</_name>
<icon>im-jabber-talk</icon>
<provider>ktp-jabber</provider>
<translations>kaccounts-providers</translations>
</service>
15 changes: 15 additions & 0 deletions data/kaccounts/ktp-jabber.provider.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<provider id="ktp-jabber">
<_name>Jabber</_name>
<icon>im-jabber</icon>
<!-- Tooltip text appearing over the button to create this type of account -->
<_description>Jabber chat account</_description>
<translations>kaccounts-providers</translations>

<template>
<group name="auth">
<setting name="method">password</setting>
<setting name="mechanism">password</setting>
</group>
</template>
</provider>
9 changes: 9 additions & 0 deletions data/kaccounts/ktp-kde-talk-im.service.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<service id="ktp-kde-talk-im">
<type>IM</type>
<!-- KDE Talk Chat - Service name being displayed as a checkbox label to enable/disable this service -->
<_name>Chat</_name>
<icon>kde</icon>
<provider>ktp-kde-talk</provider>
<translations>kaccounts-providers</translations>
</service>
16 changes: 16 additions & 0 deletions data/kaccounts/ktp-kde-talk.provider.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<provider id="ktp-kde-talk">
<!-- This is KDE's own IM network based on jabber, it's an estabilished name and probably shouldn't be translated -->
<_name>KDE Talk</_name>
<icon>kde</icon>
<!-- Tooltip text appearing over the button to create this type of account -->
<_description>KDE Talk chat account</_description>
<translations>kaccounts-providers</translations>

<template>
<group name="auth">
<setting name="method">password</setting>
<setting name="mechanism">password</setting>
</group>
</template>
</provider>

0 comments on commit b4d6304

Please sign in to comment.