libwbclient: doxygen: mark wbcSetGidHwm deprecated
[samba.git] / nsswitch / libwbclient / wbclient.h
index 0c0c4949250c17d5f2d40d94c712b82a2b13421f..bd5a51ccaa6a2ab561806b2511cc5d23a164589b 100644 (file)
@@ -4,6 +4,7 @@
    Winbind client API
 
    Copyright (C) Gerald (Jerry) Carter 2007
+   Copyright (C) Volker Lendecke 2009
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -63,9 +64,11 @@ const char *wbcErrorString(wbcErr error);
  *  0.3: Added wbcGetpwsid()
  *      Added wbcGetSidAliases()
  *  0.4: Added wbcSidTypeString()
+ *  0.5: Added wbcChangeTrustCredentials()
+ *  0.6: Made struct wbcInterfaceDetails char* members non-const
  **/
 #define WBCLIENT_MAJOR_VERSION 0
-#define WBCLIENT_MINOR_VERSION 4
+#define WBCLIENT_MINOR_VERSION 6
 #define WBCLIENT_VENDOR_VERSION "Samba libwbclient"
 struct wbcLibraryDetails {
        uint16_t major_version;
@@ -79,11 +82,11 @@ struct wbcLibraryDetails {
  **/
 struct wbcInterfaceDetails {
        uint32_t interface_version;
-       const char *winbind_version;
+       char *winbind_version;
        char winbind_separator;
-       const char *netbios_name;
-       const char *netbios_domain;
-       const char *dns_domain;
+       char *netbios_name;
+       char *netbios_domain;
+       char *dns_domain;
 };
 
 /*
@@ -189,7 +192,6 @@ struct wbcDomainInfo {
 #define WBC_DOMINFO_TRUSTTYPE_IN_FOREST  0x00000002
 #define WBC_DOMINFO_TRUSTTYPE_EXTERNAL   0x00000003
 
-
 /**
  * @brief Auth User Parameters
  **/
@@ -791,6 +793,9 @@ wbcErr wbcAllocateGid(gid_t *pgid);
  * @param *sid      Pointer to the sid of the diresired mapping.
  *
  * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
  **/
 wbcErr wbcSetUidMapping(uid_t uid, const struct wbcDomainSid *sid);
 
@@ -801,6 +806,9 @@ wbcErr wbcSetUidMapping(uid_t uid, const struct wbcDomainSid *sid);
  * @param *sid      Pointer to the sid of the diresired mapping.
  *
  * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
  **/
 wbcErr wbcSetGidMapping(gid_t gid, const struct wbcDomainSid *sid);
 
@@ -811,6 +819,9 @@ wbcErr wbcSetGidMapping(gid_t gid, const struct wbcDomainSid *sid);
  * @param *sid      Pointer to the sid of the mapping to remove.
  *
  * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
  **/
 wbcErr wbcRemoveUidMapping(uid_t uid, const struct wbcDomainSid *sid);
 
@@ -821,6 +832,9 @@ wbcErr wbcRemoveUidMapping(uid_t uid, const struct wbcDomainSid *sid);
  * @param *sid      Pointer to the sid of the mapping to remove.
  *
  * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
  **/
 wbcErr wbcRemoveGidMapping(gid_t gid, const struct wbcDomainSid *sid);
 
@@ -830,6 +844,9 @@ wbcErr wbcRemoveGidMapping(gid_t gid, const struct wbcDomainSid *sid);
  * @param uid_hwm      The new uid highwater mark value
  *
  * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
  **/
 wbcErr wbcSetUidHwm(uid_t uid_hwm);
 
@@ -839,6 +856,9 @@ wbcErr wbcSetUidHwm(uid_t uid_hwm);
  * @param gid_hwm      The new gid highwater mark value
  *
  * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
  **/
 wbcErr wbcSetGidHwm(gid_t gid_hwm);
 
@@ -979,13 +999,28 @@ wbcErr wbcGetGroups(const char *account,
 /**
  * @brief Lookup the current status of a trusted domain
  *
- * @param domain      Domain to query
- * @param *info       Pointer to returned domain_info struct
+ * @param domain        The domain to query
+ *
+ * @param dinfo          A pointer to store the returned domain_info struct.
  *
  * @return #wbcErr
  **/
 wbcErr wbcDomainInfo(const char *domain,
-                    struct wbcDomainInfo **info);
+                    struct wbcDomainInfo **dinfo);
+
+/**
+ * @brief Lookup the currently contacted DCs
+ *
+ * @param domain        The domain to query
+ *
+ * @param num_dcs       Number of DCs currently known
+ * @param dc_names      Names of the currently known DCs
+ * @param dc_ips        IP addresses of the currently known DCs
+ *
+ * @return #wbcErr
+ **/
+wbcErr wbcDcInfo(const char *domain, size_t *num_dcs,
+                const char ***dc_names, const char ***dc_ips);
 
 /**
  * @brief Enumerate the domain trusts known by Winbind
@@ -1162,6 +1197,16 @@ wbcErr wbcCredentialCache(struct wbcCredentialCacheParams *params,
                           struct wbcCredentialCacheInfo **info,
                           struct wbcAuthErrorInfo **error);
 
+/**
+ * @brief Save a password with winbind for doing wbcCredentialCache() later
+ *
+ * @param *user             Username
+ * @param *password  Password
+ *
+ * @return #wbcErr
+ **/
+wbcErr wbcCredentialSave(const char *user, const char *password);
+
 /**********************************************************
  * Resolve functions
  **********************************************************/
@@ -1213,6 +1258,19 @@ wbcErr wbcCheckTrustCredentials(const char *domain,
 wbcErr wbcChangeTrustCredentials(const char *domain,
                                 struct wbcAuthErrorInfo **error);
 
+/**
+ * @brief Trigger a no-op call through the NETLOGON pipe. Low-cost
+ *        version of wbcCheckTrustCredentials
+ *
+ * @param *domain      The name of the domain, only NULL for the default domain is
+ *                     supported yet. Other values than NULL will result in
+ *                     WBC_ERR_NOT_IMPLEMENTED.
+ * @param error        Output details on WBC_ERR_AUTH_ERROR
+ *
+ * @return #wbcErr
+ **/
+wbcErr wbcPingDc(const char *domain, struct wbcAuthErrorInfo **error);
+
 /**********************************************************
  * Helper functions
  **********************************************************/