KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/share/devhelp/books/dbus/api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/devhelp/books/dbus/api/dbus-marshal-validate_8h-source.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>D-Bus: dbus-marshal-validate.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<h1>dbus-marshal-validate.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */</span>
<a name="l00002"></a>00002 <span class="comment">/* dbus-marshal-validate.h  Validation routines for marshaled data</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2005  Red Hat, Inc.</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * Licensed under the Academic Free License version 2.1</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> * This program is free software; you can redistribute it and/or modify</span>
<a name="l00009"></a>00009 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
<a name="l00010"></a>00010 <span class="comment"> * the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00011"></a>00011 <span class="comment"> * (at your option) any later version.</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
<a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00016"></a>00016 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00019"></a>00019 <span class="comment"> * along with this program; if not, write to the Free Software</span>
<a name="l00020"></a>00020 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
<a name="l00021"></a>00021 <span class="comment"> *</span>
<a name="l00022"></a>00022 <span class="comment"> */</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef DBUS_MARSHAL_VALIDATE_H</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define DBUS_MARSHAL_VALIDATE_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;config.h&gt;</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#ifndef PACKAGE</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#error "config.h not included here"</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00042"></a><a class="code" href="group__DBusMarshal.html#gf9dce059725fa793c44b219460cbbe6d">00042</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00043"></a>00043 {
<a name="l00044"></a>00044   DBUS_VALIDATION_MODE_WE_TRUST_THIS_DATA_ABSOLUTELY,
<a name="l00045"></a>00045   DBUS_VALIDATION_MODE_DATA_IS_UNTRUSTED
<a name="l00046"></a>00046 } <a class="code" href="group__DBusMarshal.html#gf9dce059725fa793c44b219460cbbe6d">DBusValidationMode</a>;
<a name="l00047"></a>00047 
<a name="l00055"></a><a class="code" href="group__DBusMarshal.html#g0c4521d30d6650a33673a4d7f9cc007c">00055</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00056"></a>00056 {
<a name="l00057"></a>00057 <span class="preprocessor">#define _DBUS_NEGATIVE_VALIDITY_COUNT 4</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span>  <a class="code" href="group__DBusMarshal.html#gg0c4521d30d6650a33673a4d7f9cc007c08cf1e84457c1f41acaf082de2060a65">DBUS_VALIDITY_UNKNOWN_OOM_ERROR</a> = -4, 
<a name="l00059"></a>00059   DBUS_INVALID_FOR_UNKNOWN_REASON = -3,
<a name="l00060"></a>00060   DBUS_VALID_BUT_INCOMPLETE = -2,
<a name="l00061"></a>00061   DBUS_VALIDITY_UNKNOWN = -1,
<a name="l00062"></a>00062   <a class="code" href="group__DBusMarshal.html#gg0c4521d30d6650a33673a4d7f9cc007ce68ac5067fe94cdcfb35e115f36298c8">DBUS_VALID</a> = 0, 
<a name="l00063"></a>00063   DBUS_INVALID_UNKNOWN_TYPECODE = 1,
<a name="l00064"></a>00064   DBUS_INVALID_MISSING_ARRAY_ELEMENT_TYPE = 2,
<a name="l00065"></a>00065   DBUS_INVALID_SIGNATURE_TOO_LONG = 3, <span class="comment">/* this one is impossible right now since</span>
<a name="l00066"></a>00066 <span class="comment">                                        * you can't put a too-long value in a byte</span>
<a name="l00067"></a>00067 <span class="comment">                                        */</span>
<a name="l00068"></a>00068   DBUS_INVALID_EXCEEDED_MAXIMUM_ARRAY_RECURSION = 4,
<a name="l00069"></a>00069   DBUS_INVALID_EXCEEDED_MAXIMUM_STRUCT_RECURSION = 5,
<a name="l00070"></a>00070   DBUS_INVALID_STRUCT_ENDED_BUT_NOT_STARTED = 6,
<a name="l00071"></a>00071   DBUS_INVALID_STRUCT_STARTED_BUT_NOT_ENDED = 7,
<a name="l00072"></a>00072   DBUS_INVALID_STRUCT_HAS_NO_FIELDS = 8,
<a name="l00073"></a>00073   DBUS_INVALID_ALIGNMENT_PADDING_NOT_NUL = 9,
<a name="l00074"></a>00074   DBUS_INVALID_BOOLEAN_NOT_ZERO_OR_ONE = 10,
<a name="l00075"></a>00075   DBUS_INVALID_NOT_ENOUGH_DATA = 11,
<a name="l00076"></a>00076   <a class="code" href="group__DBusMarshal.html#gg0c4521d30d6650a33673a4d7f9cc007c10bc3fdc9ca42108aa5a7e091f6aae52">DBUS_INVALID_TOO_MUCH_DATA</a> = 12, 
<a name="l00077"></a>00077   DBUS_INVALID_BAD_BYTE_ORDER = 13,
<a name="l00078"></a>00078   DBUS_INVALID_BAD_PROTOCOL_VERSION = 14,
<a name="l00079"></a>00079   DBUS_INVALID_BAD_MESSAGE_TYPE = 15,
<a name="l00080"></a>00080   DBUS_INVALID_BAD_SERIAL = 16,
<a name="l00081"></a>00081   DBUS_INVALID_INSANE_FIELDS_ARRAY_LENGTH = 17,
<a name="l00082"></a>00082   DBUS_INVALID_INSANE_BODY_LENGTH = 18,
<a name="l00083"></a>00083   DBUS_INVALID_MESSAGE_TOO_LONG = 19,
<a name="l00084"></a>00084   DBUS_INVALID_HEADER_FIELD_CODE = 20,
<a name="l00085"></a>00085   DBUS_INVALID_HEADER_FIELD_HAS_WRONG_TYPE = 21,
<a name="l00086"></a>00086   DBUS_INVALID_USES_LOCAL_INTERFACE = 22,
<a name="l00087"></a>00087   DBUS_INVALID_USES_LOCAL_PATH = 23,
<a name="l00088"></a>00088   DBUS_INVALID_HEADER_FIELD_APPEARS_TWICE = 24,
<a name="l00089"></a>00089   DBUS_INVALID_BAD_DESTINATION = 25,
<a name="l00090"></a>00090   DBUS_INVALID_BAD_INTERFACE = 26,
<a name="l00091"></a>00091   DBUS_INVALID_BAD_MEMBER = 27,
<a name="l00092"></a>00092   DBUS_INVALID_BAD_ERROR_NAME = 28,
<a name="l00093"></a>00093   DBUS_INVALID_BAD_SENDER = 29,
<a name="l00094"></a>00094   DBUS_INVALID_MISSING_PATH = 30,
<a name="l00095"></a>00095   DBUS_INVALID_MISSING_INTERFACE = 31,
<a name="l00096"></a>00096   DBUS_INVALID_MISSING_MEMBER = 32,
<a name="l00097"></a>00097   DBUS_INVALID_MISSING_ERROR_NAME = 33,
<a name="l00098"></a>00098   DBUS_INVALID_MISSING_REPLY_SERIAL = 34,
<a name="l00099"></a>00099   DBUS_INVALID_LENGTH_OUT_OF_BOUNDS = 35,
<a name="l00100"></a>00100   DBUS_INVALID_ARRAY_LENGTH_EXCEEDS_MAXIMUM = 36,
<a name="l00101"></a>00101   DBUS_INVALID_BAD_PATH = 37,
<a name="l00102"></a>00102   DBUS_INVALID_SIGNATURE_LENGTH_OUT_OF_BOUNDS = 38,
<a name="l00103"></a>00103   DBUS_INVALID_BAD_UTF8_IN_STRING = 39,
<a name="l00104"></a>00104   DBUS_INVALID_ARRAY_LENGTH_INCORRECT = 40,
<a name="l00105"></a>00105   DBUS_INVALID_VARIANT_SIGNATURE_LENGTH_OUT_OF_BOUNDS = 41,
<a name="l00106"></a>00106   DBUS_INVALID_VARIANT_SIGNATURE_BAD = 42,
<a name="l00107"></a>00107   DBUS_INVALID_VARIANT_SIGNATURE_EMPTY = 43,
<a name="l00108"></a>00108   DBUS_INVALID_VARIANT_SIGNATURE_SPECIFIES_MULTIPLE_VALUES = 44,
<a name="l00109"></a>00109   DBUS_INVALID_VARIANT_SIGNATURE_MISSING_NUL = 45,
<a name="l00110"></a>00110   DBUS_INVALID_STRING_MISSING_NUL = 46,
<a name="l00111"></a>00111   DBUS_INVALID_SIGNATURE_MISSING_NUL = 47,
<a name="l00112"></a>00112   DBUS_INVALID_EXCEEDED_MAXIMUM_DICT_ENTRY_RECURSION = 48,
<a name="l00113"></a>00113   DBUS_INVALID_DICT_ENTRY_ENDED_BUT_NOT_STARTED = 49,
<a name="l00114"></a>00114   DBUS_INVALID_DICT_ENTRY_STARTED_BUT_NOT_ENDED = 50,
<a name="l00115"></a>00115   DBUS_INVALID_DICT_ENTRY_HAS_NO_FIELDS = 51,
<a name="l00116"></a>00116   DBUS_INVALID_DICT_ENTRY_HAS_ONLY_ONE_FIELD = 52,
<a name="l00117"></a>00117   DBUS_INVALID_DICT_ENTRY_HAS_TOO_MANY_FIELDS = 53,
<a name="l00118"></a>00118   DBUS_INVALID_DICT_ENTRY_NOT_INSIDE_ARRAY = 54,
<a name="l00119"></a>00119   DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE = 55,
<a name="l00120"></a>00120   DBUS_VALIDITY_LAST
<a name="l00121"></a>00121 } <a class="code" href="group__DBusMarshal.html#g0c4521d30d6650a33673a4d7f9cc007c">DBusValidity</a>;
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 <a class="code" href="group__DBusMarshal.html#g0c4521d30d6650a33673a4d7f9cc007c">DBusValidity</a> <a class="code" href="group__DBusMarshal.html#g42e50826b5cf62921728432a8e35292c">_dbus_validate_signature_with_reason</a> (<span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a> *type_str,
<a name="l00124"></a>00124                                                    <span class="keywordtype">int</span>               type_pos,
<a name="l00125"></a>00125                                                    <span class="keywordtype">int</span>               len);
<a name="l00126"></a>00126 <a class="code" href="group__DBusMarshal.html#g0c4521d30d6650a33673a4d7f9cc007c">DBusValidity</a> <a class="code" href="group__DBusMarshal.html#ge997884ec8091aacb5492c2b5a7eaef9">_dbus_validate_body_with_reason</a>      (<span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a> *expected_signature,
<a name="l00127"></a>00127                                                    <span class="keywordtype">int</span>               expected_signature_start,
<a name="l00128"></a>00128                                                    <span class="keywordtype">int</span>               byte_order,
<a name="l00129"></a>00129                                                    <span class="keywordtype">int</span>              *bytes_remaining,
<a name="l00130"></a>00130                                                    <span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a> *value_str,
<a name="l00131"></a>00131                                                    <span class="keywordtype">int</span>               value_pos,
<a name="l00132"></a>00132                                                    <span class="keywordtype">int</span>               len);
<a name="l00133"></a>00133 
<a name="l00134"></a>00134 <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="code" href="group__DBusMarshal.html#g616ba4a0280b10222930aedadb7ea8d9">_dbus_validate_path</a>       (<span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a> *str,
<a name="l00135"></a>00135                                        <span class="keywordtype">int</span>               start,
<a name="l00136"></a>00136                                        <span class="keywordtype">int</span>               len);
<a name="l00137"></a>00137 <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="code" href="group__DBusMarshal.html#g0ad919783f887a9b6f428e262beaeed9">_dbus_validate_interface</a>  (<span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a> *str,
<a name="l00138"></a>00138                                        <span class="keywordtype">int</span>               start,
<a name="l00139"></a>00139                                        <span class="keywordtype">int</span>               len);
<a name="l00140"></a>00140 <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="code" href="group__DBusMarshal.html#gf647272768029cb23a4e0d3f493587da">_dbus_validate_member</a>     (<span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a> *str,
<a name="l00141"></a>00141                                        <span class="keywordtype">int</span>               start,
<a name="l00142"></a>00142                                        <span class="keywordtype">int</span>               len);
<a name="l00143"></a>00143 <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="code" href="group__DBusMarshal.html#g6d8075f3b60e2e71aad061aa44b120fe">_dbus_validate_error_name</a> (<span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a> *str,
<a name="l00144"></a>00144                                        <span class="keywordtype">int</span>               start,
<a name="l00145"></a>00145                                        <span class="keywordtype">int</span>               len);
<a name="l00146"></a>00146 <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="code" href="group__DBusMarshal.html#gab91a04fa2a96b8ce8843beae7327cd0">_dbus_validate_bus_name</a>   (<span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a> *str,
<a name="l00147"></a>00147                                        <span class="keywordtype">int</span>               start,
<a name="l00148"></a>00148                                        <span class="keywordtype">int</span>               len);
<a name="l00149"></a>00149 <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="code" href="group__DBusMarshal.html#g8d7aa58f6484d5d24f275dd65f101676">_dbus_validate_signature</a>  (<span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a> *str,
<a name="l00150"></a>00150                                        <span class="keywordtype">int</span>               start,
<a name="l00151"></a>00151                                        <span class="keywordtype">int</span>               len);
<a name="l00152"></a>00152 
<a name="l00153"></a>00153 <span class="preprocessor">#ifdef DBUS_DISABLE_CHECKS</span>
<a name="l00154"></a>00154 <span class="preprocessor"></span>
<a name="l00155"></a>00155 <span class="comment">/* Be sure they don't exist, since we don't want to use them outside of checks</span>
<a name="l00156"></a>00156 <span class="comment"> * and so we want the compile failure.</span>
<a name="l00157"></a>00157 <span class="comment"> */</span>
<a name="l00158"></a>00158 <span class="preprocessor">#define DECLARE_DBUS_NAME_CHECK(what)</span>
<a name="l00159"></a>00159 <span class="preprocessor"></span><span class="preprocessor">#define DEFINE_DBUS_NAME_CHECK(what)</span>
<a name="l00160"></a>00160 <span class="preprocessor"></span>
<a name="l00161"></a>00161 <span class="preprocessor">#else </span><span class="comment">/* !DBUS_DISABLE_CHECKS */</span>
<a name="l00162"></a>00162 
<a name="l00166"></a><a class="code" href="group__DBusMarshal.html#gb17853bba6b5508dc2d1eddad7e40946">00166</a> <span class="preprocessor">#define DECLARE_DBUS_NAME_CHECK(what) \</span>
<a name="l00167"></a>00167 <span class="preprocessor">dbus_bool_t _dbus_check_is_valid_##what (const char *name)</span>
<a name="l00168"></a>00168 <span class="preprocessor"></span>
<a name="l00171"></a><a class="code" href="group__DBusMarshal.html#g2d30023893c9483413f63d2b8d4e1fb9">00171</a> <span class="preprocessor">#define DEFINE_DBUS_NAME_CHECK(what)                                    \</span>
<a name="l00172"></a>00172 <span class="preprocessor">dbus_bool_t                                                             \</span>
<a name="l00173"></a>00173 <span class="preprocessor">_dbus_check_is_valid_##what (const char *name)                          \</span>
<a name="l00174"></a>00174 <span class="preprocessor">{                                                                       \</span>
<a name="l00175"></a>00175 <span class="preprocessor">  DBusString str;                                                       \</span>
<a name="l00176"></a>00176 <span class="preprocessor">                                                                        \</span>
<a name="l00177"></a>00177 <span class="preprocessor">  if (name == NULL)                                                     \</span>
<a name="l00178"></a>00178 <span class="preprocessor">    return FALSE;                                                       \</span>
<a name="l00179"></a>00179 <span class="preprocessor">                                                                        \</span>
<a name="l00180"></a>00180 <span class="preprocessor">  _dbus_string_init_const (&amp;str, name);                                 \</span>
<a name="l00181"></a>00181 <span class="preprocessor">  return _dbus_validate_##what (&amp;str, 0,                                \</span>
<a name="l00182"></a>00182 <span class="preprocessor">                                _dbus_string_get_length (&amp;str));        \</span>
<a name="l00183"></a>00183 <span class="preprocessor">}</span>
<a name="l00184"></a>00184 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !DBUS_DISABLE_CHECKS */</span>
<a name="l00185"></a>00185 
<a name="l00187"></a>00187 <a class="code" href="group__DBusMarshal.html#gb17853bba6b5508dc2d1eddad7e40946">DECLARE_DBUS_NAME_CHECK</a>(path);
<a name="l00189"></a>00189 <a class="code" href="group__DBusMarshal.html#gb17853bba6b5508dc2d1eddad7e40946">DECLARE_DBUS_NAME_CHECK</a>(interface);
<a name="l00191"></a>00191 <a class="code" href="group__DBusMarshal.html#gb17853bba6b5508dc2d1eddad7e40946">DECLARE_DBUS_NAME_CHECK</a>(member);
<a name="l00193"></a>00193 <a class="code" href="group__DBusMarshal.html#gb17853bba6b5508dc2d1eddad7e40946">DECLARE_DBUS_NAME_CHECK</a>(error_name);
<a name="l00195"></a>00195 <a class="code" href="group__DBusMarshal.html#gb17853bba6b5508dc2d1eddad7e40946">DECLARE_DBUS_NAME_CHECK</a>(bus_name);
<a name="l00197"></a>00197 <a class="code" href="group__DBusMarshal.html#gb17853bba6b5508dc2d1eddad7e40946">DECLARE_DBUS_NAME_CHECK</a>(signature);
<a name="l00198"></a>00198 
<a name="l00201"></a>00201 <span class="preprocessor">#endif </span><span class="comment">/* DBUS_MARSHAL_VALIDATE_H */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Dec 14 22:26:11 2009 for D-Bus by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>

Anon7 - 2021