summaryrefslogtreecommitdiffstats
path: root/kjsembed/builtins/qdir_imp.h
blob: ed89ad7c81804aa168f424e08c8f1f6ec25732a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172

  

#ifndef KJSEMBED_QDir_H
#define KJSEMBED_QDir_H

#include <kjs/interpreter.h>
#include <kjs/object.h>

#include <kjsembed/jsobjectproxy_imp.h>
#include <kjsembed/jsbindingbase.h>

class TTQDir;

/**
 * Namespace containing the KJSEmbed library.
 */
namespace KJSEmbed {
namespace Bindings {
    class TQDirLoader : public JSBindingBase
    {
        public:
            KJS::Object createBinding(KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &args) const;
            void addBindings( KJSEmbedPart *jspart, KJS::ExecState *exec, KJS::Object &proxy) const;
    };
}
/**
 * Wrapper class for TTQDir methods.
 *
 * @author Richard Moore, rich@kde.org
 */
class TQDirImp : public JSProxyImp
{
public:
   /** Enumerates the methods supported by this class. */
   enum Methods {

       Method_setPath_7,
       Method_path_8,
       Method_absPath_9,
       Method_canonicalPath_10,
       Method_dirName_11,
       Method_filePath_12,
       Method_absFilePath_13,
       Method_cd_14,
       Method_cdUp_15,
       Method_nameFilter_16,
       Method_setNameFilter_17,
       Method_filter_18,
       Method_setFilter_19,
       Method_sorting_20,
       Method_setSorting_21,
       Method_matchAllDirs_22,
       Method_setMatchAllDirs_23,
       Method_count_24,
       Method_encodedEntryList_26,
       Method_encodedEntryList_27,
       Method_entryList_28,
       Method_entryList_29,
       Method_entryInfoList_30,
       Method_entryInfoList_31,
       Method_mkdir_32,
       Method_rmdir_33,
       Method_isReadable_34,
       Method_exists_35,
       Method_isRoot_36,
       Method_isRelative_37,
       Method_convertToAbs_38,
       Method_remove_41,
       Method_rename_42,
       Method_exists_43,
       Method_refresh_44,
       Method_convertSeparators_45,
       Method_drives_46,
       Method_separator_47,
       Method_setCurrent_48,
       Method_current_49,
       Method_home_50,
       Method_root_51,
       Method_currentDirPath_52,
       Method_homeDirPath_53,
       Method_rootDirPath_54,
       Method_match_55,
       Method_match_56,
       Method_cleanDirPath_57,
       Method_isRelativePath_58,
       Method_Last = -1
   };

   TQDirImp( KJS::ExecState *exec, int id );
   ~TQDirImp();

   static void addBindings( KJS::ExecState *exec, KJS::Object &object );

   //
   // Methods implemented by this class.
   //

   KJS::Value setPath_7( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value path_8( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value absPath_9( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value canonicalPath_10( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value dirName_11( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value filePath_12( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value absFilePath_13( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value cd_14( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value cdUp_15( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value nameFilter_16( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value setNameFilter_17( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value filter_18( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value setFilter_19( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value sorting_20( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value setSorting_21( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value matchAllDirs_22( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value setMatchAllDirs_23( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value count_24( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value encodedEntryList_26( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value encodedEntryList_27( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value entryList_28( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value entryList_29( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value entryInfoList_30( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value entryInfoList_31( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value mkdir_32( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value rmdir_33( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value isReadable_34( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value exists_35( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value isRoot_36( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value isRelative_37( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value convertToAbs_38( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value remove_41( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value rename_42( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value exists_43( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value refresh_44( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value convertSeparators_45( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value drives_46( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value separator_47( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value setCurrent_48( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value current_49( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value home_50( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value root_51( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value currentDirPath_52( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value homeDirPath_53( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value rootDirPath_54( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value match_55( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value match_56( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value cleanDirPath_57( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );
   KJS::Value isRelativePath_58( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args );

   //
   // JS binding code.
   //

   /** Returns true iff this object implements the call function. */
   virtual bool implementsCall() const { return true; }

   /** Invokes the call function. */
   virtual KJS::Value call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args );

private:
   TTQDir *instance; // Temp
   int mid;
};

} // namespace KJSEmbed

#endif // KJSEMBED_QDir_H

// Local Variables:
// c-basic-offset: 4
// End: