1 /* |
|
2 * Copyright (c) 2008 - 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class declaration for Contact Managemnet Test Cases. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef DBUS_API_SUBJECT_TO_CHANGE |
|
22 #define DBUS_API_SUBJECT_TO_CHANGE |
|
23 #endif |
|
24 |
|
25 |
|
26 //Include files |
|
27 #include <e32err.h> |
|
28 #include <e32const.h> |
|
29 #include <e32base.h> |
|
30 |
|
31 #include <stdio.h> |
|
32 #include <stdlib.h> |
|
33 #include <string.h> |
|
34 #include <signal.h> |
|
35 |
|
36 #include <dbus/dbus-glib.h> |
|
37 #include <glib.h> |
|
38 |
|
39 #include <unistd.h> |
|
40 |
|
41 #include "tp-conn.h" |
|
42 #include "tp-connmgr.h" |
|
43 #include "tp-chan.h" |
|
44 #include "tp-chan-gen.h" |
|
45 #include "tp-ch-gen.h" |
|
46 #include "tp-chan-iface-group-gen.h" |
|
47 #include "tp-chan-type-text-gen.h" |
|
48 #include "tp-chan-type-streamed-media-gen.h" |
|
49 #include "tp-props-iface.h" |
|
50 #include "tp-constants.h" |
|
51 #include "tp-interfaces.h" |
|
52 |
|
53 #include <pthread.h> |
|
54 //for the global data |
|
55 #include "telepathygabbletestdata.h" |
|
56 |
|
57 #define VERBOSE |
|
58 |
|
59 |
|
60 // FORWARD DECLARATION |
|
61 class CTestData; |
|
62 |
|
63 |
|
64 // CLASS DECLARATION |
|
65 NONSHARABLE_CLASS(CTelepathyGabbleAddDeleteContact) : public CBase |
|
66 { |
|
67 |
|
68 private: |
|
69 /* |
|
70 * C++ default constructor. |
|
71 */ |
|
72 |
|
73 CTelepathyGabbleAddDeleteContact(); |
|
74 |
|
75 /** |
|
76 * By default Symbian 2nd phase constructor is private. |
|
77 */ |
|
78 void ConstructL(); |
|
79 |
|
80 public: // Constructors and destructor |
|
81 /** |
|
82 * Two-phased constructor. |
|
83 */ |
|
84 static CTelepathyGabbleAddDeleteContact* NewL(); |
|
85 |
|
86 /** |
|
87 * Destructor. |
|
88 */ |
|
89 ~CTelepathyGabbleAddDeleteContact(); |
|
90 |
|
91 |
|
92 public: // Member functions |
|
93 |
|
94 TInt add_contact ( const gchar *contact_id, const gchar *message, |
|
95 CTestData* aTestData ); |
|
96 TInt remove_contact ( const gchar *contact_id, const gchar *message, |
|
97 CTestData* aTestData ); |
|
98 |
|
99 public : //Callback functions |
|
100 |
|
101 static void add_contact_cb( DBusGProxy *proxy, GError *error, gpointer userdata ); |
|
102 static void remove_contact_cb( DBusGProxy *proxy, GError *error, gpointer userdata ); |
|
103 |
|
104 static void roster_members_changed_cb (DBusGProxy *group_iface, |
|
105 gchar *message, |
|
106 GArray *added, |
|
107 GArray *removed, |
|
108 GArray *local_pending, |
|
109 GArray *remote_pending, |
|
110 guint actor, |
|
111 guint reason, |
|
112 gpointer userdata); |
|
113 }; |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|