Mercurial > pidgin.yaz
comparison libpurple/request.h @ 21234:aabe638f56d9
Wrap the newly deprecated functions with #ifndef PURPLE_DISABLE_DEPRECATED.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 14 Oct 2007 03:14:43 +0000 |
parents | 110f23ef3542 |
children | fba1f6c3df0b 998cf5d0b401 |
comparison
equal
deleted
inserted
replaced
21233:110f23ef3542 | 21234:aabe638f56d9 |
---|---|
1313 const char *ok_text, GCallback ok_cb, | 1313 const char *ok_text, GCallback ok_cb, |
1314 const char *cancel_text, GCallback cancel_cb, | 1314 const char *cancel_text, GCallback cancel_cb, |
1315 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1315 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1316 const char *ui_hint, void *user_data); | 1316 const char *ui_hint, void *user_data); |
1317 | 1317 |
1318 #ifndef PURPLE_DISABLE_DEPRECATED | |
1318 /** | 1319 /** |
1319 * Prompts the user for text input. | 1320 * Prompts the user for text input. |
1320 * | 1321 * |
1321 * @param handle The plugin or connection handle. For some | 1322 * @param handle The plugin or connection handle. For some |
1322 * things this is EXTREMELY important. The | 1323 * things this is EXTREMELY important. The |
1360 gboolean multiline, gboolean masked, gchar *hint, | 1361 gboolean multiline, gboolean masked, gchar *hint, |
1361 const char *ok_text, GCallback ok_cb, | 1362 const char *ok_text, GCallback ok_cb, |
1362 const char *cancel_text, GCallback cancel_cb, | 1363 const char *cancel_text, GCallback cancel_cb, |
1363 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1364 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1364 void *user_data); | 1365 void *user_data); |
1366 #endif | |
1365 | 1367 |
1366 /** | 1368 /** |
1367 * Prompts the user for multiple-choice input. | 1369 * Prompts the user for multiple-choice input. |
1368 * | 1370 * |
1369 * @param handle The plugin or connection handle. For some | 1371 * @param handle The plugin or connection handle. For some |
1395 const char *ok_text, GCallback ok_cb, | 1397 const char *ok_text, GCallback ok_cb, |
1396 const char *cancel_text, GCallback cancel_cb, | 1398 const char *cancel_text, GCallback cancel_cb, |
1397 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1399 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1398 const char *ui_hint, void *user_data, ...) G_GNUC_NULL_TERMINATED; | 1400 const char *ui_hint, void *user_data, ...) G_GNUC_NULL_TERMINATED; |
1399 | 1401 |
1402 #ifndef PURPLE_DISABLE_DEPRECATED | |
1400 /** | 1403 /** |
1401 * Prompts the user for multiple-choice input. | 1404 * Prompts the user for multiple-choice input. |
1402 * | 1405 * |
1403 * @param handle The plugin or connection handle. For some | 1406 * @param handle The plugin or connection handle. For some |
1404 * things this is EXTREMELY important. See | 1407 * things this is EXTREMELY important. See |
1428 int default_value, | 1431 int default_value, |
1429 const char *ok_text, GCallback ok_cb, | 1432 const char *ok_text, GCallback ok_cb, |
1430 const char *cancel_text, GCallback cancel_cb, | 1433 const char *cancel_text, GCallback cancel_cb, |
1431 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1434 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1432 void *user_data, ...) G_GNUC_NULL_TERMINATED; | 1435 void *user_data, ...) G_GNUC_NULL_TERMINATED; |
1436 #endif | |
1433 | 1437 |
1434 /** | 1438 /** |
1435 * Prompts the user for multiple-choice input. | 1439 * Prompts the user for multiple-choice input. |
1436 * | 1440 * |
1437 * @param handle The plugin or connection handle. For some | 1441 * @param handle The plugin or connection handle. For some |
1463 const char *ok_text, GCallback ok_cb, | 1467 const char *ok_text, GCallback ok_cb, |
1464 const char *cancel_text, GCallback cancel_cb, | 1468 const char *cancel_text, GCallback cancel_cb, |
1465 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1469 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1466 const char *ui_hint, void *user_data, va_list choices); | 1470 const char *ui_hint, void *user_data, va_list choices); |
1467 | 1471 |
1472 #ifndef PURPLE_DISABLE_DEPRECATED | |
1468 /** | 1473 /** |
1469 * Prompts the user for multiple-choice input. | 1474 * Prompts the user for multiple-choice input. |
1470 * | 1475 * |
1471 * @param handle The plugin or connection handle. For some | 1476 * @param handle The plugin or connection handle. For some |
1472 * things this is EXTREMELY important. See | 1477 * things this is EXTREMELY important. See |
1496 int default_value, | 1501 int default_value, |
1497 const char *ok_text, GCallback ok_cb, | 1502 const char *ok_text, GCallback ok_cb, |
1498 const char *cancel_text, GCallback cancel_cb, | 1503 const char *cancel_text, GCallback cancel_cb, |
1499 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1504 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1500 void *user_data, va_list choices); | 1505 void *user_data, va_list choices); |
1506 #endif | |
1501 | 1507 |
1502 /** | 1508 /** |
1503 * Prompts the user for an action. | 1509 * Prompts the user for an action. |
1504 * | 1510 * |
1505 * This is often represented as a dialog with a button for each action. | 1511 * This is often represented as a dialog with a button for each action. |
1533 const char *primary, const char *secondary, | 1539 const char *primary, const char *secondary, |
1534 int default_action, | 1540 int default_action, |
1535 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1541 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1536 const char *ui_hint, void *user_data, size_t action_count, ...); | 1542 const char *ui_hint, void *user_data, size_t action_count, ...); |
1537 | 1543 |
1544 #ifndef PURPLE_DISABLE_DEPRECATED | |
1538 /** | 1545 /** |
1539 * Prompts the user for an action. | 1546 * Prompts the user for an action. |
1540 * | 1547 * |
1541 * This is often represented as a dialog with a button for each action. | 1548 * This is often represented as a dialog with a button for each action. |
1542 * | 1549 * |
1568 void *purple_request_action(void *handle, const char *title, | 1575 void *purple_request_action(void *handle, const char *title, |
1569 const char *primary, const char *secondary, | 1576 const char *primary, const char *secondary, |
1570 int default_action, | 1577 int default_action, |
1571 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1578 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1572 void *user_data, size_t action_count, ...); | 1579 void *user_data, size_t action_count, ...); |
1580 #endif | |
1573 | 1581 |
1574 /** | 1582 /** |
1575 * Prompts the user for an action. | 1583 * Prompts the user for an action. |
1576 * | 1584 * |
1577 * This is often represented as a dialog with a button for each action. | 1585 * This is often represented as a dialog with a button for each action. |
1600 int default_action, | 1608 int default_action, |
1601 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1609 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1602 const char *ui_hint, void *user_data, size_t action_count, | 1610 const char *ui_hint, void *user_data, size_t action_count, |
1603 va_list actions); | 1611 va_list actions); |
1604 | 1612 |
1613 #ifndef PURPLE_DISABLE_DEPRECATED | |
1605 /** | 1614 /** |
1606 * Prompts the user for an action. | 1615 * Prompts the user for an action. |
1607 * | 1616 * |
1608 * This is often represented as a dialog with a button for each action. | 1617 * This is often represented as a dialog with a button for each action. |
1609 * | 1618 * |
1630 const char *primary, const char *secondary, | 1639 const char *primary, const char *secondary, |
1631 int default_action, | 1640 int default_action, |
1632 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1641 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1633 void *user_data, size_t action_count, | 1642 void *user_data, size_t action_count, |
1634 va_list actions); | 1643 va_list actions); |
1644 #endif | |
1635 | 1645 |
1636 /** | 1646 /** |
1637 * Displays groups of fields for the user to fill in. | 1647 * Displays groups of fields for the user to fill in. |
1638 * | 1648 * |
1639 * @param handle The plugin or connection handle. For some | 1649 * @param handle The plugin or connection handle. For some |
1663 const char *ok_text, GCallback ok_cb, | 1673 const char *ok_text, GCallback ok_cb, |
1664 const char *cancel_text, GCallback cancel_cb, | 1674 const char *cancel_text, GCallback cancel_cb, |
1665 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1675 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1666 const char *ui_hint, void *user_data); | 1676 const char *ui_hint, void *user_data); |
1667 | 1677 |
1678 #ifndef PURPLE_DISABLE_DEPRECATED | |
1668 /** | 1679 /** |
1669 * Displays groups of fields for the user to fill in. | 1680 * Displays groups of fields for the user to fill in. |
1670 * | 1681 * |
1671 * @param handle The plugin or connection handle. For some | 1682 * @param handle The plugin or connection handle. For some |
1672 * things this is EXTREMELY important. See | 1683 * things this is EXTREMELY important. See |
1694 PurpleRequestFields *fields, | 1705 PurpleRequestFields *fields, |
1695 const char *ok_text, GCallback ok_cb, | 1706 const char *ok_text, GCallback ok_cb, |
1696 const char *cancel_text, GCallback cancel_cb, | 1707 const char *cancel_text, GCallback cancel_cb, |
1697 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1708 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1698 void *user_data); | 1709 void *user_data); |
1710 #endif | |
1699 | 1711 |
1700 /** | 1712 /** |
1701 * Closes a request. | 1713 * Closes a request. |
1702 * | 1714 * |
1703 * @param type The request type. | 1715 * @param type The request type. |
1722 ui_hint, user_data, yes_cb, no_cb) \ | 1734 ui_hint, user_data, yes_cb, no_cb) \ |
1723 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ | 1735 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ |
1724 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ | 1736 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ |
1725 _("_Yes"), (yes_cb), _("_No"), (no_cb)) | 1737 _("_Yes"), (yes_cb), _("_No"), (no_cb)) |
1726 | 1738 |
1739 #ifndef PURPLE_DISABLE_DEPRECATED | |
1727 /** | 1740 /** |
1728 * A wrapper for purple_request_action() that uses @c Yes and @c No buttons. | 1741 * A wrapper for purple_request_action() that uses @c Yes and @c No buttons. |
1729 * | 1742 * |
1730 * @deprecated Please use purple_request_yes_no_with_hint instead. | 1743 * @deprecated Please use purple_request_yes_no_with_hint instead. |
1731 */ | 1744 */ |
1733 default_action, account, who, conv, \ | 1746 default_action, account, who, conv, \ |
1734 user_data, yes_cb, no_cb) \ | 1747 user_data, yes_cb, no_cb) \ |
1735 purple_request_action((handle), (title), (primary), (secondary), \ | 1748 purple_request_action((handle), (title), (primary), (secondary), \ |
1736 (default_action), account, who, conv, (user_data), 2, \ | 1749 (default_action), account, who, conv, (user_data), 2, \ |
1737 _("_Yes"), (yes_cb), _("_No"), (no_cb)) | 1750 _("_Yes"), (yes_cb), _("_No"), (no_cb)) |
1751 #endif | |
1738 | 1752 |
1739 /** | 1753 /** |
1740 * A wrapper for purple_request_action() that uses @c OK and @c Cancel buttons. | 1754 * A wrapper for purple_request_action() that uses @c OK and @c Cancel buttons. |
1741 * | 1755 * |
1742 * @since 2.3.0 | 1756 * @since 2.3.0 |
1746 ui_hint, user_data, ok_cb, cancel_cb) \ | 1760 ui_hint, user_data, ok_cb, cancel_cb) \ |
1747 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ | 1761 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ |
1748 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ | 1762 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ |
1749 _("_OK"), (ok_cb), _("_Cancel"), (cancel_cb)) | 1763 _("_OK"), (ok_cb), _("_Cancel"), (cancel_cb)) |
1750 | 1764 |
1765 #ifndef PURPLE_DISABLE_DEPRECATED | |
1751 /** | 1766 /** |
1752 * A wrapper for purple_request_action() that uses @c OK and @c Cancel buttons. | 1767 * A wrapper for purple_request_action() that uses @c OK and @c Cancel buttons. |
1753 * | 1768 * |
1754 * @deprecated Please use purple_request_ok_cancel_with_hint instead. | 1769 * @deprecated Please use purple_request_ok_cancel_with_hint instead. |
1755 */ | 1770 */ |
1757 default_action, account, who, conv, \ | 1772 default_action, account, who, conv, \ |
1758 user_data, ok_cb, cancel_cb) \ | 1773 user_data, ok_cb, cancel_cb) \ |
1759 purple_request_action((handle), (title), (primary), (secondary), \ | 1774 purple_request_action((handle), (title), (primary), (secondary), \ |
1760 (default_action), account, who, conv, (user_data), 2, \ | 1775 (default_action), account, who, conv, (user_data), 2, \ |
1761 _("_OK"), (ok_cb), _("_Cancel"), (cancel_cb)) | 1776 _("_OK"), (ok_cb), _("_Cancel"), (cancel_cb)) |
1777 #endif | |
1762 | 1778 |
1763 /** | 1779 /** |
1764 * A wrapper for purple_request_action() that uses Accept and Cancel buttons. | 1780 * A wrapper for purple_request_action() that uses Accept and Cancel buttons. |
1765 * | 1781 * |
1766 * @since 2.3.0 | 1782 * @since 2.3.0 |
1770 ui_hint, user_data, accept_cb, cancel_cb) \ | 1786 ui_hint, user_data, accept_cb, cancel_cb) \ |
1771 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ | 1787 purple_request_action_with_hint((handle), (title), (primary), (secondary), \ |
1772 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ | 1788 (default_action), account, who, conv, (ui_hint), (user_data), 2, \ |
1773 _("_Accept"), (accept_cb), _("_Cancel"), (cancel_cb)) | 1789 _("_Accept"), (accept_cb), _("_Cancel"), (cancel_cb)) |
1774 | 1790 |
1791 #ifndef PURPLE_DISABLE_DEPRECATED | |
1775 /** | 1792 /** |
1776 * A wrapper for purple_request_action() that uses Accept and Cancel buttons. | 1793 * A wrapper for purple_request_action() that uses Accept and Cancel buttons. |
1777 * | 1794 * |
1778 * @deprecated Please use purple_request_accept_cancel_with_hint instead. | 1795 * @deprecated Please use purple_request_accept_cancel_with_hint instead. |
1779 */ | 1796 */ |
1781 default_action, account, who, conv, \ | 1798 default_action, account, who, conv, \ |
1782 user_data, accept_cb, cancel_cb) \ | 1799 user_data, accept_cb, cancel_cb) \ |
1783 purple_request_action((handle), (title), (primary), (secondary), \ | 1800 purple_request_action((handle), (title), (primary), (secondary), \ |
1784 (default_action), account, who, conv, (user_data), 2, \ | 1801 (default_action), account, who, conv, (user_data), 2, \ |
1785 _("_Accept"), (accept_cb), _("_Cancel"), (cancel_cb)) | 1802 _("_Accept"), (accept_cb), _("_Cancel"), (cancel_cb)) |
1803 #endif | |
1786 | 1804 |
1787 /** | 1805 /** |
1788 * Displays a file selector request dialog. Returns the selected filename to | 1806 * Displays a file selector request dialog. Returns the selected filename to |
1789 * the callback. Can be used for either opening a file or saving a file. | 1807 * the callback. Can be used for either opening a file or saving a file. |
1790 * | 1808 * |
1811 gboolean savedialog, | 1829 gboolean savedialog, |
1812 GCallback ok_cb, GCallback cancel_cb, | 1830 GCallback ok_cb, GCallback cancel_cb, |
1813 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1831 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1814 const char *ui_hint, void *user_data); | 1832 const char *ui_hint, void *user_data); |
1815 | 1833 |
1834 #ifndef PURPLE_DISABLE_DEPRECATED | |
1816 /** | 1835 /** |
1817 * Displays a file selector request dialog. Returns the selected filename to | 1836 * Displays a file selector request dialog. Returns the selected filename to |
1818 * the callback. Can be used for either opening a file or saving a file. | 1837 * the callback. Can be used for either opening a file or saving a file. |
1819 * | 1838 * |
1820 * @param handle The plugin or connection handle. For some | 1839 * @param handle The plugin or connection handle. For some |
1839 void *purple_request_file(void *handle, const char *title, const char *filename, | 1858 void *purple_request_file(void *handle, const char *title, const char *filename, |
1840 gboolean savedialog, | 1859 gboolean savedialog, |
1841 GCallback ok_cb, GCallback cancel_cb, | 1860 GCallback ok_cb, GCallback cancel_cb, |
1842 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1861 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1843 void *user_data); | 1862 void *user_data); |
1863 #endif | |
1844 | 1864 |
1845 /** | 1865 /** |
1846 * Displays a folder select dialog. Returns the selected filename to | 1866 * Displays a folder select dialog. Returns the selected filename to |
1847 * the callback. | 1867 * the callback. |
1848 * | 1868 * |
1866 void *purple_request_folder_with_hint(void *handle, const char *title, const char *dirname, | 1886 void *purple_request_folder_with_hint(void *handle, const char *title, const char *dirname, |
1867 GCallback ok_cb, GCallback cancel_cb, | 1887 GCallback ok_cb, GCallback cancel_cb, |
1868 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1888 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1869 const char *ui_hint, void *user_data); | 1889 const char *ui_hint, void *user_data); |
1870 | 1890 |
1891 #ifndef PURPLE_DISABLE_DEPRECATED | |
1871 /** | 1892 /** |
1872 * Displays a folder select dialog. Returns the selected filename to | 1893 * Displays a folder select dialog. Returns the selected filename to |
1873 * the callback. | 1894 * the callback. |
1874 * | 1895 * |
1875 * @param handle The plugin or connection handle. For some | 1896 * @param handle The plugin or connection handle. For some |
1891 */ | 1912 */ |
1892 void *purple_request_folder(void *handle, const char *title, const char *dirname, | 1913 void *purple_request_folder(void *handle, const char *title, const char *dirname, |
1893 GCallback ok_cb, GCallback cancel_cb, | 1914 GCallback ok_cb, GCallback cancel_cb, |
1894 PurpleAccount *account, const char *who, PurpleConversation *conv, | 1915 PurpleAccount *account, const char *who, PurpleConversation *conv, |
1895 void *user_data); | 1916 void *user_data); |
1917 #endif | |
1896 | 1918 |
1897 /*@}*/ | 1919 /*@}*/ |
1898 | 1920 |
1899 /**************************************************************************/ | 1921 /**************************************************************************/ |
1900 /** @name UI Registration Functions */ | 1922 /** @name UI Registration Functions */ |