Panda3D
config_http.cxx
1 // Filename: config_http.cxx
2 // Created by: drose (15Mar09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "config_http.h"
16 #include "http_connection.h"
17 #include "http_request.h"
18 #include "dconfig.h"
19 
20 Configure(config_http);
21 NotifyCategoryDef(http, "");
22 
23 ConfigureFn(config_http) {
24  init_libhttp();
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: init_libhttp
29 // Description: Initializes the library. This must be called at
30 // least once before any of the functions or classes in
31 // this library can be used. Normally it will be
32 // called by the static initializers and need not be
33 // called explicitly, but special cases exist.
34 ////////////////////////////////////////////////////////////////////
35 void
36 init_libhttp() {
37  static bool initialized = false;
38  if (initialized) {
39  return;
40  }
41  initialized = true;
42 
43  HttpConnection::init_type();
44  Http_Request::init_type();
45 }
46