summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/evoab2/NResultSet.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/evoab2/NResultSet.cxx')
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.cxx70
1 files changed, 39 insertions, 31 deletions
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 7fc072f6c6d1..077bf1690b91 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -368,6 +368,18 @@ OString OEvoabVersionHelper::getUserName( EBook *pBook )
return aName;
}
+namespace {
+
+bool isBookBackend( EBookClient *pBook, const char *backendname)
+{
+ if (!pBook)
+ return false;
+ ESource *pSource = e_client_get_source ((EClient *) pBook);
+ return isSourceBackend(pSource, backendname);
+}
+
+}
+
class OEvoabVersion36Helper : public OEvoabVersionHelper
{
private:
@@ -416,14 +428,6 @@ public:
return pBook;
}
- bool isBookBackend( EBookClient *pBook, const char *backendname)
- {
- if (!pBook)
- return false;
- ESource *pSource = e_client_get_source ((EClient *) pBook);
- return isSourceBackend(pSource, backendname);
- }
-
virtual bool isLDAP( EBook *pBook ) SAL_OVERRIDE
{
return isBookBackend(pBook, "ldap");
@@ -490,37 +494,41 @@ protected:
}
};
-class OEvoabVersion35Helper : public OEvoabVersionHelper
-{
-private:
- GList *m_pContacts;
+namespace {
- ESource * findSource( const char *id )
- {
- ESourceList *pSourceList = NULL;
+ESource * findSource( const char *id )
+{
+ ESourceList *pSourceList = NULL;
- g_return_val_if_fail (id != NULL, NULL);
+ g_return_val_if_fail (id != NULL, NULL);
- if (!e_book_get_addressbooks (&pSourceList, NULL))
- pSourceList = NULL;
+ if (!e_book_get_addressbooks (&pSourceList, NULL))
+ pSourceList = NULL;
- for ( GSList *g = e_source_list_peek_groups (pSourceList); g; g = g->next)
+ for ( GSList *g = e_source_list_peek_groups (pSourceList); g; g = g->next)
+ {
+ for (GSList *s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data)); s; s = s->next)
{
- for (GSList *s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data)); s; s = s->next)
- {
- ESource *pSource = E_SOURCE (s->data);
- if (!strcmp (e_source_peek_name (pSource), id))
- return pSource;
- }
+ ESource *pSource = E_SOURCE (s->data);
+ if (!strcmp (e_source_peek_name (pSource), id))
+ return pSource;
}
- return NULL;
}
+ return NULL;
+}
- bool isAuthRequired( EBook *pBook )
- {
- return e_source_get_property( e_book_get_source( pBook ),
- "auth" ) != NULL;
- }
+bool isAuthRequired( EBook *pBook )
+{
+ return e_source_get_property( e_book_get_source( pBook ),
+ "auth" ) != NULL;
+}
+
+}
+
+class OEvoabVersion35Helper : public OEvoabVersionHelper
+{
+private:
+ GList *m_pContacts;
public:
OEvoabVersion35Helper()