client.c

Go to the documentation of this file.
00001 /*
00002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00003 %                                                                             %
00004 %                                                                             %
00005 %                                                                             %
00006 %                  CCCC  L      IIIII  EEEEE  N   N  TTTTT                    %
00007 %                 C      L        I    E      NN  N    T                      %
00008 %                 C      L        I    EEE    N N N    T                      %
00009 %                 C      L        I    E      N  NN    T                      %
00010 %                  CCCC  LLLLL  IIIII  EEEEE  N   N    T                      %
00011 %                                                                             %
00012 %                                                                             %
00013 %                         MagickCore Client Methods                           %
00014 %                                                                             %
00015 %                             Software Design                                 %
00016 %                               John Cristy                                   %
00017 %                               March 2003                                    %
00018 %                                                                             %
00019 %                                                                             %
00020 %  Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization      %
00021 %  dedicated to making software imaging solutions freely available.           %
00022 %                                                                             %
00023 %  You may not use this file except in compliance with the License.  You may  %
00024 %  obtain a copy of the License at                                            %
00025 %                                                                             %
00026 %    http://www.imagemagick.org/script/license.php                            %
00027 %                                                                             %
00028 %  Unless required by applicable law or agreed to in writing, software        %
00029 %  distributed under the License is distributed on an "AS IS" BASIS,          %
00030 %  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   %
00031 %  See the License for the specific language governing permissions and        %
00032 %  limitations under the License.                                             %
00033 %                                                                             %
00034 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00035 %
00036 %
00037 */
00038 
00039 /*
00040   Include declarations.
00041 */
00042 #include "magick/studio.h"
00043 #include "magick/client.h"
00044 #include "magick/string_.h"
00045 
00046 /*
00047   Static declaractions.
00048 */
00049 static char
00050   client_name[MaxTextExtent] = "ImageMagick",
00051   client_path[MaxTextExtent] = "";
00052 
00053 /*
00054 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00055 %                                                                             %
00056 %                                                                             %
00057 %                                                                             %
00058 %   G e t C l i e n t N a m e                                                 %
00059 %                                                                             %
00060 %                                                                             %
00061 %                                                                             %
00062 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00063 %
00064 %  GetClientName returns the current client name.
00065 %
00066 %  The format of the GetClientName method is:
00067 %
00068 %      const char *GetClientName(void)
00069 %
00070 */
00071 MagickExport const char *GetClientName(void)
00072 {
00073   return(client_name);
00074 }
00075 
00076 /*
00077 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00078 %                                                                             %
00079 %                                                                             %
00080 %                                                                             %
00081 %   G e t C l i e n t P a t h                                                 %
00082 %                                                                             %
00083 %                                                                             %
00084 %                                                                             %
00085 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00086 %
00087 %  GetClientPath returns the current client name.
00088 %
00089 %  The format of the GetClientPath method is:
00090 %
00091 %      const char *GetClientPath(void)
00092 %
00093 */
00094 MagickExport const char *GetClientPath(void)
00095 {
00096   return(client_path);
00097 }
00098 
00099 /*
00100 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00101 %                                                                             %
00102 %                                                                             %
00103 %                                                                             %
00104 %   S e t C l i e n t N a m e                                                 %
00105 %                                                                             %
00106 %                                                                             %
00107 %                                                                             %
00108 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00109 %
00110 %  SetClientName sets the client name and returns it.
00111 %
00112 %  The format of the SetClientName method is:
00113 %
00114 %      const char *SetClientName(const char *name)
00115 %
00116 %  A description of each parameter follows:
00117 %
00118 %    o client_name: SetClientName() returns the current client name.
00119 %
00120 %    o name: Specifies the new client name.
00121 %
00122 */
00123 MagickExport const char *SetClientName(const char *name)
00124 {
00125   if ((name != (char *) NULL) && (*name != '\0'))
00126     (void) CopyMagickString(client_name,name,MaxTextExtent);
00127   return(client_name);
00128 }
00129 
00130 /*
00131 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00132 %                                                                             %
00133 %                                                                             %
00134 %                                                                             %
00135 %   S e t C l i e n t P a t h                                                 %
00136 %                                                                             %
00137 %                                                                             %
00138 %                                                                             %
00139 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00140 %
00141 %  SetClientPath() sets the client path if the name is specified.  Otherwise
00142 %  the current client path is returned. A zero-length string is returned if
00143 %  the client path has never been set.
00144 %
00145 %  The format of the SetClientPath method is:
00146 %
00147 %      const char *SetClientPath(const char *path)
00148 %
00149 %  A description of each parameter follows:
00150 %
00151 %    o client_path: Method SetClientPath returns the current client path.
00152 %
00153 %    o path: Specifies the new client path.
00154 %
00155 %
00156 */
00157 MagickExport const char *SetClientPath(const char *path)
00158 {
00159   if ((path != (char *) NULL) && (*path != '\0'))
00160     (void) CopyMagickString(client_path,path,MaxTextExtent);
00161   return(client_path);
00162 }

Generated on Thu Jul 2 12:03:13 2009 for MagickCore by  doxygen 1.5.8