/usr/include/telepathy-qt4/TelepathyQt/_gen/cli-connection-manager.h is in libtelepathy-qt4-dev 0.9.6~git1-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 | /*
* This file contains D-Bus client proxy classes generated by qt-client-gen.py.
*
* This file can be distributed under the same terms as the specification from
* which it was generated.
*/
#ifndef IN_TP_QT_HEADER
#error IN_TP_QT_HEADER
#endif
#include <TelepathyQt/Types>
#include <QtGlobal>
#include <QString>
#include <QObject>
#include <QVariant>
#include <QDBusPendingReply>
#include <TelepathyQt/AbstractInterface>
#include <TelepathyQt/DBusProxy>
#include <TelepathyQt/Global>
namespace Tp
{
class PendingVariant;
class PendingOperation;
}
namespace Tp
{
namespace Client
{
/**
* \class ConnectionManagerInterface
* \headerfile TelepathyQt/connection-manager.h <TelepathyQt/ConnectionManager>
* \ingroup clientcm
*
* Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.ConnectionManager".
*/
class TP_QT_EXPORT ConnectionManagerInterface : public Tp::AbstractInterface
{
Q_OBJECT
public:
/**
* Returns the name of the interface "org.freedesktop.Telepathy.ConnectionManager", which this class
* represents.
*
* \return The D-Bus interface name.
*/
static inline QLatin1String staticInterfaceName()
{
return QLatin1String("org.freedesktop.Telepathy.ConnectionManager");
}
/**
* Creates a ConnectionManagerInterface associated with the given object on the session bus.
*
* \param busName Name of the service the object is on.
* \param objectPath Path to the object on the service.
* \param parent Passed to the parent class constructor.
*/
ConnectionManagerInterface(
const QString& busName,
const QString& objectPath,
QObject* parent = 0
);
/**
* Creates a ConnectionManagerInterface associated with the given object on the given bus.
*
* \param connection The bus via which the object can be reached.
* \param busName Name of the service the object is on.
* \param objectPath Path to the object on the service.
* \param parent Passed to the parent class constructor.
*/
ConnectionManagerInterface(
const QDBusConnection& connection,
const QString& busName,
const QString& objectPath,
QObject* parent = 0
);
/**
* Creates a ConnectionManagerInterface associated with the same object as the given proxy.
*
* \param proxy The proxy to use. It will also be the QObject::parent()
* for this object.
*/
ConnectionManagerInterface(Tp::DBusProxy *proxy);
/**
* Asynchronous getter for the remote object property \c Protocols of type \c Tp::ProtocolPropertiesMap.
*
*
* \htmlonly
* <p>A map from protocol identifiers supported by this connection
* manager to the immutable properties of the corresponding
* \endhtmlonly ProtocolInterface \htmlonly objects.</p>
*
* <div class="rationale">
* <p>Providing the immutable properties here means that
* when the API of Protocol objects has been finalized,
* most clients will only need one D-Bus round trip to interrogate
* the ConnectionManager about all its protocols.</p>
* </div>
*
* <p>If this map is empty or missing, clients SHOULD fall back to
* calling \endhtmlonly ListProtocols() \htmlonly and
* \endhtmlonly GetParameters() \htmlonly .</p>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyProtocols() const
{
return internalRequestProperty(QLatin1String("Protocols"));
}
/**
* Asynchronous getter for the remote object property \c Interfaces of type \c QStringList.
*
*
* \htmlonly
* <p>A list of the extra interfaces provided by this connection manager
* (i.e. extra functionality that can be provided even before a
* connection has been created).</p>
*
* <p>No interfaces suitable for listing in this property are currently
* defined; it's provided as a hook for possible future
* functionality.</p>
*
* <p>To be compatible with older connection managers, if retrieving
* this property fails, clients SHOULD assume that its value is
* an empty list.</p>
*
* <p>Connection managers with a non-empty list of Interfaces MUST
* represent them in the <code>.manager</code> file, if they have one,
* as an <code>Interfaces</code> key in the
* group headed <code>[ConnectionManager]</code>, whose value is a list
* of strings each followed by a semicolon.</p>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyInterfaces() const
{
return internalRequestProperty(QLatin1String("Interfaces"));
}
/**
* Request all of the DBus properties on the interface.
*
* \return A pending variant map which will emit finished when the properties have
* been retrieved.
*/
Tp::PendingVariantMap *requestAllProperties() const
{
return internalRequestAllProperties();
}
public Q_SLOTS:
/**
* Begins a call to the D-Bus method \c GetParameters on the remote object.
*
* Get a list of the parameters which may be specified in the Parameters
* of an Account (or, for specialised applications which do not use the
* account manager, passed to RequestConnection). Some parameters are
* mandatory, and some parameters only make sense when registering new
* accounts with the server; see the Param_Spec documentation for more
* details.
*
* Note that \a timeout is ignored as of now. It will be used once
* http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
*
*
* \param protocol
*
* The required protocol name
* \param timeout The timeout in milliseconds.
*
* \return
*
* \htmlonly
* An array of structs representing possible parameters.
* \endhtmlonly
*/
inline QDBusPendingReply<Tp::ParamSpecList> GetParameters(const QString& protocol, int timeout = -1)
{
if (!invalidationReason().isEmpty()) {
return QDBusPendingReply<Tp::ParamSpecList>(QDBusMessage::createError(
invalidationReason(),
invalidationMessage()
));
}
QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
this->staticInterfaceName(), QLatin1String("GetParameters"));
callMessage << QVariant::fromValue(protocol);
return this->connection().asyncCall(callMessage, timeout);
}
/**
* Begins a call to the D-Bus method \c ListProtocols on the remote object.
*
* Get a list of protocol identifiers that are implemented by this
* connection manager.
*
* Note that \a timeout is ignored as of now. It will be used once
* http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
*
* \param timeout The timeout in milliseconds.
*
* \return
*
* The keys of the Protocols map.
*/
inline QDBusPendingReply<QStringList> ListProtocols(int timeout = -1)
{
if (!invalidationReason().isEmpty()) {
return QDBusPendingReply<QStringList>(QDBusMessage::createError(
invalidationReason(),
invalidationMessage()
));
}
QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
this->staticInterfaceName(), QLatin1String("ListProtocols"));
return this->connection().asyncCall(callMessage, timeout);
}
/**
* Begins a call to the D-Bus method \c RequestConnection on the remote object.
*
* \htmlonly
* <p>Request a
* \endhtmlonly ConnectionInterface \htmlonly
* object representing a given account on a given
* protocol with the given parameters. The method returns the bus name
* and the object path where the new Connection object can be found,
* which should have the status of Connection_Status_Disconnected, to
* allow signal handlers to be attached before connecting is started
* with the
* \endhtmlonly ConnectionInterface::Connect() \htmlonly
* method.</p>
*
* <p><strong>Most applications should not use this method</strong>: they
* should instead use the the \endhtmlonly \link AccountInterface::requestPropertyConnection() AccountInterface::Connection \endlink \htmlonly property on an
* \endhtmlonly AccountInterface \htmlonly object obtained
* from the \endhtmlonly AccountManagerInterface \htmlonly . This method is used
* internally by the account manager to create connections when
* needed.</p>
*
* <p>The parameters which must and may be provided in the parameters
* dictionary can be discovered with the
* \endhtmlonly GetParameters() \htmlonly method. These
* parameters, their types, and their default values may be cached
* in files so that all available connection managers do not need to be
* started to discover which protocols are available.</p>
*
* <p>To request values for these parameters from the user, a client must
* have prior knowledge of the meaning of the parameter names, so the
* well-known names and types defined by the
* <tp:type>Connection_Parameter_Name</tp:type> type should be used where
* appropriate.</p>
*
* <p>Connection manager authors SHOULD avoid introducing parameters
* whose default values would not be serializable in a
* <code>.manager</code> file.</p>
*
* <div class="rationale">
* <p>The same serialization format is used in Mission Control
* to store accounts.</p>
* </div>
*
* <p>Every successful RequestConnection call will cause the emission of a
* \endhtmlonly NewConnection() \htmlonly signal for the same newly
* created connection. The
* requester can use the returned object path and service name
* independently of the emission of that signal. In that case this signal
* emission is most useful for, e.g. other processes that are monitoring
* the creation of new connections.</p>
* \endhtmlonly
*
* Note that \a timeout is ignored as of now. It will be used once
* http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
*
*
* \param protocol
*
* The protocol identifier
*
* \param parameters
*
* A dictionary mapping parameter names to values of the appropriate
* type, as indicated by GetParameters and the well-known list of
* names and value types documented on the Connection_Parameter_Name
* type.
* \param timeout The timeout in milliseconds.
*
* \return
*
* A D-Bus service name where the new Connection object can be found
*
* \return
*
* The D-Bus object path to the Connection on this service
*/
inline QDBusPendingReply<QString, QDBusObjectPath> RequestConnection(const QString& protocol, const QVariantMap& parameters, int timeout = -1)
{
if (!invalidationReason().isEmpty()) {
return QDBusPendingReply<QString, QDBusObjectPath>(QDBusMessage::createError(
invalidationReason(),
invalidationMessage()
));
}
QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
this->staticInterfaceName(), QLatin1String("RequestConnection"));
callMessage << QVariant::fromValue(protocol) << QVariant::fromValue(parameters);
return this->connection().asyncCall(callMessage, timeout);
}
Q_SIGNALS:
/**
* Represents the signal \c NewConnection on the remote object.
*
* Emitted when a new Connection object is created.
*
* \param busName
*
* The D-Bus service where the connection object can be found
*
* \param objectPath
*
* The object path of the Connection object on this service
*
* \param protocol
*
* The identifier for the protocol this connection uses
*/
void NewConnection(const QString& busName, const QDBusObjectPath& objectPath, const QString& protocol);
protected:
virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};
/**
* \class ProtocolInterface
* \headerfile TelepathyQt/connection-manager.h <TelepathyQt/ConnectionManager>
* \ingroup clientcm
*
* Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Protocol".
*/
class TP_QT_EXPORT ProtocolInterface : public Tp::AbstractInterface
{
Q_OBJECT
public:
/**
* Returns the name of the interface "org.freedesktop.Telepathy.Protocol", which this class
* represents.
*
* \return The D-Bus interface name.
*/
static inline QLatin1String staticInterfaceName()
{
return QLatin1String("org.freedesktop.Telepathy.Protocol");
}
/**
* Creates a ProtocolInterface associated with the given object on the session bus.
*
* \param busName Name of the service the object is on.
* \param objectPath Path to the object on the service.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterface(
const QString& busName,
const QString& objectPath,
QObject* parent = 0
);
/**
* Creates a ProtocolInterface associated with the given object on the given bus.
*
* \param connection The bus via which the object can be reached.
* \param busName Name of the service the object is on.
* \param objectPath Path to the object on the service.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterface(
const QDBusConnection& connection,
const QString& busName,
const QString& objectPath,
QObject* parent = 0
);
/**
* Creates a ProtocolInterface associated with the same object as the given proxy.
*
* \param proxy The proxy to use. It will also be the QObject::parent()
* for this object.
*/
ProtocolInterface(Tp::DBusProxy *proxy);
/**
* Creates a ProtocolInterface associated with the same object as the given proxy.
* Additionally, the created proxy will have the same parent as the given
* proxy.
*
* \param mainInterface The proxy to use.
*/
explicit ProtocolInterface(const Tp::Client::ConnectionManagerInterface& mainInterface);
/**
* Creates a ProtocolInterface associated with the same object as the given proxy.
* However, a different parent object can be specified.
*
* \param mainInterface The proxy to use.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterface(const Tp::Client::ConnectionManagerInterface& mainInterface, QObject* parent);
/**
* Asynchronous getter for the remote object property \c Interfaces of type \c QStringList.
*
*
* \htmlonly
* <p>A list of interfaces supported by this Protocol object.</p>
*
* <p>This property should not be confused with
* \endhtmlonly \link requestPropertyConnectionInterfaces() ConnectionInterfaces \endlink \htmlonly ,
* which refers to the interfaces of <em>connections</em> to this
* protocol.</p>
*
* <p>Connection managers with a <code>.manager</code> file
* (as described as part of the
* \endhtmlonly ConnectionManagerInterface \htmlonly interface) MUST cache this
* property in the protocol's section of the <code>.manager</code>
* file, using the key <code>Interfaces</code>. The corresponding value
* is a list of D-Bus interface names, each followed by a semicolon.</p>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyInterfaces() const
{
return internalRequestProperty(QLatin1String("Interfaces"));
}
/**
* Asynchronous getter for the remote object property \c Parameters of type \c Tp::ParamSpecList.
*
*
* \htmlonly
* <p>The parameters which may be specified in the
* \endhtmlonly \link AccountInterface::requestPropertyParameters() AccountInterface::Parameters \endlink \htmlonly of an
* \endhtmlonly AccountInterface \htmlonly (or, for
* specialised applications which do not use the account manager, passed
* to \endhtmlonly ConnectionManagerInterface::RequestConnection() \htmlonly ).
* Some parameters are mandatory, and some parameters only make sense
* when registering new accounts with the server; see the
* <tp:type>Param_Spec</tp:type> documentation for more details.</p>
*
* <p>Connection managers with a <code>.manager</code> file
* (as described as part of the
* \endhtmlonly ConnectionManagerInterface \htmlonly interface) MUST cache this
* property in the protocol's section of the <code>.manager</code>
* file via keys of the form <code>param-<em>p</em></code> and
* <code>default-<em>p</em></code>, as documented in the
* \endhtmlonly ConnectionManagerInterface \htmlonly interface.</p>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyParameters() const
{
return internalRequestProperty(QLatin1String("Parameters"));
}
/**
* Asynchronous getter for the remote object property \c ConnectionInterfaces of type \c QStringList.
*
*
* \htmlonly
* <p>A list of interface names which might be in the
* \endhtmlonly \link ConnectionInterface::requestPropertyInterfaces() ConnectionInterface::Interfaces \endlink \htmlonly property of a
* \endhtmlonly ConnectionInterface \htmlonly to this protocol. Whether a Connection
* will have all, some or none of these interfaces depends on server
* capabilities.</p>
*
* <p>This property should not be confused with
* \endhtmlonly \link requestPropertyInterfaces() Interfaces \endlink \htmlonly .</p>
*
* <p>Connection managers with a <code>.manager</code> file
* MUST cache this property in the protocol's section of the
* <code>.manager</code> file, using the key
* <code>ConnectionInterfaces</code>. The corresponding value
* is a list of D-Bus interface names, each followed by a semicolon.</p>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyConnectionInterfaces() const
{
return internalRequestProperty(QLatin1String("ConnectionInterfaces"));
}
/**
* Asynchronous getter for the remote object property \c RequestableChannelClasses of type \c Tp::RequestableChannelClassList.
*
*
* \htmlonly
* <p>A list of channel classes which might be requestable from a
* \endhtmlonly ConnectionInterface \htmlonly to this protocol (i.e. they will,
* or might, appear in the Connection's \endhtmlonly \link ConnectionInterfaceRequestsInterface::requestPropertyRequestableChannelClasses() ConnectionInterfaceRequestsInterface::RequestableChannelClasses \endlink \htmlonly property).</p>
*
* <p>Whether a Connection will have all, some or none of these
* requestable channel classes depends on server capabilities;
* similarly, individual contacts are not guaranteed to support
* all of these channel classes.</p>
*
* <p>Connection managers with a <code>.manager</code> file
* MUST cache this property in the protocol's section of the
* <code>.manager</code> file, using the key
* <code>RequestableChannelClasses</code>. The corresponding value
* is a list of opaque strings, each followed by a semicolon; each
* of those strings is the name of a group in the <code>.manager</code>
* file which represents a channel class.</p>
*
* <p>The names of the groups representing channel classes are not
* significant, and MUST NOT be interpreted. When writing
* <tt>.manager</tt> files, authors MAY choose mnemonic group names,
* generate group names mechanically (e.g. with an incrementing
* integer), or use some combination of these.</p>
*
* <p>Each group representing a channel class has a key
* <code>allowed</code> which is a list of D-Bus property names
* representing allowed parameters. Any other keys that do not contain
* a space MUST be ignored. Any key containing a space represents
* a fixed property; the key has the form
* "<code><em>propertyname</em> <em>type</em></code>", and the value
* is encoded in the same way as for the <code>default-<em>p</em></code>
* keys described in the \endhtmlonly ConnectionManagerInterface \htmlonly documentation.</p>
*
* <p>Connection managers that have channel classes whose fixed
* properties are not representable in this form SHOULD NOT have
* <code>.manager</code> files.</p>
*
* <p>For instance, this <code>.manager</code> file could represent
* a connection manager that supports 1-1 Text messages and
* StreamedMedia audio calls:</p>
*
* <pre>[Protocol jabber]
* param-account=s required
* param-password=s required
* RequestableChannelClasses=rcc0;rcc1;
*
* [rcc0]
* org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text
* org.freedesktop.Telepathy.Channel.TargetHandleType u=1
* allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
*
* [rcc1]
* org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamedMedia
* org.freedesktop.Telepathy.Channel.TargetHandleType u=1
* allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;org.freedesktop.Telepathy.Channel.Type.StreamedMedia.InitialAudio;
* </pre>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyRequestableChannelClasses() const
{
return internalRequestProperty(QLatin1String("RequestableChannelClasses"));
}
/**
* Asynchronous getter for the remote object property \c VCardField of type \c QString.
*
*
* \htmlonly
* <p>The name of the most common vCard field used for this protocol's
* contact identifiers, normalized to lower case, or the empty string
* if there is no such field.</p>
*
* <p>For example, this would be <code>x-jabber</code> for
* Jabber/XMPP (including Google Talk), or <code>tel</code> for
* the <abbr title="Public Switched Telephone Network">PSTN</abbr>.</p>
*
* <p>A more exhaustive list of addressable vCard fields can be found in
* the Protocol's Addressing interface's
* \endhtmlonly \link ProtocolInterfaceAddressingInterface::requestPropertyAddressableVCardFields() ProtocolInterfaceAddressingInterface::AddressableVCardFields \endlink \htmlonly .</p>
*
* <p>It is not necessarily valid to interpret contacts' identifiers
* as values of this vCard field. For instance, telepathy-sofiasip
* supports contacts whose identifiers are of the form
* sip:jenny@example.com or tel:8675309, which would not normally
* both be represented by any single vCard field. Arbitrary
* handles/identifiers as vCard fields are represented
* through the Connection's
* \endhtmlonly ConnectionInterfaceAddressingInterface \htmlonly
* contact attributes.</p>
*
* <div class="rationale">
* <p>This is taken from Mission Control profiles as used on Maemo 5.
* One valid use of this field is to answer the question: given a
* contact's vCard containing an X-JABBER field, how can you
* communicate with the contact? By iterating through protocols
* looking for an x-jabber VCardField, one can build up a list of
* protocols that handle x-jabber, then offer the user a list of
* accounts for those protocols and/or the option to create a new
* account for one of those protocols.</p>
* </div>
*
* <p>Connection managers with a <code>.manager</code> file
* MUST cache this property in the protocol's section of the
* <code>.manager</code> file if it is non-empty, using the key
* <code>VCardField</code>. The corresponding value
* is a string, following the syntax of the "localestring" type from
* the Desktop Entry Specification.</p>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyVCardField() const
{
return internalRequestProperty(QLatin1String("VCardField"));
}
/**
* Asynchronous getter for the remote object property \c EnglishName of type \c QString.
*
*
* \htmlonly
* <p>The name of the protocol in a form suitable for display to users,
* such as "AIM" or "Yahoo!", or the empty string if none is
* available.</p>
*
* <p>This is effectively in the C locale (international English);
* user interfaces requiring a localized protocol name SHOULD look
* one up in their own message catalog based on either the Telepathy
* <tp:type>Protocol</tp:type> name or this property, but SHOULD use
* this English version as a fallback if no translated version can be
* found.</p>
*
* <div class="rationale">
* <p>Many protocols are named after a company or product which isn't
* translated in non-English locales. This also provides a fallback
* display name, for UIs with no prior knowledge of a particular
* protocol.</p>
* </div>
*
* <p>If this property's value is empty, clients MAY fall back to using
* the Telepathy <tp:type>Protocol</tp:type> name, possibly with its
* capitalization adjusted.</p>
*
* <p>Connection managers with a <code>.manager</code> file
* MUST cache this property in the protocol's section of the
* <code>.manager</code> file if it is non-empty, using the key
* <code>EnglishName</code>. The corresponding value
* is a string, following the syntax of the "localestring" type from
* the Desktop Entry Specification.</p>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyEnglishName() const
{
return internalRequestProperty(QLatin1String("EnglishName"));
}
/**
* Asynchronous getter for the remote object property \c Icon of type \c QString.
*
*
* \htmlonly
* <p>The name of an icon in the system's icon theme, such as "im-msn", or
* the empty string.</p>
*
* <div class="rationale">
* <p>This can be used as a default if the \endhtmlonly \link AccountInterface::requestPropertyIcon() AccountInterface::Icon \endlink \htmlonly
* property is not set on an Account, or used by the \endhtmlonly AccountManagerInterface \htmlonly
* to choose a default icon if none is set during account
* creation.</p>
* </div>
*
* <p>If this property's value is empty, clients MAY fall back to
* generating a name based on the <tp:type>Protocol</tp:type> name.</p>
*
* <p>Connection managers with a <code>.manager</code> file
* MUST cache this property in the protocol's section of the
* <code>.manager</code> file if it is non-empty, using the key
* <code>Icon</code>. The corresponding value
* is a string, following the syntax of the "localestring" type from
* the Desktop Entry Specification.</p>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyIcon() const
{
return internalRequestProperty(QLatin1String("Icon"));
}
/**
* Asynchronous getter for the remote object property \c AuthenticationTypes of type \c QStringList.
*
*
* \htmlonly
* <p>A list of D-Bus interfaces which provide information as to
* what kind of authentication channels can possibly appear
* before the connection reaches the CONNECTED state.</p>
*
* <p>These can either be channel types, or where the channel
* type isn't enough information to be useful, interfaces
* indicating a specific use of a channel type. For example,
* \endhtmlonly ChannelTypeServerTLSConnectionInterface \htmlonly
* channels are obviously about TLS certificates so the channel
* type would appear in this list. However, a
* \endhtmlonly ChannelTypeServerAuthenticationInterface \htmlonly
* channel type alone does not explain enough about the authentication type
* in use as it is merely a base for the channel interfaces that appear in
* said channels. In this case, CMs should use the value of the
* \endhtmlonly \link ChannelTypeServerAuthenticationInterface::requestPropertyAuthenticationMethod() ChannelTypeServerAuthenticationInterface::AuthenticationMethod \endlink \htmlonly
* property in this list.</p>
*
* <p>For example, if a protocol's
* \endhtmlonly \link requestPropertyAuthenticationTypes() AuthenticationTypes \endlink \htmlonly contains
* two values:</p>
*
* <blockquote>
* <pre>
* [ ... \endhtmlonly ChannelTypeServerTLSConnectionInterface \htmlonly ,
* ... \endhtmlonly ChannelInterfaceSASLAuthenticationInterface \htmlonly ]</pre></blockquote>
*
* <p>This tells a client that before the connection status
* reached CONNECTED, a \endhtmlonly ChannelTypeServerTLSConnectionInterface \htmlonly
* could appear carrying a TLS certificate. It also tells the
* client that before the connection status reaches CONNECTED, a
* \endhtmlonly ChannelTypeServerAuthenticationInterface \htmlonly
* channel could also appear, where \endhtmlonly \link ChannelTypeServerAuthenticationInterface::requestPropertyAuthenticationMethod() ChannelTypeServerAuthenticationInterface::AuthenticationMethod \endlink \htmlonly = \endhtmlonly ChannelInterfaceSASLAuthenticationInterface \htmlonly . A
* hypothetical future Channel.Interface.Captcha interface would
* also appear in this list if the CM might require the user
* solve a captcha before connecting.</p>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyAuthenticationTypes() const
{
return internalRequestProperty(QLatin1String("AuthenticationTypes"));
}
/**
* Request all of the DBus properties on the interface.
*
* \return A pending variant map which will emit finished when the properties have
* been retrieved.
*/
Tp::PendingVariantMap *requestAllProperties() const
{
return internalRequestAllProperties();
}
public Q_SLOTS:
/**
* Begins a call to the D-Bus method \c IdentifyAccount on the remote object.
*
* \htmlonly
* <p>Return a string which uniquely identifies the account to which the
* given parameters would connect.</p>
*
* <div class="rationale">
* <p>For many protocols, this would return the well-known 'account'
* parameter. However, for IRC the returned string would be composed
* from the 'account' (i.e. nickname) and 'server' parameters.
* AccountManager implementations can use this to form the
* account-specific part of an Account's object path.</p>
* </div>
* \endhtmlonly
*
* Note that \a timeout is ignored as of now. It will be used once
* http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
*
*
* \param parameters
*
* A set of parameters as would be provided to RequestConnection
* \param timeout The timeout in milliseconds.
*
* \return
*
* An opaque string suitable for use as the account-specific part of
* an Account's object path. This is not necessarily globally
* unique, but should represent a "best-effort"
* identification of the account. For a pathological case, consider a
* user signing in as 'me@example.com' with
* 'server' set to either jabber1.example.com or
* jabber2.example.com. Both of these should result in me@example.com
* being returned from this method, even if the user can actually be
* signed in to those two servers simultaneously.
*/
inline QDBusPendingReply<QString> IdentifyAccount(const QVariantMap& parameters, int timeout = -1)
{
if (!invalidationReason().isEmpty()) {
return QDBusPendingReply<QString>(QDBusMessage::createError(
invalidationReason(),
invalidationMessage()
));
}
QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
this->staticInterfaceName(), QLatin1String("IdentifyAccount"));
callMessage << QVariant::fromValue(parameters);
return this->connection().asyncCall(callMessage, timeout);
}
/**
* Begins a call to the D-Bus method \c NormalizeContact on the remote object.
*
* \htmlonly
* <p>Attempt to normalize the given contact ID. Where possible, this
* SHOULD return the same thing that would be returned by
* InspectHandles(RequestHandles(CONTACT, [Contact_ID])) on a connected
* \endhtmlonly ConnectionInterface \htmlonly .</p>
*
* <p>If full normalization requires network activity or is otherwise
* impossible to do without a \endhtmlonly ConnectionInterface \htmlonly ,
* this method SHOULD perform a best-effort normalization.</p>
*
* <div class="rationale">
* <p>One common example of a best-effort offline normalization
* differing from the ideal normalization is XMPP.</p>
*
* <p>On XMPP, contacts' JIDs should normally have the resource removed
* during normalization, but for contacts in a MUC (chatroom), the
* resource is an integral part of the JID - so the contact JID
* alice@example.com/Empathy should normalize to alice@example.com,
* but the in-MUC JID wonderland@conference.example.com/Alice should
* normalize to itself.</p>
*
* <p>While online, the connection manager has enough context to know
* which chatrooms the user is in, and can infer from that whether
* to remove resources, but the best-effort normalization performed
* while offline does not have this context, so the best that can be
* done is to remove the resource from all JIDs.</p>
* </div>
*
* <p>This method MAY simply raise NotImplemented on some protocols.</p>
*
* <div class="rationale">
* <p>In link-local XMPP, you can't talk to someone who isn't present
* on your local network, so normalizing identifiers in advance is
* meaningless.</p>
* </div>
* \endhtmlonly
*
* Note that \a timeout is ignored as of now. It will be used once
* http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
*
*
* \param contactID
*
* The identifier of a contact in this protocol
* \param timeout The timeout in milliseconds.
*
* \return
*
* The identifier of a contact in this protocol, normalized as much as
* possible
*/
inline QDBusPendingReply<QString> NormalizeContact(const QString& contactID, int timeout = -1)
{
if (!invalidationReason().isEmpty()) {
return QDBusPendingReply<QString>(QDBusMessage::createError(
invalidationReason(),
invalidationMessage()
));
}
QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
this->staticInterfaceName(), QLatin1String("NormalizeContact"));
callMessage << QVariant::fromValue(contactID);
return this->connection().asyncCall(callMessage, timeout);
}
protected:
virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};
/**
* \class ProtocolInterfaceAddressingInterface
* \headerfile TelepathyQt/connection-manager.h <TelepathyQt/ConnectionManager>
* \ingroup clientcm
*
* Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Protocol.Interface.Addressing".
*/
class TP_QT_EXPORT ProtocolInterfaceAddressingInterface : public Tp::AbstractInterface
{
Q_OBJECT
public:
/**
* Returns the name of the interface "org.freedesktop.Telepathy.Protocol.Interface.Addressing", which this class
* represents.
*
* \return The D-Bus interface name.
*/
static inline QLatin1String staticInterfaceName()
{
return QLatin1String("org.freedesktop.Telepathy.Protocol.Interface.Addressing");
}
/**
* Creates a ProtocolInterfaceAddressingInterface associated with the given object on the session bus.
*
* \param busName Name of the service the object is on.
* \param objectPath Path to the object on the service.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterfaceAddressingInterface(
const QString& busName,
const QString& objectPath,
QObject* parent = 0
);
/**
* Creates a ProtocolInterfaceAddressingInterface associated with the given object on the given bus.
*
* \param connection The bus via which the object can be reached.
* \param busName Name of the service the object is on.
* \param objectPath Path to the object on the service.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterfaceAddressingInterface(
const QDBusConnection& connection,
const QString& busName,
const QString& objectPath,
QObject* parent = 0
);
/**
* Creates a ProtocolInterfaceAddressingInterface associated with the same object as the given proxy.
*
* \param proxy The proxy to use. It will also be the QObject::parent()
* for this object.
*/
ProtocolInterfaceAddressingInterface(Tp::DBusProxy *proxy);
/**
* Creates a ProtocolInterfaceAddressingInterface associated with the same object as the given proxy.
* Additionally, the created proxy will have the same parent as the given
* proxy.
*
* \param mainInterface The proxy to use.
*/
explicit ProtocolInterfaceAddressingInterface(const Tp::Client::ConnectionManagerInterface& mainInterface);
/**
* Creates a ProtocolInterfaceAddressingInterface associated with the same object as the given proxy.
* However, a different parent object can be specified.
*
* \param mainInterface The proxy to use.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterfaceAddressingInterface(const Tp::Client::ConnectionManagerInterface& mainInterface, QObject* parent);
/**
* Asynchronous getter for the remote object property \c AddressableVCardFields of type \c QStringList.
*
*
* \htmlonly
* <p>The vCard fields that can be used to request a contact with
* normalized to lower case. If the <code>URL</code> vCard
* field is addressable, a colon, followed by the supported URI
* schemes will be concatenated.</p>
*
* <p>For example: <code>["tel", "x-sip"]</code>.</p>
*
* <p>The <code>url</code> vCard field MUST NOT appear here; see
* \endhtmlonly \link requestPropertyAddressableURISchemes() AddressableURISchemes \endlink \htmlonly instead.</p>
*
* <div class="rationale">
* <p>In practice, protocols have a limited set of URI
* schemes that make sense to resolve as a contact.</p>
* </div>
*
* <p>Connection managers with a <code>.manager</code> file
* MUST cache this property in the protocol's section of the
* <code>.manager</code> file if it is non-empty, using the key
* <code>AddressableVCardFields</code>. The corresponding value
* is a list of strings, each followed with a semicolon and in the
* syntax of the "localestring" type from the Desktop Entry
* Specification.</p>
*
* <p>Well-known vCard fields:</p>
*
* <dl>
* <dt><code>tel</code></dt>
* <dd>The TEL vCard field. Used for phone numbers.</dd>
* <dt><code>x-sip</code></dt>
* <dd>The X-SIP vCard field. Used for SIP addresses.</dd>
* <dt><code>x-aim</code></dt>
* <dd>The X-AIM vCard field. Used for AIM user IDs.</dd>
* <dt><code>x-icq</code></dt>
* <dd>The X-ICQ vCard field. Used for ICQ UINs.</dd>
* <dt><code>x-skype</code></dt>
* <dd>The X-SKYPE vCard field. Used for Skype user names or
* telephone numbers. There is also a X-SKYPE-USERNAME field,
* but for Telepathy purposes, <code>x-skype</code> is preferred</dd>
* <dt><code>x-groupwise</code></dt>
* <dd>The X-GROUPWISE vCard field. Used for Groupwise contacts.</dd>
* <dt><code>x-gadugadu</code></dt>
* <dd>The X-GADUGADU vCard field. Used for Gadu-Gadu contacts.</dd>
* <dt><code>x-jabber</code></dt>
* <dd>The X-JABBER vCard field. Used for XMPP JIDs.</dd>
* <dt><code>x-msn</code></dt>
* <dd>The X-MSN vCard field. Used for MSN contacts.</dd>
* <dt><code>x-yahoo</code></dt>
* <dd>The X-YAHOO vCard field. Used for Yahoo! IDs.</dd>
* <dt><code>x-facebook-id</code></dt>
* <dd>Used for Facebook IDs in XMPP. If the user JID is
* "-12345@chat.facebook.com" then the x-facebook-id is "12345"</dd>
* </dl>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyAddressableVCardFields() const
{
return internalRequestProperty(QLatin1String("AddressableVCardFields"));
}
/**
* Asynchronous getter for the remote object property \c AddressableURISchemes of type \c QStringList.
*
*
* \htmlonly
* <p>The URI schemes that are supported by this protocol.</p>
*
* <p>For example: <code>["tel", "sip"]</code>.</p>
*
* <p>This property should only be used when the connection is
* offline. When it is connected the addressable URI schemes should be
* retrieved from the
* \endhtmlonly \link ConnectionInterfaceRequestsInterface::requestPropertyRequestableChannelClasses() ConnectionInterfaceRequestsInterface::RequestableChannelClasses \endlink \htmlonly 's
* TargetURIScheme fixed-property instead.</p>
*
* <p>Connection managers with a <code>.manager</code> file
* MUST cache this property in the protocol's section of the
* <code>.manager</code> file if it is non-empty, using the key
* <code>AddressableURISchemes</code>. The corresponding value
* is a list of strings, each followed with a semicolon and in the
* syntax of the "localestring" type from the Desktop Entry
* Specification.</p>
*
* <p>Well-known URI schemes:</p>
*
* <dl>
* <dt><code>sip</code></dt>
* <dd>SIP protocol.
* For example: <code>sip:julien@example.com</code>.</dd>
* <dt><code>sips</code></dt>
* <dd>Secure (encrypted) SIP protocol.
* For example: <code>sips:julien@example.com</code>.</dd>
* <dt><code>tel</code></dt>
* <dd>Used for telephone numbers.
* For example: <code>tel:+12065551234</code>.</dd>
* <dt><code>xmpp</code></dt>
* <dd>XMPP protocol.
* For example: <code>xmpp:julien@example.com</code>.</dd>
* <dt><code>msnim</code></dt>
* <dd>For the purposes of
* \endhtmlonly ProtocolInterfaceAddressingInterface \htmlonly ,
* \endhtmlonly ConnectionInterfaceAddressingInterface \htmlonly ,
* and
* \endhtmlonly org.freedesktop.Telepathy.Channel.Interface.Addressing1 \htmlonly ,
* the verb part is ignored, and SHOULD be <code>add</code>; the
* <code>contact</code> field in the query string is used to
* identify the contact.
* For example: <code>msnim:add?contact=julien</code>.</dd>
* <dt><code>aim</code></dt>
* <dd>For the purposes of
* \endhtmlonly ProtocolInterfaceAddressingInterface \htmlonly ,
* \endhtmlonly ConnectionInterfaceAddressingInterface \htmlonly ,
* and
* \endhtmlonly org.freedesktop.Telepathy.Channel.Interface.Addressing1 \htmlonly ,
* the verb part is ignored, and SHOULD be <code>addbuddy</code>; the
* <code>screenname</code> field in the query string is used to
* identify the contact.
* For example: <code>aim:addbuddy?screenname=julien</code>.</dd>
* <dt><code>skype</code></dt>
* <dd>Skype protocol.
* For example: <code>skype:julien</code>.</dd>
* <dt><code>ymsgr</code></dt>
* <dd>For the purposes of
* \endhtmlonly ProtocolInterfaceAddressingInterface \htmlonly ,
* \endhtmlonly ConnectionInterfaceAddressingInterface \htmlonly ,
* and
* \endhtmlonly org.freedesktop.Telepathy.Channel.Interface.Addressing1 \htmlonly ,
* the verb part is ignored, and SHOULD be <code>addfriend</code>; the
* query string is used to identify the contact.
* For example: <code>ymsgr:addfriend?julien</code>.</dd>
* <dt><code>gg</code></dt>
* <dd>Gadu-Gadu protocol.
* For example: <code>gg:julien</code>.</dd>
* </dl>
* \endhtmlonly
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyAddressableURISchemes() const
{
return internalRequestProperty(QLatin1String("AddressableURISchemes"));
}
/**
* Request all of the DBus properties on the interface.
*
* \return A pending variant map which will emit finished when the properties have
* been retrieved.
*/
Tp::PendingVariantMap *requestAllProperties() const
{
return internalRequestAllProperties();
}
public Q_SLOTS:
/**
* Begins a call to the D-Bus method \c NormalizeVCardAddress on the remote object.
*
* \htmlonly
* <p>Attempt to normalize the given vCard address. Where possible, this
* SHOULD return an address that would appear in the
* <code>org.freedesktop.Telepathy.Connection.Interface.Addressing1/addresses</code>
* attribute for a contact on a connected
* \endhtmlonly ConnectionInterface \htmlonly .
* </p>
*
* <p>If full normalization requires network activity or is otherwise
* impossible to do without a \endhtmlonly ConnectionInterface \htmlonly ,
* this method SHOULD perform a best-effort normalization.</p>
*
* <p>An example would be a vCard TEL field with a formatted
* number in the form of <code>+1 (206) 555 1234</code>, this would be
* normalized to <code>+12065551234</code>.</p>
*
* <p>This method MAY simply raise NotImplemented on some
* protocols, if it has no use.</p>
* \endhtmlonly
*
* Note that \a timeout is ignored as of now. It will be used once
* http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
*
*
* \param VCardField
*
* The vCard field of the address we are normalizing. The field name
* SHOULD be in lower case, and MUST appear in AddressableVCardFields.
*
* \param VCardAddress
*
* The address to normalize, which is assumed to belong to a contact
* (and not, for instance, a chatroom or server).
* \param timeout The timeout in milliseconds.
*
* \return
*
* The vCard address, normalized as much as possible.
*/
inline QDBusPendingReply<QString> NormalizeVCardAddress(const QString& VCardField, const QString& VCardAddress, int timeout = -1)
{
if (!invalidationReason().isEmpty()) {
return QDBusPendingReply<QString>(QDBusMessage::createError(
invalidationReason(),
invalidationMessage()
));
}
QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
this->staticInterfaceName(), QLatin1String("NormalizeVCardAddress"));
callMessage << QVariant::fromValue(VCardField) << QVariant::fromValue(VCardAddress);
return this->connection().asyncCall(callMessage, timeout);
}
/**
* Begins a call to the D-Bus method \c NormalizeContactURI on the remote object.
*
* \htmlonly
* <p>Attempt to normalize the given contact URI. Where possible, this
* SHOULD return an address that would appear in the
* <code>org.freedesktop.Telepathy.Connection.Interface.Addressing1/uris</code>
* attribute for a contact on a connected
* \endhtmlonly ConnectionInterface \htmlonly .
* </p>
*
* <p>If full normalization requires network activity or is otherwise
* impossible to do without a \endhtmlonly ConnectionInterface \htmlonly ,
* this method SHOULD perform a best-effort normalization.</p>
*
* <p>If the URI has extra information beyond what's necessary to
* identify a particular contact, such as an XMPP resource or an
* action to carry out, this extra information SHOULD be removed.
* If all URIs in a scheme contain a verb or action
* (like <code>aim</code>, <code>ymsgr</code> and
* <code>msnim</code> URIs), then the verb SHOULD be replaced
* with the one specified in
* \endhtmlonly \link requestPropertyAddressableURISchemes() AddressableURISchemes \endlink \htmlonly .</p>
*
* <div class="rationale">
* <p>This method is intended to normalize URIs stored in address
* books, for instance. In protocols like XMPP, if you
* vary the resource or action (query string), the URI still
* refers to the same high-level contact.</p>
* </div>
*
* <p>For instance,
* <code>xmpp:romeo@Example.Com/Empathy?message;body=Hello</code>
* would be normalized to <code>xmpp:romeo@example.com</code>,
* and <code>aim:goim?screenname=Romeo%20M&message=Hello</code>
* would be normalized to
* <code>aim:addbuddy?screenname=romeom</code>.</p>
*
* <p>This method MAY simply raise NotImplemented on some
* protocols, if it has no use.</p>
* \endhtmlonly
*
* Note that \a timeout is ignored as of now. It will be used once
* http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
*
*
* \param URI
*
* The URI to normalize, which is assumed to refer to a contact (as
* opposed to, for instance, a chatroom or a server). In some
* protocols, like XMPP, there is no way to tell whether a given URI
* refers to a contact or a chatroom by looking at its syntax. The
* URI's scheme (i.e. the part before the first colon) MUST
* appear in AddressableURISchemes.
* \param timeout The timeout in milliseconds.
*
* \return
*
* A URI, normalized as much as possible.
*/
inline QDBusPendingReply<QString> NormalizeContactURI(const QString& URI, int timeout = -1)
{
if (!invalidationReason().isEmpty()) {
return QDBusPendingReply<QString>(QDBusMessage::createError(
invalidationReason(),
invalidationMessage()
));
}
QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
this->staticInterfaceName(), QLatin1String("NormalizeContactURI"));
callMessage << QVariant::fromValue(URI);
return this->connection().asyncCall(callMessage, timeout);
}
protected:
virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};
/**
* \class ProtocolInterfaceAvatarsInterface
* \headerfile TelepathyQt/connection-manager.h <TelepathyQt/ConnectionManager>
* \ingroup clientcm
*
* Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Protocol.Interface.Avatars".
*/
class TP_QT_EXPORT ProtocolInterfaceAvatarsInterface : public Tp::AbstractInterface
{
Q_OBJECT
public:
/**
* Returns the name of the interface "org.freedesktop.Telepathy.Protocol.Interface.Avatars", which this class
* represents.
*
* \return The D-Bus interface name.
*/
static inline QLatin1String staticInterfaceName()
{
return QLatin1String("org.freedesktop.Telepathy.Protocol.Interface.Avatars");
}
/**
* Creates a ProtocolInterfaceAvatarsInterface associated with the given object on the session bus.
*
* \param busName Name of the service the object is on.
* \param objectPath Path to the object on the service.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterfaceAvatarsInterface(
const QString& busName,
const QString& objectPath,
QObject* parent = 0
);
/**
* Creates a ProtocolInterfaceAvatarsInterface associated with the given object on the given bus.
*
* \param connection The bus via which the object can be reached.
* \param busName Name of the service the object is on.
* \param objectPath Path to the object on the service.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterfaceAvatarsInterface(
const QDBusConnection& connection,
const QString& busName,
const QString& objectPath,
QObject* parent = 0
);
/**
* Creates a ProtocolInterfaceAvatarsInterface associated with the same object as the given proxy.
*
* \param proxy The proxy to use. It will also be the QObject::parent()
* for this object.
*/
ProtocolInterfaceAvatarsInterface(Tp::DBusProxy *proxy);
/**
* Creates a ProtocolInterfaceAvatarsInterface associated with the same object as the given proxy.
* Additionally, the created proxy will have the same parent as the given
* proxy.
*
* \param mainInterface The proxy to use.
*/
explicit ProtocolInterfaceAvatarsInterface(const Tp::Client::ConnectionManagerInterface& mainInterface);
/**
* Creates a ProtocolInterfaceAvatarsInterface associated with the same object as the given proxy.
* However, a different parent object can be specified.
*
* \param mainInterface The proxy to use.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterfaceAvatarsInterface(const Tp::Client::ConnectionManagerInterface& mainInterface, QObject* parent);
/**
* Asynchronous getter for the remote object property \c SupportedAvatarMIMETypes of type \c QStringList.
*
*
* The expected value of the
* Connection.Interface.Avatars.SupportedAvatarMIMETypes property on
* connections to this protocol.
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertySupportedAvatarMIMETypes() const
{
return internalRequestProperty(QLatin1String("SupportedAvatarMIMETypes"));
}
/**
* Asynchronous getter for the remote object property \c MinimumAvatarHeight of type \c uint.
*
*
* The expected value of the
* Connection.Interface.Avatars.MinimumAvatarHeight property on
* connections to this protocol.
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyMinimumAvatarHeight() const
{
return internalRequestProperty(QLatin1String("MinimumAvatarHeight"));
}
/**
* Asynchronous getter for the remote object property \c MinimumAvatarWidth of type \c uint.
*
*
* The expected value of the
* Connection.Interface.Avatars.MinimumAvatarWidth property on connections
* to this protocol.
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyMinimumAvatarWidth() const
{
return internalRequestProperty(QLatin1String("MinimumAvatarWidth"));
}
/**
* Asynchronous getter for the remote object property \c RecommendedAvatarHeight of type \c uint.
*
*
* The expected value of the
* Connection.Interface.Avatars.RecommendedAvatarHeight property on
* connections to this protocol.
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyRecommendedAvatarHeight() const
{
return internalRequestProperty(QLatin1String("RecommendedAvatarHeight"));
}
/**
* Asynchronous getter for the remote object property \c RecommendedAvatarWidth of type \c uint.
*
*
* The expected value of the
* Connection.Interface.Avatars.RecommendedAvatarWidth property on
* connections to this protocol.
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyRecommendedAvatarWidth() const
{
return internalRequestProperty(QLatin1String("RecommendedAvatarWidth"));
}
/**
* Asynchronous getter for the remote object property \c MaximumAvatarHeight of type \c uint.
*
*
* The expected value of the
* Connection.Interface.Avatars.MaximumAvatarHeight property on
* connections to this protocol.
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyMaximumAvatarHeight() const
{
return internalRequestProperty(QLatin1String("MaximumAvatarHeight"));
}
/**
* Asynchronous getter for the remote object property \c MaximumAvatarWidth of type \c uint.
*
*
* The expected value of the
* Connection.Interface.Avatars.MaximumAvatarWidth property on connections
* to this protocol.
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyMaximumAvatarWidth() const
{
return internalRequestProperty(QLatin1String("MaximumAvatarWidth"));
}
/**
* Asynchronous getter for the remote object property \c MaximumAvatarBytes of type \c uint.
*
*
* The expected value of the
* Connection.Interface.Avatars.MaximumAvatarBytes property on connections
* to this protocol.
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyMaximumAvatarBytes() const
{
return internalRequestProperty(QLatin1String("MaximumAvatarBytes"));
}
/**
* Request all of the DBus properties on the interface.
*
* \return A pending variant map which will emit finished when the properties have
* been retrieved.
*/
Tp::PendingVariantMap *requestAllProperties() const
{
return internalRequestAllProperties();
}
protected:
virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};
/**
* \class ProtocolInterfacePresenceInterface
* \headerfile TelepathyQt/connection-manager.h <TelepathyQt/ConnectionManager>
* \ingroup clientcm
*
* Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Protocol.Interface.Presence".
*/
class TP_QT_EXPORT ProtocolInterfacePresenceInterface : public Tp::AbstractInterface
{
Q_OBJECT
public:
/**
* Returns the name of the interface "org.freedesktop.Telepathy.Protocol.Interface.Presence", which this class
* represents.
*
* \return The D-Bus interface name.
*/
static inline QLatin1String staticInterfaceName()
{
return QLatin1String("org.freedesktop.Telepathy.Protocol.Interface.Presence");
}
/**
* Creates a ProtocolInterfacePresenceInterface associated with the given object on the session bus.
*
* \param busName Name of the service the object is on.
* \param objectPath Path to the object on the service.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterfacePresenceInterface(
const QString& busName,
const QString& objectPath,
QObject* parent = 0
);
/**
* Creates a ProtocolInterfacePresenceInterface associated with the given object on the given bus.
*
* \param connection The bus via which the object can be reached.
* \param busName Name of the service the object is on.
* \param objectPath Path to the object on the service.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterfacePresenceInterface(
const QDBusConnection& connection,
const QString& busName,
const QString& objectPath,
QObject* parent = 0
);
/**
* Creates a ProtocolInterfacePresenceInterface associated with the same object as the given proxy.
*
* \param proxy The proxy to use. It will also be the QObject::parent()
* for this object.
*/
ProtocolInterfacePresenceInterface(Tp::DBusProxy *proxy);
/**
* Creates a ProtocolInterfacePresenceInterface associated with the same object as the given proxy.
* Additionally, the created proxy will have the same parent as the given
* proxy.
*
* \param mainInterface The proxy to use.
*/
explicit ProtocolInterfacePresenceInterface(const Tp::Client::ConnectionManagerInterface& mainInterface);
/**
* Creates a ProtocolInterfacePresenceInterface associated with the same object as the given proxy.
* However, a different parent object can be specified.
*
* \param mainInterface The proxy to use.
* \param parent Passed to the parent class constructor.
*/
ProtocolInterfacePresenceInterface(const Tp::Client::ConnectionManagerInterface& mainInterface, QObject* parent);
/**
* Asynchronous getter for the remote object property \c Statuses of type \c Tp::SimpleStatusSpecMap.
*
*
* The statuses that might appear in the
* Connection.Interface.SimplePresence.Statuses property on a connection
* to this protocol that supports SimplePresence. This property is
* immutable. Depending on server capabilities, it is possible that not
* all of these will actually appear on the Connection.
*
* \return A pending variant which will emit finished when the property has been
* retrieved.
*/
inline Tp::PendingVariant *requestPropertyStatuses() const
{
return internalRequestProperty(QLatin1String("Statuses"));
}
/**
* Request all of the DBus properties on the interface.
*
* \return A pending variant map which will emit finished when the properties have
* been retrieved.
*/
Tp::PendingVariantMap *requestAllProperties() const
{
return internalRequestAllProperties();
}
protected:
virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};
}
}
Q_DECLARE_METATYPE(Tp::Client::ConnectionManagerInterface*)
Q_DECLARE_METATYPE(Tp::Client::ProtocolInterface*)
Q_DECLARE_METATYPE(Tp::Client::ProtocolInterfaceAddressingInterface*)
Q_DECLARE_METATYPE(Tp::Client::ProtocolInterfaceAvatarsInterface*)
Q_DECLARE_METATYPE(Tp::Client::ProtocolInterfacePresenceInterface*)
|