~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/xpinstall/wizard/libxpnet/GUSI/include/GUSIPipe.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
 
2
// % Project    :       GUSI                            -       Grand Unified Socket Interface                    
 
3
// % File               :       GUSIPipe.nw                     -       Pipes                                         
 
4
// % Author     :       Matthias Neeracher                                           
 
5
// % Language   :       C++                                                        
 
6
// %                                                                       
 
7
// % $Log: GUSIPipe.h,v $
 
8
// % Revision 1.1  2001/03/11 22:37:35  sgehani%netscape.com
 
9
// % First Checked In.
 
10
// %                                                 
 
11
// % Revision 1.12  2000/05/23 07:18:03  neeri                             
 
12
// % Improve formatting                                                    
 
13
// %                                                                       
 
14
// % Revision 1.11  2000/03/06 06:09:59  neeri                             
 
15
// % Reorganize Yield()                                                    
 
16
// %                                                                       
 
17
// % Revision 1.10  1999/11/15 07:20:59  neeri                             
 
18
// % Add GUSIwithLocalSockets                                              
 
19
// %                                                                       
 
20
// % Revision 1.9  1999/08/26 05:45:07  neeri                              
 
21
// % Fixes for literate edition of source code                             
 
22
// %                                                                       
 
23
// % Revision 1.8  1999/06/28 06:05:00  neeri                              
 
24
// % Support interrupted calls                                             
 
25
// %                                                                       
 
26
// % Revision 1.7  1999/05/29 06:26:45  neeri                              
 
27
// % Fixed header guards                                                   
 
28
// %                                                                       
 
29
// % Revision 1.6  1999/03/17 09:05:12  neeri                              
 
30
// % Added GUSITimer, expanded docs                                        
 
31
// %                                                                       
 
32
// % Revision 1.5  1998/11/22 23:07:00  neeri                              
 
33
// % Releasing 2.0a4 in a hurry                                            
 
34
// %                                                                       
 
35
// % Revision 1.4  1998/10/25 11:57:38  neeri                              
 
36
// % Ready to release 2.0a3                                                
 
37
// %                                                                       
 
38
// % Revision 1.3  1998/01/25 20:53:57  neeri                              
 
39
// % Engine implemented, except for signals & scheduling                   
 
40
// %                                                                       
 
41
// % Revision 1.2  1996/12/22 19:57:58  neeri                              
 
42
// % TCP streams work                                                      
 
43
// %                                                                       
 
44
// % Revision 1.1  1996/11/24  12:52:08  neeri                             
 
45
// % Added GUSIPipeSockets                                                 
 
46
// %                                                                       
 
47
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
 
48
//                                                                         
 
49
// \chapter{The GUSI Pipe Socket Class}                                    
 
50
//                                                                         
 
51
// Pipes and socket pairs are implemented with the [[GUSIPipeSocket]] class.
 
52
// The [[GUSIPipeFactory]] singleton creates pairs of [[GUSIPipeSockets]]. 
 
53
//                                                                         
 
54
// <GUSIPipe.h>=                                                           
 
55
#ifndef _GUSIPipe_
 
56
#define _GUSIPipe_
 
57
 
 
58
#ifdef GUSI_INTERNAL
 
59
 
 
60
#include "GUSISocket.h"
 
61
#include "GUSIFactory.h"
 
62
 
 
63
// \section{Definition of [[GUSIPipeFactory]]}                             
 
64
//                                                                         
 
65
// [[GUSIPipeFactory]] is a singleton subclass of [[GUSISocketFactory]].   
 
66
//                                                                         
 
67
// <Definition of class [[GUSIPipeFactory]]>=                              
 
68
class GUSIPipeFactory : public GUSISocketFactory {
 
69
public:
 
70
        static GUSISocketFactory *      Instance();
 
71
        virtual GUSISocket *            socket(int domain, int type, int protocol);
 
72
        virtual int socketpair(int domain, int type, int protocol, GUSISocket * s[2]);
 
73
private:
 
74
        GUSIPipeFactory()                               {}
 
75
        static GUSISocketFactory *      sInstance;
 
76
};
 
77
 
 
78
// <Inline member functions for class [[GUSIPipeFactory]]>=                
 
79
inline GUSISocketFactory * GUSIPipeFactory::Instance()
 
80
{
 
81
        if (!sInstance)
 
82
                sInstance = new GUSIPipeFactory;
 
83
        return sInstance;
 
84
}
 
85
 
 
86
#endif /* GUSI_INTERNAL */
 
87
 
 
88
#endif /* _GUSIPipe_ */